Merge branch 'upstream-fixes'

This commit is contained in:
Jeff Garzik 2006-02-09 00:59:34 -05:00
commit 725b2805fd
859 changed files with 14732 additions and 8286 deletions

View File

@ -3101,7 +3101,7 @@ S: Minto, NSW, 2566
S: Australia S: Australia
N: Stephen Smalley N: Stephen Smalley
E: sds@epoch.ncsc.mil E: sds@tycho.nsa.gov
D: portions of the Linux Security Module (LSM) framework and security modules D: portions of the Linux Security Module (LSM) framework and security modules
N: Chris Smith N: Chris Smith

View File

@ -0,0 +1,41 @@
Export cpu topology info by sysfs. Items (attributes) are similar
to /proc/cpuinfo.
1) /sys/devices/system/cpu/cpuX/topology/physical_package_id:
represent the physical package id of cpu X;
2) /sys/devices/system/cpu/cpuX/topology/core_id:
represent the cpu core id to cpu X;
3) /sys/devices/system/cpu/cpuX/topology/thread_siblings:
represent the thread siblings to cpu X in the same core;
4) /sys/devices/system/cpu/cpuX/topology/core_siblings:
represent the thread siblings to cpu X in the same physical package;
To implement it in an architecture-neutral way, a new source file,
driver/base/topology.c, is to export the 5 attributes.
If one architecture wants to support this feature, it just needs to
implement 4 defines, typically in file include/asm-XXX/topology.h.
The 4 defines are:
#define topology_physical_package_id(cpu)
#define topology_core_id(cpu)
#define topology_thread_siblings(cpu)
#define topology_core_siblings(cpu)
The type of **_id is int.
The type of siblings is cpumask_t.
To be consistent on all architectures, the 4 attributes should have
deafult values if their values are unavailable. Below is the rule.
1) physical_package_id: If cpu has no physical package id, -1 is the
default value.
2) core_id: If cpu doesn't support multi-core, its core id is 0.
3) thread_siblings: Just include itself, if the cpu doesn't support
HT/multi-thread.
4) core_siblings: Just include itself, if the cpu doesn't support
multi-core and HT/Multi-thread.
So be careful when declaring the 4 defines in include/asm-XXX/topology.h.
If an attribute isn't defined on an architecture, it won't be exported.

View File

@ -1,50 +1,43 @@
The Linux Kernel Device Model The Linux Kernel Device Model
Patrick Mochel <mochel@osdl.org> Patrick Mochel <mochel@digitalimplant.org>
26 August 2002 Drafted 26 August 2002
Updated 31 January 2006
Overview Overview
~~~~~~~~ ~~~~~~~~
This driver model is a unification of all the current, disparate driver models The Linux Kernel Driver Model is a unification of all the disparate driver
that are currently in the kernel. It is intended to augment the models that were previously used in the kernel. It is intended to augment the
bus-specific drivers for bridges and devices by consolidating a set of data bus-specific drivers for bridges and devices by consolidating a set of data
and operations into globally accessible data structures. and operations into globally accessible data structures.
Current driver models implement some sort of tree-like structure (sometimes Traditional driver models implemented some sort of tree-like structure
just a list) for the devices they control. But, there is no linkage between (sometimes just a list) for the devices they control. There wasn't any
the different bus types. uniformity across the different bus types.
A common data structure can provide this linkage with little overhead: when a The current driver model provides a comon, uniform data model for describing
bus driver discovers a particular device, it can insert it into the global a bus and the devices that can appear under the bus. The unified bus
tree as well as its local tree. In fact, the local tree becomes just a subset model includes a set of common attributes which all busses carry, and a set
of the global tree. of common callbacks, such as device discovery during bus probing, bus
shutdown, bus power management, etc.
Common data fields can also be moved out of the local bus models into the
global model. Some of the manipulations of these fields can also be
consolidated. Most likely, manipulation functions will become a set
of helper functions, which the bus drivers wrap around to include any
bus-specific items.
The common device and bridge interface currently reflects the goals of the
modern PC: namely the ability to do seamless Plug and Play, power management,
and hot plug. (The model dictated by Intel and Microsoft (read: ACPI) ensures
us that any device in the system may fit any of these criteria.)
In reality, not every bus will be able to support such operations. But, most
buses will support a majority of those operations, and all future buses will.
In other words, a bus that doesn't support an operation is the exception,
instead of the other way around.
The common device and bridge interface reflects the goals of the modern
computer: namely the ability to do seamless device "plug and play", power
management, and hot plug. In particular, the model dictated by Intel and
Microsoft (namely ACPI) ensures that almost every device on almost any bus
on an x86-compatible system can work within this paradigm. Of course,
not every bus is able to support all such operations, although most
buses support a most of those operations.
Downstream Access Downstream Access
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
Common data fields have been moved out of individual bus layers into a common Common data fields have been moved out of individual bus layers into a common
data structure. But, these fields must still be accessed by the bus layers, data structure. These fields must still be accessed by the bus layers,
and sometimes by the device-specific drivers. and sometimes by the device-specific drivers.
Other bus layers are encouraged to do what has been done for the PCI layer. Other bus layers are encouraged to do what has been done for the PCI layer.
@ -53,7 +46,7 @@ struct pci_dev now looks like this:
struct pci_dev { struct pci_dev {
... ...
struct device device; struct device dev;
}; };
Note first that it is statically allocated. This means only one allocation on Note first that it is statically allocated. This means only one allocation on
@ -64,9 +57,9 @@ the two.
The PCI bus layer freely accesses the fields of struct device. It knows about The PCI bus layer freely accesses the fields of struct device. It knows about
the structure of struct pci_dev, and it should know the structure of struct the structure of struct pci_dev, and it should know the structure of struct
device. PCI devices that have been converted generally do not touch the fields device. Individual PCI device drivers that have been converted the the current
of struct device. More precisely, device-specific drivers should not touch driver model generally do not and should not touch the fields of struct device,
fields of struct device unless there is a strong compelling reason to do so. unless there is a strong compelling reason to do so.
This abstraction is prevention of unnecessary pain during transitional phases. This abstraction is prevention of unnecessary pain during transitional phases.
If the name of the field changes or is removed, then every downstream driver If the name of the field changes or is removed, then every downstream driver

View File

@ -162,3 +162,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>

View File

@ -320,6 +320,7 @@ static struct config_item_type simple_children_type = {
.ct_item_ops = &simple_children_item_ops, .ct_item_ops = &simple_children_item_ops,
.ct_group_ops = &simple_children_group_ops, .ct_group_ops = &simple_children_group_ops,
.ct_attrs = simple_children_attrs, .ct_attrs = simple_children_attrs,
.ct_owner = THIS_MODULE,
}; };
static struct configfs_subsystem simple_children_subsys = { static struct configfs_subsystem simple_children_subsys = {
@ -403,6 +404,7 @@ static struct config_item_type group_children_type = {
.ct_item_ops = &group_children_item_ops, .ct_item_ops = &group_children_item_ops,
.ct_group_ops = &group_children_group_ops, .ct_group_ops = &group_children_group_ops,
.ct_attrs = group_children_attrs, .ct_attrs = group_children_attrs,
.ct_owner = THIS_MODULE,
}; };
static struct configfs_subsystem group_children_subsys = { static struct configfs_subsystem group_children_subsys = {

View File

@ -35,6 +35,7 @@ Features which OCFS2 does not support yet:
be cluster coherent. be cluster coherent.
- quotas - quotas
- cluster aware flock - cluster aware flock
- cluster aware lockf
- Directory change notification (F_NOTIFY) - Directory change notification (F_NOTIFY)
- Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease) - Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease)
- POSIX ACLs - POSIX ACLs

105
Documentation/hwmon/f71805f Normal file
View 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.

View File

@ -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/

View File

@ -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.

View File

@ -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

View File

@ -427,6 +427,23 @@ icmp_ignore_bogus_error_responses - BOOLEAN
will avoid log file clutter. will avoid log file clutter.
Default: FALSE Default: FALSE
icmp_errors_use_inbound_ifaddr - BOOLEAN
If zero, icmp error messages are sent with the primary address of
the exiting interface.
If non-zero, the message will be sent with the primary address of
the interface that received the packet that caused the icmp error.
This is the behaviour network many administrators will expect from
a router. And it can make debugging complicated network layouts
much easier.
Note that if no primary address exists for the interface selected,
then the primary address of the first non-loopback interface that
has one will be used regarldess of this setting.
Default: 0
igmp_max_memberships - INTEGER igmp_max_memberships - INTEGER
Change the maximum number of multicast groups we can subscribe to. Change the maximum number of multicast groups we can subscribe to.
Default: 20 Default: 20

View File

@ -1068,7 +1068,7 @@ SYNOPSIS
struct parport_operations { struct parport_operations {
... ...
void (*write_status) (struct parport *port, unsigned char s); void (*write_control) (struct parport *port, unsigned char s);
... ...
}; };
@ -1097,9 +1097,9 @@ SYNOPSIS
struct parport_operations { struct parport_operations {
... ...
void (*frob_control) (struct parport *port, unsigned char (*frob_control) (struct parport *port,
unsigned char mask, unsigned char mask,
unsigned char val); unsigned char val);
... ...
}; };

View File

@ -1,246 +1,396 @@
PCI Error Recovery PCI Error Recovery
------------------ ------------------
May 31, 2005 February 2, 2006
Current document maintainer: Current document maintainer:
Linas Vepstas <linas@austin.ibm.com> Linas Vepstas <linas@austin.ibm.com>
Some PCI bus controllers are able to detect certain "hard" PCI errors Many PCI bus controllers are able to detect a variety of hardware
on the bus, such as parity errors on the data and address busses, as PCI errors on the bus, such as parity errors on the data and address
well as SERR and PERR errors. These chipsets are then able to disable busses, as well as SERR and PERR errors. Some of the more advanced
I/O to/from the affected device, so that, for example, a bad DMA chipsets are able to deal with these errors; these include PCI-E chipsets,
address doesn't end up corrupting system memory. These same chipsets and the PCI-host bridges found on IBM Power4 and Power5-based pSeries
are also able to reset the affected PCI device, and return it to boxes. A typical action taken is to disconnect the affected device,
working condition. This document describes a generic API form halting all I/O to it. The goal of a disconnection is to avoid system
performing error recovery. corruption; for example, to halt system memory corruption due to DMA's
to "wild" addresses. Typically, a reconnection mechanism is also
offered, so that the affected PCI device(s) are reset and put back
into working condition. The reset phase requires coordination
between the affected device drivers and the PCI controller chip.
This document describes a generic API for notifying device drivers
of a bus disconnection, and then performing error recovery.
This API is currently implemented in the 2.6.16 and later kernels.
The core idea is that after a PCI error has been detected, there must Reporting and recovery is performed in several steps. First, when
be a way for the kernel to coordinate with all affected device drivers a PCI hardware error has resulted in a bus disconnect, that event
so that the pci card can be made operational again, possibly after is reported as soon as possible to all affected device drivers,
performing a full electrical #RST of the PCI card. The API below including multiple instances of a device driver on multi-function
provides a generic API for device drivers to be notified of PCI cards. This allows device drivers to avoid deadlocking in spinloops,
errors, and to be notified of, and respond to, a reset sequence. waiting for some i/o-space register to change, when it never will.
It also gives the drivers a chance to defer incoming I/O as
needed.
Preliminary sketch of API, cut-n-pasted-n-modified email from Next, recovery is performed in several stages. Most of the complexity
Ben Herrenschmidt, circa 5 april 2005 is forced by the need to handle multi-function devices, that is,
devices that have multiple device drivers associated with them.
In the first stage, each driver is allowed to indicate what type
of reset it desires, the choices being a simple re-enabling of I/O
or requesting a hard reset (a full electrical #RST of the PCI card).
If any driver requests a full reset, that is what will be done.
After a full reset and/or a re-enabling of I/O, all drivers are
again notified, so that they may then perform any device setup/config
that may be required. After these have all completed, a final
"resume normal operations" event is sent out.
The biggest reason for choosing a kernel-based implementation rather
than a user-space implementation was the need to deal with bus
disconnects of PCI devices attached to storage media, and, in particular,
disconnects from devices holding the root file system. If the root
file system is disconnected, a user-space mechanism would have to go
through a large number of contortions to complete recovery. Almost all
of the current Linux file systems are not tolerant of disconnection
from/reconnection to their underlying block device. By contrast,
bus errors are easy to manage in the device driver. Indeed, most
device drivers already handle very similar recovery procedures;
for example, the SCSI-generic layer already provides significant
mechanisms for dealing with SCSI bus errors and SCSI bus resets.
Detailed Design
---------------
Design and implementation details below, based on a chain of
public email discussions with Ben Herrenschmidt, circa 5 April 2005.
The error recovery API support is exposed to the driver in the form of The error recovery API support is exposed to the driver in the form of
a structure of function pointers pointed to by a new field in struct a structure of function pointers pointed to by a new field in struct
pci_driver. The absence of this pointer in pci_driver denotes an pci_driver. A driver that fails to provide the structure is "non-aware",
"non-aware" driver, behaviour on these is platform dependant. and the actual recovery steps taken are platform dependent. The
Platforms like ppc64 can try to simulate pci hotplug remove/add. arch/powerpc implementation will simulate a PCI hotplug remove/add.
The definition of "pci_error_token" is not covered here. It is based on
Seto's work on the synchronous error detection. We still need to define
functions for extracting infos out of an opaque error token. This is
separate from this API.
This structure has the form: This structure has the form:
struct pci_error_handlers struct pci_error_handlers
{ {
int (*error_detected)(struct pci_dev *dev, pci_error_token error); int (*error_detected)(struct pci_dev *dev, enum pci_channel_state);
int (*mmio_enabled)(struct pci_dev *dev); int (*mmio_enabled)(struct pci_dev *dev);
int (*resume)(struct pci_dev *dev);
int (*link_reset)(struct pci_dev *dev); int (*link_reset)(struct pci_dev *dev);
int (*slot_reset)(struct pci_dev *dev); int (*slot_reset)(struct pci_dev *dev);
void (*resume)(struct pci_dev *dev);
}; };
A driver doesn't have to implement all of these callbacks. The The possible channel states are:
only mandatory one is error_detected(). If a callback is not enum pci_channel_state {
implemented, the corresponding feature is considered unsupported. pci_channel_io_normal, /* I/O channel is in normal state */
For example, if mmio_enabled() and resume() aren't there, then the pci_channel_io_frozen, /* I/O to channel is blocked */
driver is assumed as not doing any direct recovery and requires pci_channel_io_perm_failure, /* PCI card is dead */
};
Possible return values are:
enum pci_ers_result {
PCI_ERS_RESULT_NONE, /* no result/none/not supported in device driver */
PCI_ERS_RESULT_CAN_RECOVER, /* Device driver can recover without slot reset */
PCI_ERS_RESULT_NEED_RESET, /* Device driver wants slot to be reset. */
PCI_ERS_RESULT_DISCONNECT, /* Device has completely failed, is unrecoverable */
PCI_ERS_RESULT_RECOVERED, /* Device driver is fully recovered and operational */
};
A driver does not have to implement all of these callbacks; however,
if it implements any, it must implement error_detected(). If a callback
is not implemented, the corresponding feature is considered unsupported.
For example, if mmio_enabled() and resume() aren't there, then it
is assumed that the driver is not doing any direct recovery and requires
a reset. If link_reset() is not implemented, the card is assumed as a reset. If link_reset() is not implemented, the card is assumed as
not caring about link resets, in which case, if recover is supported, not care about link resets. Typically a driver will want to know about
the core can try recover (but not slot_reset() unless it really did a slot_reset().
reset the slot). If slot_reset() is not supported, link_reset() can
be called instead on a slot reset.
At first, the call will always be : The actual steps taken by a platform to recover from a PCI error
event will be platform-dependent, but will follow the general
sequence described below.
1) error_detected() STEP 0: Error Event
-------------------
PCI bus error is detect by the PCI hardware. On powerpc, the slot
is isolated, in that all I/O is blocked: all reads return 0xffffffff,
all writes are ignored.
Error detected. This is sent once after an error has been detected. At
this point, the device might not be accessible anymore depending on the STEP 1: Notification
platform (the slot will be isolated on ppc64). The driver may already --------------------
have "noticed" the error because of a failing IO, but this is the proper Platform calls the error_detected() callback on every instance of
"synchronisation point", that is, it gives a chance to the driver to every driver affected by the error.
cleanup, waiting for pending stuff (timers, whatever, etc...) to
complete; it can take semaphores, schedule, etc... everything but touch At this point, the device might not be accessible anymore, depending on
the device. Within this function and after it returns, the driver the platform (the slot will be isolated on powerpc). The driver may
already have "noticed" the error because of a failing I/O, but this
is the proper "synchronization point", that is, it gives the driver
a chance to cleanup, waiting for pending stuff (timers, whatever, etc...)
to complete; it can take semaphores, schedule, etc... everything but
touch the device. Within this function and after it returns, the driver
shouldn't do any new IOs. Called in task context. This is sort of a shouldn't do any new IOs. Called in task context. This is sort of a
"quiesce" point. See note about interrupts at the end of this doc. "quiesce" point. See note about interrupts at the end of this doc.
Result codes: All drivers participating in this system must implement this call.
- PCIERR_RESULT_CAN_RECOVER: The driver must return one of the following result codes:
Driever returns this if it thinks it might be able to recover - PCI_ERS_RESULT_CAN_RECOVER:
Driver returns this if it thinks it might be able to recover
the HW by just banging IOs or if it wants to be given the HW by just banging IOs or if it wants to be given
a chance to extract some diagnostic informations (see a chance to extract some diagnostic information (see
below). mmio_enable, below).
- PCIERR_RESULT_NEED_RESET: - PCI_ERS_RESULT_NEED_RESET:
Driver returns this if it thinks it can't recover unless the Driver returns this if it can't recover without a hard
slot is reset. slot reset.
- PCIERR_RESULT_DISCONNECT: - PCI_ERS_RESULT_DISCONNECT:
Return this if driver thinks it won't recover at all, Driver returns this if it doesn't want to recover at all.
(this will detach the driver ? or just leave it
dangling ? to be decided)
So at this point, we have called error_detected() for all drivers The next step taken will depend on the result codes returned by the
on the segment that had the error. On ppc64, the slot is isolated. What drivers.
happens now typically depends on the result from the drivers. If all
drivers on the segment/slot return PCIERR_RESULT_CAN_RECOVER, we would
re-enable IOs on the slot (or do nothing special if the platform doesn't
isolate slots) and call 2). If not and we can reset slots, we go to 4),
if neither, we have a dead slot. If it's an hotplug slot, we might
"simulate" reset by triggering HW unplug/replug though.
>>> Current ppc64 implementation assumes that a device driver will If all drivers on the segment/slot return PCI_ERS_RESULT_CAN_RECOVER,
>>> *not* schedule or semaphore in this routine; the current ppc64 then the platform should re-enable IOs on the slot (or do nothing in
particular, if the platform doesn't isolate slots), and recovery
proceeds to STEP 2 (MMIO Enable).
If any driver requested a slot reset (by returning PCI_ERS_RESULT_NEED_RESET),
then recovery proceeds to STEP 4 (Slot Reset).
If the platform is unable to recover the slot, the next step
is STEP 6 (Permanent Failure).
>>> The current powerpc implementation assumes that a device driver will
>>> *not* schedule or semaphore in this routine; the current powerpc
>>> implementation uses one kernel thread to notify all devices; >>> implementation uses one kernel thread to notify all devices;
>>> thus, of one device sleeps/schedules, all devices are affected. >>> thus, if one device sleeps/schedules, all devices are affected.
>>> Doing better requires complex multi-threaded logic in the error >>> Doing better requires complex multi-threaded logic in the error
>>> recovery implementation (e.g. waiting for all notification threads >>> recovery implementation (e.g. waiting for all notification threads
>>> to "join" before proceeding with recovery.) This seems excessively >>> to "join" before proceeding with recovery.) This seems excessively
>>> complex and not worth implementing. >>> complex and not worth implementing.
>>> The current ppc64 implementation doesn't much care if the device >>> The current powerpc implementation doesn't much care if the device
>>> attempts i/o at this point, or not. I/O's will fail, returning >>> attempts I/O at this point, or not. I/O's will fail, returning
>>> a value of 0xff on read, and writes will be dropped. If the device >>> a value of 0xff on read, and writes will be dropped. If the device
>>> driver attempts more than 10K I/O's to a frozen adapter, it will >>> driver attempts more than 10K I/O's to a frozen adapter, it will
>>> assume that the device driver has gone into an infinite loop, and >>> assume that the device driver has gone into an infinite loop, and
>>> it will panic the the kernel. >>> it will panic the the kernel. There doesn't seem to be any other
>>> way of stopping a device driver that insists on spinning on I/O.
2) mmio_enabled() STEP 2: MMIO Enabled
-------------------
The platform re-enables MMIO to the device (but typically not the
DMA), and then calls the mmio_enabled() callback on all affected
device drivers.
This is the "early recovery" call. IOs are allowed again, but DMA is This is the "early recovery" call. IOs are allowed again, but DMA is
not (hrm... to be discussed, I prefer not), with some restrictions. This not (hrm... to be discussed, I prefer not), with some restrictions. This
is NOT a callback for the driver to start operations again, only to is NOT a callback for the driver to start operations again, only to
peek/poke at the device, extract diagnostic information, if any, and peek/poke at the device, extract diagnostic information, if any, and
eventually do things like trigger a device local reset or some such, eventually do things like trigger a device local reset or some such,
but not restart operations. This is sent if all drivers on a segment but not restart operations. This is callback is made if all drivers on
agree that they can try to recover and no automatic link reset was a segment agree that they can try to recover and if no automatic link reset
performed by the HW. If the platform can't just re-enable IOs without was performed by the HW. If the platform can't just re-enable IOs without
a slot reset or a link reset, it doesn't call this callback and goes a slot reset or a link reset, it wont call this callback, and instead
directly to 3) or 4). All IOs should be done _synchronously_ from will have gone directly to STEP 3 (Link Reset) or STEP 4 (Slot Reset)
within this callback, errors triggered by them will be returned via
the normal pci_check_whatever() api, no new error_detected() callback
will be issued due to an error happening here. However, such an error
might cause IOs to be re-blocked for the whole segment, and thus
invalidate the recovery that other devices on the same segment might
have done, forcing the whole segment into one of the next states,
that is link reset or slot reset.
Result codes: >>> The following is proposed; no platform implements this yet:
- PCIERR_RESULT_RECOVERED >>> Proposal: All I/O's should be done _synchronously_ from within
>>> this callback, errors triggered by them will be returned via
>>> the normal pci_check_whatever() API, no new error_detected()
>>> callback will be issued due to an error happening here. However,
>>> such an error might cause IOs to be re-blocked for the whole
>>> segment, and thus invalidate the recovery that other devices
>>> on the same segment might have done, forcing the whole segment
>>> into one of the next states, that is, link reset or slot reset.
The driver should return one of the following result codes:
- PCI_ERS_RESULT_RECOVERED
Driver returns this if it thinks the device is fully Driver returns this if it thinks the device is fully
functionnal and thinks it is ready to start functional and thinks it is ready to start
normal driver operations again. There is no normal driver operations again. There is no
guarantee that the driver will actually be guarantee that the driver will actually be
allowed to proceed, as another driver on the allowed to proceed, as another driver on the
same segment might have failed and thus triggered a same segment might have failed and thus triggered a
slot reset on platforms that support it. slot reset on platforms that support it.
- PCIERR_RESULT_NEED_RESET - PCI_ERS_RESULT_NEED_RESET
Driver returns this if it thinks the device is not Driver returns this if it thinks the device is not
recoverable in it's current state and it needs a slot recoverable in it's current state and it needs a slot
reset to proceed. reset to proceed.
- PCIERR_RESULT_DISCONNECT - PCI_ERS_RESULT_DISCONNECT
Same as above. Total failure, no recovery even after Same as above. Total failure, no recovery even after
reset driver dead. (To be defined more precisely) reset driver dead. (To be defined more precisely)
>>> The current ppc64 implementation does not implement this callback. The next step taken depends on the results returned by the drivers.
If all drivers returned PCI_ERS_RESULT_RECOVERED, then the platform
proceeds to either STEP3 (Link Reset) or to STEP 5 (Resume Operations).
3) link_reset() If any driver returned PCI_ERS_RESULT_NEED_RESET, then the platform
proceeds to STEP 4 (Slot Reset)
This is called after the link has been reset. This is typically >>> The current powerpc implementation does not implement this callback.
a PCI Express specific state at this point and is done whenever a
non-fatal error has been detected that can be "solved" by resetting
the link. This call informs the driver of the reset and the driver STEP 3: Link Reset
should check if the device appears to be in working condition. ------------------
This function acts a bit like 2) mmio_enabled(), in that the driver The platform resets the link, and then calls the link_reset() callback
is not supposed to restart normal driver I/O operations right away. on all affected device drivers. This is a PCI-Express specific state
Instead, it should just "probe" the device to check it's recoverability and is done whenever a non-fatal error has been detected that can be
status. If all is right, then the core will call resume() once all "solved" by resetting the link. This call informs the driver of the
drivers have ack'd link_reset(). reset and the driver should check to see if the device appears to be
in working condition.
The driver is not supposed to restart normal driver I/O operations
at this point. It should limit itself to "probing" the device to
check it's recoverability status. If all is right, then the platform
will call resume() once all drivers have ack'd link_reset().
Result codes: Result codes:
(identical to mmio_enabled) (identical to STEP 3 (MMIO Enabled)
>>> The current ppc64 implementation does not implement this callback. The platform then proceeds to either STEP 4 (Slot Reset) or STEP 5
(Resume Operations).
4) slot_reset() >>> The current powerpc implementation does not implement this callback.
This is called after the slot has been soft or hard reset by the
platform. A soft reset consists of asserting the adapter #RST line STEP 4: Slot Reset
and then restoring the PCI BARs and PCI configuration header. If the ------------------
platform supports PCI hotplug, then it might instead perform a hard The platform performs a soft or hard reset of the device, and then
reset by toggling power on the slot off/on. This call gives drivers calls the slot_reset() callback.
the chance to re-initialize the hardware (re-download firmware, etc.),
but drivers shouldn't restart normal I/O processing operations at A soft reset consists of asserting the adapter #RST line and then
this point. (See note about interrupts; interrupts aren't guaranteed restoring the PCI BAR's and PCI configuration header to a state
to be delivered until the resume() callback has been called). If all that is equivalent to what it would be after a fresh system
device drivers report success on this callback, the patform will call power-on followed by power-on BIOS/system firmware initialization.
resume() to complete the error handling and let the driver restart If the platform supports PCI hotplug, then the reset might be
normal I/O processing. performed by toggling the slot electrical power off/on.
It is important for the platform to restore the PCI config space
to the "fresh poweron" state, rather than the "last state". After
a slot reset, the device driver will almost always use its standard
device initialization routines, and an unusual config space setup
may result in hung devices, kernel panics, or silent data corruption.
This call gives drivers the chance to re-initialize the hardware
(re-download firmware, etc.). At this point, the driver may assume
that he card is in a fresh state and is fully functional. In
particular, interrupt generation should work normally.
Drivers should not yet restart normal I/O processing operations
at this point. If all device drivers report success on this
callback, the platform will call resume() to complete the sequence,
and let the driver restart normal I/O processing.
A driver can still return a critical failure for this function if A driver can still return a critical failure for this function if
it can't get the device operational after reset. If the platform it can't get the device operational after reset. If the platform
previously tried a soft reset, it migh now try a hard reset (power previously tried a soft reset, it might now try a hard reset (power
cycle) and then call slot_reset() again. It the device still can't cycle) and then call slot_reset() again. It the device still can't
be recovered, there is nothing more that can be done; the platform be recovered, there is nothing more that can be done; the platform
will typically report a "permanent failure" in such a case. The will typically report a "permanent failure" in such a case. The
device will be considered "dead" in this case. device will be considered "dead" in this case.
Drivers for multi-function cards will need to coordinate among
themselves as to which driver instance will perform any "one-shot"
or global device initialization. For example, the Symbios sym53cxx2
driver performs device init only from PCI function 0:
+ if (PCI_FUNC(pdev->devfn) == 0)
+ sym_reset_scsi_bus(np, 0);
Result codes: Result codes:
- PCIERR_RESULT_DISCONNECT - PCI_ERS_RESULT_DISCONNECT
Same as above. Same as above.
>>> The current ppc64 implementation does not try a power-cycle reset Platform proceeds either to STEP 5 (Resume Operations) or STEP 6 (Permanent
>>> if the driver returned PCIERR_RESULT_DISCONNECT. However, it should. Failure).
5) resume() >>> The current powerpc implementation does not currently try a
>>> power-cycle reset if the driver returned PCI_ERS_RESULT_DISCONNECT.
>>> However, it probably should.
This is called if all drivers on the segment have returned
PCIERR_RESULT_RECOVERED from one of the 3 prevous callbacks.
That basically tells the driver to restart activity, tht everything
is back and running. No result code is taken into account here. If
a new error happens, it will restart a new error handling process.
That's it. I think this covers all the possibilities. The way those STEP 5: Resume Operations
callbacks are called is platform policy. A platform with no slot reset -------------------------
capability for example may want to just "ignore" drivers that can't The platform will call the resume() callback on all affected device
drivers if all drivers on the segment have returned
PCI_ERS_RESULT_RECOVERED from one of the 3 previous callbacks.
The goal of this callback is to tell the driver to restart activity,
that everything is back and running. This callback does not return
a result code.
At this point, if a new error happens, the platform will restart
a new error recovery sequence.
STEP 6: Permanent Failure
-------------------------
A "permanent failure" has occurred, and the platform cannot recover
the device. The platform will call error_detected() with a
pci_channel_state value of pci_channel_io_perm_failure.
The device driver should, at this point, assume the worst. It should
cancel all pending I/O, refuse all new I/O, returning -EIO to
higher layers. The device driver should then clean up all of its
memory and remove itself from kernel operations, much as it would
during system shutdown.
The platform will typically notify the system operator of the
permanent failure in some way. If the device is hotplug-capable,
the operator will probably want to remove and replace the device.
Note, however, not all failures are truly "permanent". Some are
caused by over-heating, some by a poorly seated card. Many
PCI error events are caused by software bugs, e.g. DMA's to
wild addresses or bogus split transactions due to programming
errors. See the discussion in powerpc/eeh-pci-error-recovery.txt
for additional detail on real-life experience of the causes of
software errors.
Conclusion; General Remarks
---------------------------
The way those callbacks are called is platform policy. A platform with
no slot reset capability may want to just "ignore" drivers that can't
recover (disconnect them) and try to let other cards on the same segment recover (disconnect them) and try to let other cards on the same segment
recover. Keep in mind that in most real life cases, though, there will recover. Keep in mind that in most real life cases, though, there will
be only one driver per segment. be only one driver per segment.
Now, there is a note about interrupts. If you get an interrupt and your Now, a note about interrupts. If you get an interrupt and your
device is dead or has been isolated, there is a problem :) device is dead or has been isolated, there is a problem :)
The current policy is to turn this into a platform policy.
After much thinking, I decided to leave that to the platform. That is, That is, the recovery API only requires that:
the recovery API only precies that:
- There is no guarantee that interrupt delivery can proceed from any - There is no guarantee that interrupt delivery can proceed from any
device on the segment starting from the error detection and until the device on the segment starting from the error detection and until the
restart callback is sent, at which point interrupts are expected to be resume callback is sent, at which point interrupts are expected to be
fully operational. fully operational.
- There is no guarantee that interrupt delivery is stopped, that is, ad - There is no guarantee that interrupt delivery is stopped, that is,
river that gets an interrupts after detecting an error, or that detects a driver that gets an interrupt after detecting an error, or that detects
and error within the interrupt handler such that it prevents proper an error within the interrupt handler such that it prevents proper
ack'ing of the interrupt (and thus removal of the source) should just ack'ing of the interrupt (and thus removal of the source) should just
return IRQ_NOTHANDLED. It's up to the platform to deal with taht return IRQ_NOTHANDLED. It's up to the platform to deal with that
condition, typically by masking the irq source during the duration of condition, typically by masking the IRQ source during the duration of
the error handling. It is expected that the platform "knows" which the error handling. It is expected that the platform "knows" which
interrupts are routed to error-management capable slots and can deal interrupts are routed to error-management capable slots and can deal
with temporarily disabling that irq number during error processing (this with temporarily disabling that IRQ number during error processing (this
isn't terribly complex). That means some IRQ latency for other devices isn't terribly complex). That means some IRQ latency for other devices
sharing the interrupt, but there is simply no other way. High end sharing the interrupt, but there is simply no other way. High end
platforms aren't supposed to share interrupts between many devices platforms aren't supposed to share interrupts between many devices
anyway :) anyway :)
>>> Implementation details for the powerpc platform are discussed in
>>> the file Documentation/powerpc/eeh-pci-error-recovery.txt
Revised: 31 May 2005 Linas Vepstas <linas@austin.ibm.com> >>> As of this writing, there are six device drivers with patches
>>> implementing error recovery. Not all of these patches are in
>>> mainline yet. These may be used as "examples":
>>>
>>> drivers/scsi/ipr.c
>>> drivers/scsi/sym53cxx_2
>>> drivers/next/e100.c
>>> drivers/net/e1000
>>> drivers/net/ixgb
>>> drivers/net/s2io.c
The End
-------

View File

@ -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>;

View File

@ -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
View 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.

View File

@ -42,4 +42,4 @@
41 -> Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile) [0070:9800,0070:9802] 41 -> Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile) [0070:9800,0070:9802]
42 -> digitalnow DNTV Live! DVB-T Pro [1822:0025] 42 -> digitalnow DNTV Live! DVB-T Pro [1822:0025]
43 -> KWorld/VStream XPert DVB-T with cx22702 [17de:08a1] 43 -> KWorld/VStream XPert DVB-T with cx22702 [17de:08a1]
44 -> DViCO FusionHDTV DVB-T Dual Digital [18ac:db50] 44 -> DViCO FusionHDTV DVB-T Dual Digital [18ac:db50,18ac:db54]

View File

@ -1,7 +1,7 @@
0 -> UNKNOWN/GENERIC 0 -> UNKNOWN/GENERIC
1 -> Proteus Pro [philips reference design] [1131:2001,1131:2001] 1 -> Proteus Pro [philips reference design] [1131:2001,1131:2001]
2 -> LifeView FlyVIDEO3000 [5168:0138,4e42:0138] 2 -> LifeView FlyVIDEO3000 [5168:0138,4e42:0138]
3 -> LifeView FlyVIDEO2000 [5168:0138] 3 -> LifeView/Typhoon FlyVIDEO2000 [5168:0138,4e42:0138]
4 -> EMPRESS [1131:6752] 4 -> EMPRESS [1131:6752]
5 -> SKNet Monster TV [1131:4e85] 5 -> SKNet Monster TV [1131:4e85]
6 -> Tevion MD 9717 6 -> Tevion MD 9717
@ -53,12 +53,12 @@
52 -> AverMedia AverTV/305 [1461:2108] 52 -> AverMedia AverTV/305 [1461:2108]
53 -> ASUS TV-FM 7135 [1043:4845] 53 -> ASUS TV-FM 7135 [1043:4845]
54 -> LifeView FlyTV Platinum FM [5168:0214,1489:0214] 54 -> LifeView FlyTV Platinum FM [5168:0214,1489:0214]
55 -> LifeView FlyDVB-T DUO [5168:0502,5168:0306] 55 -> LifeView FlyDVB-T DUO [5168:0306]
56 -> Avermedia AVerTV 307 [1461:a70a] 56 -> Avermedia AVerTV 307 [1461:a70a]
57 -> Avermedia AVerTV GO 007 FM [1461:f31f] 57 -> Avermedia AVerTV GO 007 FM [1461:f31f]
58 -> ADS Tech Instant TV (saa7135) [1421:0350,1421:0351,1421:0370,1421:1370] 58 -> ADS Tech Instant TV (saa7135) [1421:0350,1421:0351,1421:0370,1421:1370]
59 -> Kworld/Tevion V-Stream Xpert TV PVR7134 59 -> Kworld/Tevion V-Stream Xpert TV PVR7134
60 -> Typhoon DVB-T Duo Digital/Analog Cardbus [4e42:0502] 60 -> LifeView/Typhoon FlyDVB-T Duo Cardbus [5168:0502,4e42:0502]
61 -> Philips TOUGH DVB-T reference design [1131:2004] 61 -> Philips TOUGH DVB-T reference design [1131:2004]
62 -> Compro VideoMate TV Gold+II 62 -> Compro VideoMate TV Gold+II
63 -> Kworld Xpert TV PVR7134 63 -> Kworld Xpert TV PVR7134

View File

@ -40,6 +40,18 @@ APICs
no_timer_check Don't check the IO-APIC timer. This can work around no_timer_check Don't check the IO-APIC timer. This can work around
problems with incorrect timer initialization on some boards. problems with incorrect timer initialization on some boards.
apicmaintimer Run time keeping from the local APIC timer instead
of using the PIT/HPET interrupt for this. This is useful
when the PIT/HPET interrupts are unreliable.
noapicmaintimer Don't do time keeping using the APIC timer.
Useful when this option was auto selected, but doesn't work.
apicpmtimer
Do APIC timer calibration using the pmtimer. Implies
apicmaintimer. Useful when your PIT timer is totally
broken.
Early Console Early Console
syntax: earlyprintk=vga syntax: earlyprintk=vga

View File

@ -540,7 +540,8 @@ S: Supported
BTTV VIDEO4LINUX DRIVER BTTV VIDEO4LINUX DRIVER
P: Mauro Carvalho Chehab P: Mauro Carvalho Chehab
M: mchehab@brturbo.com.br M: mchehab@infradead.org
M: v4l-dvb-maintainer@linuxtv.org
L: video4linux-list@redhat.com L: video4linux-list@redhat.com
W: http://linuxtv.org W: http://linuxtv.org
T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git
@ -557,7 +558,8 @@ S: Supported
CONFIGFS CONFIGFS
P: Joel Becker P: Joel Becker
M: Joel Becker <joel.becker@oracle.com> M: joel.becker@oracle.com
L: linux-kernel@vger.kernel.org
S: Supported S: Supported
CIRRUS LOGIC GENERIC FBDEV DRIVER CIRRUS LOGIC GENERIC FBDEV DRIVER
@ -836,11 +838,12 @@ S: Maintained
DVB SUBSYSTEM AND DRIVERS DVB SUBSYSTEM AND DRIVERS
P: LinuxTV.org Project P: LinuxTV.org Project
M: linux-dvb-maintainer@linuxtv.org M: mchehab@infradead.org
M: v4l-dvb-maintainer@linuxtv.org
L: linux-dvb@linuxtv.org (subscription required) L: linux-dvb@linuxtv.org (subscription required)
W: http://linuxtv.org/ W: http://linuxtv.org/
T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git
S: Supported S: Maintained
EATA-DMA SCSI DRIVER EATA-DMA SCSI DRIVER
P: Michael Neuffer P: Michael Neuffer
@ -928,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
@ -1984,7 +1993,6 @@ M: philb@gnu.org
P: Tim Waugh P: Tim Waugh
M: tim@cyberelk.net M: tim@cyberelk.net
P: David Campbell P: David Campbell
M: campbell@torque.net
P: Andrea Arcangeli P: Andrea Arcangeli
M: andrea@suse.de M: andrea@suse.de
L: linux-parport@lists.infradead.org L: linux-parport@lists.infradead.org
@ -2298,7 +2306,7 @@ S: Supported
SELINUX SECURITY MODULE SELINUX SECURITY MODULE
P: Stephen Smalley P: Stephen Smalley
M: sds@epoch.ncsc.mil M: sds@tycho.nsa.gov
P: James Morris P: James Morris
M: jmorris@namei.org M: jmorris@namei.org
L: linux-kernel@vger.kernel.org (kernel issues) L: linux-kernel@vger.kernel.org (kernel issues)
@ -2956,7 +2964,8 @@ S: Maintained
VIDEO FOR LINUX VIDEO FOR LINUX
P: Mauro Carvalho Chehab P: Mauro Carvalho Chehab
M: mchehab@brturbo.com.br M: mchehab@infradead.org
M: v4l-dvb-maintainer@linuxtv.org
L: video4linux-list@redhat.com L: video4linux-list@redhat.com
W: http://linuxtv.org W: http://linuxtv.org
T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git

View File

@ -1,7 +1,7 @@
VERSION = 2 VERSION = 2
PATCHLEVEL = 6 PATCHLEVEL = 6
SUBLEVEL = 16 SUBLEVEL = 16
EXTRAVERSION =-rc1 EXTRAVERSION =-rc2
NAME=Sliding Snow Leopard NAME=Sliding Snow Leopard
# *DOCUMENTATION* # *DOCUMENTATION*
@ -442,7 +442,7 @@ export KBUILD_DEFCONFIG
config %config: scripts_basic outputmakefile FORCE config %config: scripts_basic outputmakefile FORCE
$(Q)mkdir -p include/linux $(Q)mkdir -p include/linux
$(Q)$(MAKE) $(build)=scripts/kconfig $@ $(Q)$(MAKE) $(build)=scripts/kconfig $@
$(Q)$(MAKE) .kernelrelease $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
else else
# =========================================================================== # ===========================================================================

View File

@ -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

View File

@ -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

View File

@ -85,7 +85,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
# CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_CO285 is not set
# CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_CAMELOT is not set
# CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_FOOTBRIDGE is not set
# CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_INTEGRATOR is not set
# CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IOP3XX is not set

View File

@ -85,7 +85,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
# CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_CO285 is not set
# CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_CAMELOT is not set
# CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_FOOTBRIDGE is not set
# CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_INTEGRATOR is not set
# CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IOP3XX is not set

View File

@ -85,7 +85,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
# CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_CO285 is not set
# CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_CAMELOT is not set
# CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_FOOTBRIDGE is not set
# CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_INTEGRATOR is not set
# CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IOP3XX is not set

View File

@ -85,7 +85,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
# CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_CO285 is not set
# CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_CAMELOT is not set
# CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_FOOTBRIDGE is not set
# CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_INTEGRATOR is not set
# CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IOP3XX is not set

View File

@ -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
# #

View File

@ -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
# #

View File

@ -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
# #

View File

@ -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
# #

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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);
}

View File

@ -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"

View File

@ -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] = {

View File

@ -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,

View File

@ -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)

View File

@ -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;
} }

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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()) {

View File

@ -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

View File

@ -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")

View File

@ -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")

View File

@ -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));

View File

@ -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

View File

@ -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();
}
} }

View File

@ -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")

View File

@ -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")

View File

@ -44,7 +44,7 @@ unsigned int get_clk_frequency_khz( int info)
/* Read clkcfg register: it has turbo, b, half-turbo (and f) */ /* Read clkcfg register: it has turbo, b, half-turbo (and f) */
asm( "mrc\tp14, 0, %0, c6, c0, 0" : "=r" (clkcfg) ); asm( "mrc\tp14, 0, %0, c6, c0, 0" : "=r" (clkcfg) );
t = clkcfg & (1 << 1); t = clkcfg & (1 << 0);
ht = clkcfg & (1 << 2); ht = clkcfg & (1 << 2);
b = clkcfg & (1 << 3); b = clkcfg & (1 << 3);

View File

@ -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;

View File

@ -10,9 +10,13 @@ obj-m :=
obj-n := obj-n :=
obj- := obj- :=
# S3C2400 support files
obj-$(CONFIG_CPU_S3C2400) += s3c2400-gpio.o
# S3C2410 support files # S3C2410 support files
obj-$(CONFIG_CPU_S3C2410) += s3c2410.o obj-$(CONFIG_CPU_S3C2410) += s3c2410.o
obj-$(CONFIG_CPU_S3C2410) += s3c2410-gpio.o
obj-$(CONFIG_S3C2410_DMA) += dma.o obj-$(CONFIG_S3C2410_DMA) += dma.o
# Power Management support # Power Management support
@ -25,6 +29,7 @@ obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o
obj-$(CONFIG_CPU_S3C2440) += s3c2440.o s3c2440-dsc.o obj-$(CONFIG_CPU_S3C2440) += s3c2440.o s3c2440-dsc.o
obj-$(CONFIG_CPU_S3C2440) += s3c2440-irq.o obj-$(CONFIG_CPU_S3C2440) += s3c2440-irq.o
obj-$(CONFIG_CPU_S3C2440) += s3c2440-clock.o obj-$(CONFIG_CPU_S3C2440) += s3c2440-clock.o
obj-$(CONFIG_CPU_S3C2440) += s3c2410-gpio.o
# bast extras # bast extras

View File

@ -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 */

View File

@ -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);

View File

@ -40,6 +40,7 @@
#include "cpu.h" #include "cpu.h"
#include "clock.h" #include "clock.h"
#include "s3c2400.h"
#include "s3c2410.h" #include "s3c2410.h"
#include "s3c2440.h" #include "s3c2440.h"
@ -55,6 +56,7 @@ struct cpu_table {
/* table of supported CPUs */ /* table of supported CPUs */
static const char name_s3c2400[] = "S3C2400";
static const char name_s3c2410[] = "S3C2410"; static const char name_s3c2410[] = "S3C2410";
static const char name_s3c2440[] = "S3C2440"; static const char name_s3c2440[] = "S3C2440";
static const char name_s3c2410a[] = "S3C2410A"; static const char name_s3c2410a[] = "S3C2410A";
@ -96,7 +98,16 @@ static struct cpu_table cpu_ids[] __initdata = {
.init_uarts = s3c2440_init_uarts, .init_uarts = s3c2440_init_uarts,
.init = s3c2440_init, .init = s3c2440_init,
.name = name_s3c2440a .name = name_s3c2440a
} },
{
.idcode = 0x0, /* S3C2400 doesn't have an idcode */
.idmask = 0xffffffff,
.map_io = s3c2400_map_io,
.init_clocks = s3c2400_init_clocks,
.init_uarts = s3c2400_init_uarts,
.init = s3c2400_init,
.name = name_s3c2400
},
}; };
/* minimal IO mapping */ /* minimal IO mapping */
@ -148,12 +159,15 @@ static struct cpu_table *cpu;
void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
{ {
unsigned long idcode; unsigned long idcode = 0x0;
/* initialise the io descriptors we need for initialisation */ /* initialise the io descriptors we need for initialisation */
iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
#ifndef CONFIG_CPU_S3C2400
idcode = __raw_readl(S3C2410_GSTATUS1); idcode = __raw_readl(S3C2410_GSTATUS1);
#endif
cpu = s3c_lookup_cpu(idcode); cpu = s3c_lookup_cpu(idcode);
if (cpu == NULL) { if (cpu == NULL) {

View File

@ -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,
} }

View File

@ -31,6 +31,7 @@
* 05-Nov-2004 BJD EXPORT_SYMBOL() added for all code * 05-Nov-2004 BJD EXPORT_SYMBOL() added for all code
* 13-Mar-2005 BJD Updates for __iomem * 13-Mar-2005 BJD Updates for __iomem
* 26-Oct-2005 BJD Added generic configuration types * 26-Oct-2005 BJD Added generic configuration types
* 15-Jan-2006 LCVR Added support for the S3C2400
*/ */
@ -48,7 +49,7 @@
void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function) void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function)
{ {
void __iomem *base = S3C2410_GPIO_BASE(pin); void __iomem *base = S3C24XX_GPIO_BASE(pin);
unsigned long mask; unsigned long mask;
unsigned long con; unsigned long con;
unsigned long flags; unsigned long flags;
@ -95,7 +96,7 @@ EXPORT_SYMBOL(s3c2410_gpio_cfgpin);
unsigned int s3c2410_gpio_getcfg(unsigned int pin) unsigned int s3c2410_gpio_getcfg(unsigned int pin)
{ {
void __iomem *base = S3C2410_GPIO_BASE(pin); void __iomem *base = S3C24XX_GPIO_BASE(pin);
unsigned long mask; unsigned long mask;
if (pin < S3C2410_GPIO_BANKB) { if (pin < S3C2410_GPIO_BANKB) {
@ -111,7 +112,7 @@ EXPORT_SYMBOL(s3c2410_gpio_getcfg);
void s3c2410_gpio_pullup(unsigned int pin, unsigned int to) void s3c2410_gpio_pullup(unsigned int pin, unsigned int to)
{ {
void __iomem *base = S3C2410_GPIO_BASE(pin); void __iomem *base = S3C24XX_GPIO_BASE(pin);
unsigned long offs = S3C2410_GPIO_OFFSET(pin); unsigned long offs = S3C2410_GPIO_OFFSET(pin);
unsigned long flags; unsigned long flags;
unsigned long up; unsigned long up;
@ -133,7 +134,7 @@ EXPORT_SYMBOL(s3c2410_gpio_pullup);
void s3c2410_gpio_setpin(unsigned int pin, unsigned int to) void s3c2410_gpio_setpin(unsigned int pin, unsigned int to)
{ {
void __iomem *base = S3C2410_GPIO_BASE(pin); void __iomem *base = S3C24XX_GPIO_BASE(pin);
unsigned long offs = S3C2410_GPIO_OFFSET(pin); unsigned long offs = S3C2410_GPIO_OFFSET(pin);
unsigned long flags; unsigned long flags;
unsigned long dat; unsigned long dat;
@ -152,7 +153,7 @@ EXPORT_SYMBOL(s3c2410_gpio_setpin);
unsigned int s3c2410_gpio_getpin(unsigned int pin) unsigned int s3c2410_gpio_getpin(unsigned int pin)
{ {
void __iomem *base = S3C2410_GPIO_BASE(pin); void __iomem *base = S3C24XX_GPIO_BASE(pin);
unsigned long offs = S3C2410_GPIO_OFFSET(pin); unsigned long offs = S3C2410_GPIO_OFFSET(pin);
return __raw_readl(base + 0x04) & (1<< offs); return __raw_readl(base + 0x04) & (1<< offs);
@ -166,70 +167,13 @@ unsigned int s3c2410_modify_misccr(unsigned int clear, unsigned int change)
unsigned long misccr; unsigned long misccr;
local_irq_save(flags); local_irq_save(flags);
misccr = __raw_readl(S3C2410_MISCCR); misccr = __raw_readl(S3C24XX_MISCCR);
misccr &= ~clear; misccr &= ~clear;
misccr ^= change; misccr ^= change;
__raw_writel(misccr, S3C2410_MISCCR); __raw_writel(misccr, S3C24XX_MISCCR);
local_irq_restore(flags); local_irq_restore(flags);
return misccr; return misccr;
} }
EXPORT_SYMBOL(s3c2410_modify_misccr); EXPORT_SYMBOL(s3c2410_modify_misccr);
int s3c2410_gpio_getirq(unsigned int pin)
{
if (pin < S3C2410_GPF0 || pin > S3C2410_GPG15_EINT23)
return -1; /* not valid interrupts */
if (pin < S3C2410_GPG0 && pin > S3C2410_GPF7)
return -1; /* not valid pin */
if (pin < S3C2410_GPF4)
return (pin - S3C2410_GPF0) + IRQ_EINT0;
if (pin < S3C2410_GPG0)
return (pin - S3C2410_GPF4) + IRQ_EINT4;
return (pin - S3C2410_GPG0) + IRQ_EINT8;
}
EXPORT_SYMBOL(s3c2410_gpio_getirq);
int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,
unsigned int config)
{
void __iomem *reg = S3C2410_EINFLT0;
unsigned long flags;
unsigned long val;
if (pin < S3C2410_GPG8 || pin > S3C2410_GPG15)
return -1;
config &= 0xff;
pin -= S3C2410_GPG8_EINT16;
reg += pin & ~3;
local_irq_save(flags);
/* update filter width and clock source */
val = __raw_readl(reg);
val &= ~(0xff << ((pin & 3) * 8));
val |= config << ((pin & 3) * 8);
__raw_writel(val, reg);
/* update filter enable */
val = __raw_readl(S3C2410_EXTINT2);
val &= ~(1 << ((pin * 4) + 3));
val |= on << ((pin * 4) + 3);
__raw_writel(val, S3C2410_EXTINT2);
local_irq_restore(flags);
return 0;
}
EXPORT_SYMBOL(s3c2410_gpio_irqfilter);

View File

@ -0,0 +1,45 @@
/* linux/arch/arm/mach-s3c2410/gpio.c
*
* Copyright (c) 2006 Lucas Correia Villa Real <lucasvr@gobolinux.org>
*
* S3C2400 GPIO support
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Changelog
* 15-Jan-2006 LCVR Splitted from gpio.c, adding support for the S3C2400
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/arch/regs-gpio.h>
int s3c2400_gpio_getirq(unsigned int pin)
{
if (pin < S3C2410_GPE0 || pin > S3C2400_GPE7_EINT7)
return -1; /* not valid interrupts */
return (pin - S3C2410_GPE0) + IRQ_EINT0;
}
EXPORT_SYMBOL(s3c2400_gpio_getirq);

View File

@ -0,0 +1,93 @@
/* linux/arch/arm/mach-s3c2410/gpio.c
*
* Copyright (c) 2004-2006 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
*
* S3C2410 GPIO support
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Changelog
* 15-Jan-2006 LCVR Splitted from gpio.c
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/arch/regs-gpio.h>
int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,
unsigned int config)
{
void __iomem *reg = S3C2410_EINFLT0;
unsigned long flags;
unsigned long val;
if (pin < S3C2410_GPG8 || pin > S3C2410_GPG15)
return -1;
config &= 0xff;
pin -= S3C2410_GPG8_EINT16;
reg += pin & ~3;
local_irq_save(flags);
/* update filter width and clock source */
val = __raw_readl(reg);
val &= ~(0xff << ((pin & 3) * 8));
val |= config << ((pin & 3) * 8);
__raw_writel(val, reg);
/* update filter enable */
val = __raw_readl(S3C2410_EXTINT2);
val &= ~(1 << ((pin * 4) + 3));
val |= on << ((pin * 4) + 3);
__raw_writel(val, S3C2410_EXTINT2);
local_irq_restore(flags);
return 0;
}
EXPORT_SYMBOL(s3c2410_gpio_irqfilter);
int s3c2410_gpio_getirq(unsigned int pin)
{
if (pin < S3C2410_GPF0 || pin > S3C2410_GPG15_EINT23)
return -1; /* not valid interrupts */
if (pin < S3C2410_GPG0 && pin > S3C2410_GPF7)
return -1; /* not valid pin */
if (pin < S3C2410_GPF4)
return (pin - S3C2410_GPF0) + IRQ_EINT0;
if (pin < S3C2410_GPG0)
return (pin - S3C2410_GPF4) + IRQ_EINT4;
return (pin - S3C2410_GPG0) + IRQ_EINT8;
}
EXPORT_SYMBOL(s3c2410_gpio_getirq);

View File

@ -72,7 +72,7 @@ ENTRY(s3c2410_cpu_suspend)
@@ prepare cpu to sleep @@ prepare cpu to sleep
ldr r4, =S3C2410_REFRESH ldr r4, =S3C2410_REFRESH
ldr r5, =S3C2410_MISCCR ldr r5, =S3C24XX_MISCCR
ldr r6, =S3C2410_CLKCON ldr r6, =S3C2410_CLKCON
ldr r7, [ r4 ] @ get REFRESH (and ensure in TLB) ldr r7, [ r4 ] @ get REFRESH (and ensure in TLB)
ldr r8, [ r5 ] @ get MISCCR (and ensure in TLB) ldr r8, [ r5 ] @ get MISCCR (and ensure in TLB)

View File

@ -92,22 +92,16 @@ ENTRY(v6_coherent_kern_range)
* - the Icache does not read data from the write buffer * - the Icache does not read data from the write buffer
*/ */
ENTRY(v6_coherent_user_range) ENTRY(v6_coherent_user_range)
bic r0, r0, #CACHE_LINE_SIZE - 1
1:
#ifdef HARVARD_CACHE #ifdef HARVARD_CACHE
mcr p15, 0, r0, c7, c10, 1 @ clean D line bic r0, r0, #CACHE_LINE_SIZE - 1
1: mcr p15, 0, r0, c7, c10, 1 @ clean D line
mcr p15, 0, r0, c7, c5, 1 @ invalidate I line mcr p15, 0, r0, c7, c5, 1 @ invalidate I line
#endif add r0, r0, #CACHE_LINE_SIZE
mcr p15, 0, r0, c7, c5, 7 @ invalidate BTB entry
add r0, r0, #BTB_FLUSH_SIZE
mcr p15, 0, r0, c7, c5, 7 @ invalidate BTB entry
add r0, r0, #BTB_FLUSH_SIZE
mcr p15, 0, r0, c7, c5, 7 @ invalidate BTB entry
add r0, r0, #BTB_FLUSH_SIZE
mcr p15, 0, r0, c7, c5, 7 @ invalidate BTB entry
add r0, r0, #BTB_FLUSH_SIZE
cmp r0, r1 cmp r0, r1
blo 1b blo 1b
#endif
mcr p15, 0, r0, c7, c5, 6 @ invalidate BTB
#ifdef HARVARD_CACHE #ifdef HARVARD_CACHE
mov r0, #0 mov r0, #0
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer mcr p15, 0, r0, c7, c10, 4 @ drain write buffer

View File

@ -241,7 +241,15 @@ ENTRY(xscale_flush_user_cache_range)
* it also trashes the mini I-cache used by JTAG debuggers. * it also trashes the mini I-cache used by JTAG debuggers.
*/ */
ENTRY(xscale_coherent_kern_range) ENTRY(xscale_coherent_kern_range)
/* FALLTHROUGH */ bic r0, r0, #CACHELINESIZE - 1
1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
add r0, r0, #CACHELINESIZE
cmp r0, r1
blo 1b
mov r0, #0
mcr p15, 0, r0, c7, c5, 0 @ Invalidate I cache & BTB
mcr p15, 0, r0, c7, c10, 4 @ Drain Write (& Fill) Buffer
mov pc, lr
/* /*
* coherent_user_range(start, end) * coherent_user_range(start, end)
@ -252,18 +260,16 @@ ENTRY(xscale_coherent_kern_range)
* *
* - start - virtual start address * - start - virtual start address
* - end - virtual end address * - end - virtual end address
*
* Note: single I-cache line invalidation isn't used here since
* it also trashes the mini I-cache used by JTAG debuggers.
*/ */
ENTRY(xscale_coherent_user_range) ENTRY(xscale_coherent_user_range)
bic r0, r0, #CACHELINESIZE - 1 bic r0, r0, #CACHELINESIZE - 1
1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
mcr p15, 0, r0, c7, c5, 1 @ Invalidate I cache entry
add r0, r0, #CACHELINESIZE add r0, r0, #CACHELINESIZE
cmp r0, r1 cmp r0, r1
blo 1b blo 1b
mov r0, #0 mov r0, #0
mcr p15, 0, r0, c7, c5, 0 @ Invalidate I cache & BTB mcr p15, 0, r0, c7, c5, 6 @ Invalidate BTB
mcr p15, 0, r0, c7, c10, 4 @ Drain Write (& Fill) Buffer mcr p15, 0, r0, c7, c10, 4 @ Drain Write (& Fill) Buffer
mov pc, lr mov pc, lr

View File

@ -137,8 +137,9 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
if (spec) { if (spec) {
init_MUTEX(&op_arm_sem); init_MUTEX(&op_arm_sem);
if (spec->init() < 0) ret = spec->init();
return -ENODEV; if (ret < 0)
return ret;
op_arm_model = spec; op_arm_model = spec;
init_driverfs(); init_driverfs();

View File

@ -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...

View File

@ -119,7 +119,7 @@ $(SRC_ARCH)/.links:
@ln -sfn $(SRC_ARCH)/$(SARCH)/lib $(SRC_ARCH)/lib @ln -sfn $(SRC_ARCH)/$(SARCH)/lib $(SRC_ARCH)/lib
@ln -sfn $(SRC_ARCH)/$(SARCH) $(SRC_ARCH)/arch @ln -sfn $(SRC_ARCH)/$(SARCH) $(SRC_ARCH)/arch
@ln -sfn $(SRC_ARCH)/$(SARCH)/vmlinux.lds.S $(SRC_ARCH)/kernel/vmlinux.lds.S @ln -sfn $(SRC_ARCH)/$(SARCH)/vmlinux.lds.S $(SRC_ARCH)/kernel/vmlinux.lds.S
@ln -sfn $(SRC_ARCH)/$(SARCH)/asm-offsets.c $(SRC_ARCH)/kernel/asm-offsets.c @ln -sfn $(SRC_ARCH)/$(SARCH)/kernel/asm-offsets.c $(SRC_ARCH)/kernel/asm-offsets.c
@touch $@ @touch $@
# Create link to sub arch includes # Create link to sub arch includes

View File

@ -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;
} }

View File

@ -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;

View File

@ -442,6 +442,7 @@ config HIGHMEM4G
config HIGHMEM64G config HIGHMEM64G
bool "64GB" bool "64GB"
depends on X86_CMPXCHG64
help help
Select this if you have a 32-bit processor and more than 4 Select this if you have a 32-bit processor and more than 4
gigabytes of physical RAM. gigabytes of physical RAM.

View File

@ -248,10 +248,17 @@ acpi_parse_lapic(acpi_table_entry_header * header, const unsigned long end)
acpi_table_print_madt_entry(header); acpi_table_print_madt_entry(header);
/* Register even disabled CPUs for cpu hotplug */ /* Record local apic id only when enabled */
if (processor->flags.enabled)
x86_acpiid_to_apicid[processor->acpi_id] = processor->id; x86_acpiid_to_apicid[processor->acpi_id] = processor->id;
/*
* We need to register disabled CPU as well to permit
* counting disabled CPUs. This allows us to size
* cpus_possible_map more accurately, to permit
* to not preallocating memory for all NR_CPUS
* when we use CPU hotplug.
*/
mp_register_lapic(processor->id, /* APIC ID */ mp_register_lapic(processor->id, /* APIC ID */
processor->flags.enabled); /* Enabled? */ processor->flags.enabled); /* Enabled? */

View File

@ -75,8 +75,10 @@ void ack_bad_irq(unsigned int irq)
* holds up an irq slot - in excessive cases (when multiple * holds up an irq slot - in excessive cases (when multiple
* unexpected vectors occur) that might lock up the APIC * unexpected vectors occur) that might lock up the APIC
* completely. * completely.
* But only ack when the APIC is enabled -AK
*/ */
ack_APIC_irq(); if (cpu_has_apic)
ack_APIC_irq();
} }
void __init apic_intr_init(void) void __init apic_intr_init(void)
@ -1303,6 +1305,7 @@ int __init APIC_init_uniprocessor (void)
if (!cpu_has_apic && APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) { if (!cpu_has_apic && APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) {
printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n", printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n",
boot_cpu_physical_apicid); boot_cpu_physical_apicid);
clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability);
return -1; return -1;
} }

View File

@ -282,3 +282,11 @@ int __init amd_init_cpu(void)
} }
//early_arch_initcall(amd_init_cpu); //early_arch_initcall(amd_init_cpu);
static int __init amd_exit_cpu(void)
{
cpu_devs[X86_VENDOR_AMD] = NULL;
return 0;
}
late_initcall(amd_exit_cpu);

View File

@ -470,3 +470,11 @@ int __init centaur_init_cpu(void)
} }
//early_arch_initcall(centaur_init_cpu); //early_arch_initcall(centaur_init_cpu);
static int __init centaur_exit_cpu(void)
{
cpu_devs[X86_VENDOR_CENTAUR] = NULL;
return 0;
}
late_initcall(centaur_exit_cpu);

View File

@ -44,6 +44,7 @@ static void default_init(struct cpuinfo_x86 * c)
static struct cpu_dev default_cpu = { static struct cpu_dev default_cpu = {
.c_init = default_init, .c_init = default_init,
.c_vendor = "Unknown",
}; };
static struct cpu_dev * this_cpu = &default_cpu; static struct cpu_dev * this_cpu = &default_cpu;
@ -150,6 +151,7 @@ static void __devinit get_cpu_vendor(struct cpuinfo_x86 *c, int early)
{ {
char *v = c->x86_vendor_id; char *v = c->x86_vendor_id;
int i; int i;
static int printed;
for (i = 0; i < X86_VENDOR_NUM; i++) { for (i = 0; i < X86_VENDOR_NUM; i++) {
if (cpu_devs[i]) { if (cpu_devs[i]) {
@ -159,10 +161,17 @@ static void __devinit get_cpu_vendor(struct cpuinfo_x86 *c, int early)
c->x86_vendor = i; c->x86_vendor = i;
if (!early) if (!early)
this_cpu = cpu_devs[i]; this_cpu = cpu_devs[i];
break; return;
} }
} }
} }
if (!printed) {
printed++;
printk(KERN_ERR "CPU: Vendor unknown, using generic init.\n");
printk(KERN_ERR "CPU: Your system may be unstable.\n");
}
c->x86_vendor = X86_VENDOR_UNKNOWN;
this_cpu = &default_cpu;
} }

View File

@ -345,7 +345,7 @@ static void __init init_cyrix(struct cpuinfo_x86 *c)
/* /*
* Handle National Semiconductor branded processors * Handle National Semiconductor branded processors
*/ */
static void __devinit init_nsc(struct cpuinfo_x86 *c) static void __init init_nsc(struct cpuinfo_x86 *c)
{ {
/* There may be GX1 processors in the wild that are branded /* There may be GX1 processors in the wild that are branded
* NSC and not Cyrix. * NSC and not Cyrix.
@ -444,6 +444,14 @@ int __init cyrix_init_cpu(void)
//early_arch_initcall(cyrix_init_cpu); //early_arch_initcall(cyrix_init_cpu);
static int __init cyrix_exit_cpu(void)
{
cpu_devs[X86_VENDOR_CYRIX] = NULL;
return 0;
}
late_initcall(cyrix_exit_cpu);
static struct cpu_dev nsc_cpu_dev __initdata = { static struct cpu_dev nsc_cpu_dev __initdata = {
.c_vendor = "NSC", .c_vendor = "NSC",
.c_ident = { "Geode by NSC" }, .c_ident = { "Geode by NSC" },
@ -458,3 +466,11 @@ int __init nsc_init_cpu(void)
} }
//early_arch_initcall(nsc_init_cpu); //early_arch_initcall(nsc_init_cpu);
static int __init nsc_exit_cpu(void)
{
cpu_devs[X86_VENDOR_NSC] = NULL;
return 0;
}
late_initcall(nsc_exit_cpu);

View File

@ -152,6 +152,7 @@ static int __cpuinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_le
return 0; return 0;
} }
/* will only be called once; __init is safe here */
static int __init find_num_cache_leaves(void) static int __init find_num_cache_leaves(void)
{ {
unsigned int eax, ebx, ecx, edx; unsigned int eax, ebx, ecx, edx;

View File

@ -61,3 +61,11 @@ int __init nexgen_init_cpu(void)
} }
//early_arch_initcall(nexgen_init_cpu); //early_arch_initcall(nexgen_init_cpu);
static int __init nexgen_exit_cpu(void)
{
cpu_devs[X86_VENDOR_NEXGEN] = NULL;
return 0;
}
late_initcall(nexgen_exit_cpu);

View File

@ -51,3 +51,11 @@ int __init rise_init_cpu(void)
} }
//early_arch_initcall(rise_init_cpu); //early_arch_initcall(rise_init_cpu);
static int __init rise_exit_cpu(void)
{
cpu_devs[X86_VENDOR_RISE] = NULL;
return 0;
}
late_initcall(rise_exit_cpu);

View File

@ -84,7 +84,7 @@ static void __init init_transmeta(struct cpuinfo_x86 *c)
#endif #endif
} }
static void transmeta_identify(struct cpuinfo_x86 * c) static void __init transmeta_identify(struct cpuinfo_x86 * c)
{ {
u32 xlvl; u32 xlvl;
generic_identify(c); generic_identify(c);
@ -111,3 +111,11 @@ int __init transmeta_init_cpu(void)
} }
//early_arch_initcall(transmeta_init_cpu); //early_arch_initcall(transmeta_init_cpu);
static int __init transmeta_exit_cpu(void)
{
cpu_devs[X86_VENDOR_TRANSMETA] = NULL;
return 0;
}
late_initcall(transmeta_exit_cpu);

View File

@ -31,3 +31,11 @@ int __init umc_init_cpu(void)
} }
//early_arch_initcall(umc_init_cpu); //early_arch_initcall(umc_init_cpu);
static int __init umc_exit_cpu(void)
{
cpu_devs[X86_VENDOR_UMC] = NULL;
return 0;
}
late_initcall(umc_exit_cpu);

View File

@ -138,7 +138,7 @@ static int __init check_nmi_watchdog(void)
if (nmi_watchdog == NMI_LOCAL_APIC) if (nmi_watchdog == NMI_LOCAL_APIC)
smp_call_function(nmi_cpu_busy, (void *)&endflag, 0, 0); smp_call_function(nmi_cpu_busy, (void *)&endflag, 0, 0);
for (cpu = 0; cpu < NR_CPUS; cpu++) for_each_cpu(cpu)
prev_nmi_count[cpu] = per_cpu(irq_stat, cpu).__nmi_count; prev_nmi_count[cpu] = per_cpu(irq_stat, cpu).__nmi_count;
local_irq_enable(); local_irq_enable();
mdelay((10*1000)/nmi_hz); // wait 10 ticks mdelay((10*1000)/nmi_hz); // wait 10 ticks

View File

@ -297,8 +297,10 @@ void show_regs(struct pt_regs * regs)
if (user_mode(regs)) if (user_mode(regs))
printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp); printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
printk(" EFLAGS: %08lx %s (%s)\n", printk(" EFLAGS: %08lx %s (%s %.*s)\n",
regs->eflags, print_tainted(), system_utsname.release); regs->eflags, print_tainted(), system_utsname.release,
(int)strcspn(system_utsname.version, " "),
system_utsname.version);
printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n", printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
regs->eax,regs->ebx,regs->ecx,regs->edx); regs->eax,regs->ebx,regs->ecx,regs->edx);
printk("ESI: %08lx EDI: %08lx EBP: %08lx", printk("ESI: %08lx EDI: %08lx EBP: %08lx",

View File

@ -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 */

View File

@ -166,7 +166,8 @@ static void show_trace_log_lvl(struct task_struct *task,
stack = (unsigned long*)context->previous_esp; stack = (unsigned long*)context->previous_esp;
if (!stack) if (!stack)
break; break;
printk(KERN_EMERG " =======================\n"); printk(log_lvl);
printk(" =======================\n");
} }
} }
@ -239,9 +240,11 @@ void show_registers(struct pt_regs *regs)
} }
print_modules(); print_modules();
printk(KERN_EMERG "CPU: %d\nEIP: %04x:[<%08lx>] %s VLI\n" printk(KERN_EMERG "CPU: %d\nEIP: %04x:[<%08lx>] %s VLI\n"
"EFLAGS: %08lx (%s) \n", "EFLAGS: %08lx (%s %.*s) \n",
smp_processor_id(), 0xffff & regs->xcs, regs->eip, smp_processor_id(), 0xffff & regs->xcs, regs->eip,
print_tainted(), regs->eflags, system_utsname.release); print_tainted(), regs->eflags, system_utsname.release,
(int)strcspn(system_utsname.version, " "),
system_utsname.version);
print_symbol(KERN_EMERG "EIP is at %s\n", regs->eip); print_symbol(KERN_EMERG "EIP is at %s\n", regs->eip);
printk(KERN_EMERG "eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n", printk(KERN_EMERG "eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n",
regs->eax, regs->ebx, regs->ecx, regs->edx); regs->eax, regs->ebx, regs->ecx, regs->edx);

View File

@ -49,7 +49,9 @@ dump_backtrace(struct frame_head * head)
* | stack | * | stack |
* --------------- saved regs->ebp value if valid (frame_head address) * --------------- saved regs->ebp value if valid (frame_head address)
* . . * . .
* --------------- struct pt_regs stored on stack (struct pt_regs *) * --------------- saved regs->rsp value if x86_64
* | |
* --------------- struct pt_regs * stored on stack if 32-bit
* | | * | |
* . . * . .
* | | * | |
@ -57,13 +59,26 @@ dump_backtrace(struct frame_head * head)
* | | * | |
* | | \/ Lower addresses * | | \/ Lower addresses
* *
* Thus, &pt_regs <-> stack base restricts the valid(ish) ebp values * Thus, regs (or regs->rsp for x86_64) <-> stack base restricts the
* valid(ish) ebp values. Note: (1) for x86_64, NMI and several other
* exceptions use special stacks, maintained by the interrupt stack table
* (IST). These stacks are set up in trap_init() in
* arch/x86_64/kernel/traps.c. Thus, for x86_64, regs now does not point
* to the kernel stack; instead, it points to some location on the NMI
* stack. On the other hand, regs->rsp is the stack pointer saved when the
* NMI occurred. (2) For 32-bit, regs->esp is not valid because the
* processor does not save %esp on the kernel stack when interrupts occur
* in the kernel mode.
*/ */
#ifdef CONFIG_FRAME_POINTER #ifdef CONFIG_FRAME_POINTER
static int valid_kernel_stack(struct frame_head * head, struct pt_regs * regs) static int valid_kernel_stack(struct frame_head * head, struct pt_regs * regs)
{ {
unsigned long headaddr = (unsigned long)head; unsigned long headaddr = (unsigned long)head;
#ifdef CONFIG_X86_64
unsigned long stack = (unsigned long)regs->rsp;
#else
unsigned long stack = (unsigned long)regs; unsigned long stack = (unsigned long)regs;
#endif
unsigned long stack_base = (stack & ~(THREAD_SIZE - 1)) + THREAD_SIZE; unsigned long stack_base = (stack & ~(THREAD_SIZE - 1)) + THREAD_SIZE;
return headaddr > stack && headaddr < stack_base; return headaddr > stack && headaddr < stack_base;

View File

@ -194,7 +194,6 @@ config IA64_L1_CACHE_SHIFT
default "7" if MCKINLEY default "7" if MCKINLEY
default "6" if ITANIUM default "6" if ITANIUM
# align cache-sensitive data to 64 bytes
config IA64_CYCLONE config IA64_CYCLONE
bool "Cyclone (EXA) Time Source support" bool "Cyclone (EXA) Time Source support"
help help
@ -374,6 +373,9 @@ config IA64_PALINFO
To use this option, you have to ensure that the "/proc file system To use this option, you have to ensure that the "/proc file system
support" (CONFIG_PROC_FS) is enabled, too. support" (CONFIG_PROC_FS) is enabled, too.
config SGI_SN
def_bool y if (IA64_SGI_SN2 || IA64_GENERIC)
source "drivers/firmware/Kconfig" source "drivers/firmware/Kconfig"
source "fs/Kconfig.binfmt" source "fs/Kconfig.binfmt"

View File

@ -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)
{ {

View File

@ -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';
} }

View File

@ -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
;; ;;

View File

@ -14,6 +14,7 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/string.h> #include <linux/string.h>
#include <asm/delay.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/sal.h> #include <asm/sal.h>
#include <asm/pal.h> #include <asm/pal.h>
@ -214,6 +215,78 @@ chk_nointroute_opt(void)
static void __init sal_desc_ap_wakeup(void *p) { } static void __init sal_desc_ap_wakeup(void *p) { }
#endif #endif
/*
* HP rx5670 firmware polls for interrupts during SAL_CACHE_FLUSH by reading
* cr.ivr, but it never writes cr.eoi. This leaves any interrupt marked as
* "in-service" and masks other interrupts of equal or lower priority.
*
* HP internal defect reports: F1859, F2775, F3031.
*/
static int sal_cache_flush_drops_interrupts;
static void __init
check_sal_cache_flush (void)
{
unsigned long flags, itv;
int cpu;
u64 vector;
cpu = get_cpu();
local_irq_save(flags);
/*
* Schedule a timer interrupt, wait until it's reported, and see if
* SAL_CACHE_FLUSH drops it.
*/
itv = ia64_get_itv();
BUG_ON((itv & (1 << 16)) == 0);
ia64_set_itv(IA64_TIMER_VECTOR);
ia64_set_itm(ia64_get_itc() + 1000);
while (!ia64_get_irr(IA64_TIMER_VECTOR))
cpu_relax();
ia64_sal_cache_flush(3);
if (ia64_get_irr(IA64_TIMER_VECTOR)) {
vector = ia64_get_ivr();
ia64_eoi();
WARN_ON(vector != IA64_TIMER_VECTOR);
} else {
sal_cache_flush_drops_interrupts = 1;
printk(KERN_ERR "SAL: SAL_CACHE_FLUSH drops interrupts; "
"PAL_CACHE_FLUSH will be used instead\n");
ia64_eoi();
}
ia64_set_itv(itv);
local_irq_restore(flags);
put_cpu();
}
s64
ia64_sal_cache_flush (u64 cache_type)
{
struct ia64_sal_retval isrv;
if (sal_cache_flush_drops_interrupts) {
unsigned long flags;
u64 progress;
s64 rc;
progress = 0;
local_irq_save(flags);
rc = ia64_pal_cache_flush(cache_type,
PAL_CACHE_FLUSH_INVALIDATE, &progress, NULL);
local_irq_restore(flags);
return rc;
}
SAL_CALL(isrv, SAL_CACHE_FLUSH, cache_type, 0, 0, 0, 0, 0, 0);
return isrv.status;
}
void __init void __init
ia64_sal_init (struct ia64_sal_systab *systab) ia64_sal_init (struct ia64_sal_systab *systab)
{ {
@ -262,6 +335,8 @@ ia64_sal_init (struct ia64_sal_systab *systab)
} }
p += SAL_DESC_SIZE(*p); p += SAL_DESC_SIZE(*p);
} }
check_sal_cache_flush();
} }
int int

View File

@ -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();

View File

@ -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;
}

View File

@ -71,31 +71,33 @@ static int __init topology_init(void)
int i, err = 0; int i, err = 0;
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
sysfs_nodes = kmalloc(sizeof(struct node) * MAX_NUMNODES, GFP_KERNEL); sysfs_nodes = kzalloc(sizeof(struct node) * MAX_NUMNODES, GFP_KERNEL);
if (!sysfs_nodes) { if (!sysfs_nodes) {
err = -ENOMEM; err = -ENOMEM;
goto out; goto out;
} }
memset(sysfs_nodes, 0, sizeof(struct node) * MAX_NUMNODES);
/* MCD - Do we want to register all ONLINE nodes, or all POSSIBLE nodes? */ /*
for_each_online_node(i) * MCD - Do we want to register all ONLINE nodes, or all POSSIBLE nodes?
*/
for_each_online_node(i) {
if ((err = register_node(&sysfs_nodes[i], i, 0))) if ((err = register_node(&sysfs_nodes[i], i, 0)))
goto out; goto out;
}
#endif #endif
sysfs_cpus = kmalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL); sysfs_cpus = kzalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL);
if (!sysfs_cpus) { if (!sysfs_cpus) {
err = -ENOMEM; err = -ENOMEM;
goto out; goto out;
} }
memset(sysfs_cpus, 0, sizeof(struct ia64_cpu) * NR_CPUS);
for_each_present_cpu(i) for_each_present_cpu(i) {
if((err = arch_register_cpu(i))) if((err = arch_register_cpu(i)))
goto out; goto out;
}
out: out:
return err; return err;
} }
__initcall(topology_init); subsys_initcall(topology_init);

View File

@ -9,6 +9,4 @@
# Makefile for the sn ia64 subplatform # Makefile for the sn ia64 subplatform
# #
CPPFLAGS += -I$(srctree)/arch/ia64/sn/include
obj-y += kernel/ pci/ obj-y += kernel/ pci/

View File

@ -7,6 +7,8 @@
# Copyright (C) 1999,2001-2005 Silicon Graphics, Inc. All Rights Reserved. # Copyright (C) 1999,2001-2005 Silicon Graphics, Inc. All Rights Reserved.
# #
CPPFLAGS += -I$(srctree)/arch/ia64/sn/include
obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \ obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \
huberror.o io_init.o iomv.o klconflib.o sn2/ huberror.o io_init.o iomv.o klconflib.o sn2/
obj-$(CONFIG_IA64_GENERIC) += machvec.o obj-$(CONFIG_IA64_GENERIC) += machvec.o

View File

@ -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-2005 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
*/ */
#include <linux/config.h> #include <linux/config.h>
@ -186,18 +186,13 @@ retry_bteop:
/* Initialize the notification to a known value. */ /* Initialize the notification to a known value. */
*bte->most_rcnt_na = BTE_WORD_BUSY; *bte->most_rcnt_na = BTE_WORD_BUSY;
notif_phys_addr = TO_PHYS(ia64_tpa((unsigned long)bte->most_rcnt_na)); notif_phys_addr = (u64)bte->most_rcnt_na;
if (is_shub2()) {
src = SH2_TIO_PHYS_TO_DMA(src);
dest = SH2_TIO_PHYS_TO_DMA(dest);
notif_phys_addr = SH2_TIO_PHYS_TO_DMA(notif_phys_addr);
}
/* Set the source and destination registers */ /* Set the source and destination registers */
BTE_PRINTKV(("IBSA = 0x%lx)\n", (TO_PHYS(src)))); BTE_PRINTKV(("IBSA = 0x%lx)\n", src));
BTE_SRC_STORE(bte, TO_PHYS(src)); BTE_SRC_STORE(bte, src);
BTE_PRINTKV(("IBDA = 0x%lx)\n", (TO_PHYS(dest)))); BTE_PRINTKV(("IBDA = 0x%lx)\n", dest));
BTE_DEST_STORE(bte, TO_PHYS(dest)); BTE_DEST_STORE(bte, dest);
/* Set the notification register */ /* Set the notification register */
BTE_PRINTKV(("IBNA = 0x%lx)\n", notif_phys_addr)); BTE_PRINTKV(("IBNA = 0x%lx)\n", notif_phys_addr));

View File

@ -208,7 +208,7 @@ static s64 sn_device_fixup_war(u64 nasid, u64 widget, int device,
* sn_fixup_ionodes() - This routine initializes the HUB data strcuture for * sn_fixup_ionodes() - This routine initializes the HUB data strcuture for
* each node in the system. * each node in the system.
*/ */
static void sn_fixup_ionodes(void) static void __init sn_fixup_ionodes(void)
{ {
struct sn_flush_device_kernel *sn_flush_device_kernel; struct sn_flush_device_kernel *sn_flush_device_kernel;
struct sn_flush_device_kernel *dev_entry; struct sn_flush_device_kernel *dev_entry;
@ -467,6 +467,13 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
pcidev_info->pdi_sn_irq_info = NULL; pcidev_info->pdi_sn_irq_info = NULL;
kfree(sn_irq_info); kfree(sn_irq_info);
} }
/*
* MSI currently not supported on altix. Remove this when
* the MSI abstraction patches are integrated into the kernel
* (sometime after 2.6.16 releases)
*/
dev->no_msi = 1;
} }
/* /*

View File

@ -5,11 +5,12 @@
* 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-2005 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
*/ */
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/init.h>
#include <asm/sn/addrs.h> #include <asm/sn/addrs.h>
#include <asm/sn/arch.h> #include <asm/sn/arch.h>
#include <asm/sn/intr.h> #include <asm/sn/intr.h>
@ -76,17 +77,15 @@ static void sn_enable_irq(unsigned int irq)
static void sn_ack_irq(unsigned int irq) static void sn_ack_irq(unsigned int irq)
{ {
u64 event_occurred, mask = 0; u64 event_occurred, mask;
irq = irq & 0xff; irq = irq & 0xff;
event_occurred = event_occurred = HUB_L((u64*)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED));
HUB_L((u64*)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED));
mask = event_occurred & SH_ALL_INT_MASK; mask = event_occurred & SH_ALL_INT_MASK;
HUB_S((u64*)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), HUB_S((u64*)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), mask);
mask);
__set_bit(irq, (volatile void *)pda->sn_in_service_ivecs); __set_bit(irq, (volatile void *)pda->sn_in_service_ivecs);
move_irq(irq); move_native_irq(irq);
} }
static void sn_end_irq(unsigned int irq) static void sn_end_irq(unsigned int irq)
@ -219,9 +218,8 @@ static void register_intr_pda(struct sn_irq_info *sn_irq_info)
pdacpu(cpu)->sn_last_irq = irq; pdacpu(cpu)->sn_last_irq = irq;
} }
if (pdacpu(cpu)->sn_first_irq == 0 || pdacpu(cpu)->sn_first_irq > irq) { if (pdacpu(cpu)->sn_first_irq == 0 || pdacpu(cpu)->sn_first_irq > irq)
pdacpu(cpu)->sn_first_irq = irq; pdacpu(cpu)->sn_first_irq = irq;
}
} }
static void unregister_intr_pda(struct sn_irq_info *sn_irq_info) static void unregister_intr_pda(struct sn_irq_info *sn_irq_info)
@ -289,7 +287,7 @@ void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info)
list_add_rcu(&sn_irq_info->list, sn_irq_lh[sn_irq_info->irq_irq]); list_add_rcu(&sn_irq_info->list, sn_irq_lh[sn_irq_info->irq_irq]);
spin_unlock(&sn_irq_info_lock); spin_unlock(&sn_irq_info_lock);
(void)register_intr_pda(sn_irq_info); register_intr_pda(sn_irq_info);
} }
void sn_irq_unfixup(struct pci_dev *pci_dev) void sn_irq_unfixup(struct pci_dev *pci_dev)
@ -419,7 +417,7 @@ void sn_lb_int_war_check(void)
rcu_read_unlock(); rcu_read_unlock();
} }
void sn_irq_lh_init(void) void __init sn_irq_lh_init(void)
{ {
int i; int i;
@ -434,5 +432,4 @@ void sn_irq_lh_init(void)
INIT_LIST_HEAD(sn_irq_lh[i]); INIT_LIST_HEAD(sn_irq_lh[i]);
} }
} }

Some files were not shown because too many files have changed in this diff Show More