diff -Nru a/Documentation/DocBook/gadget.tmpl b/Documentation/DocBook/gadget.tmpl
--- a/Documentation/DocBook/gadget.tmpl Wed Jul 2 14:00:05 2003
+++ b/Documentation/DocBook/gadget.tmpl Wed Jul 2 14:00:05 2003
@@ -6,31 +6,32 @@
02 June 2003
- Permission is granted to copy, distribute, and/or modify
- this document under the terms of the GNU Free Documentation
- License, version 1.2, or any later version published by the
- Free Software Foundation; with the Invariant Sections being
- the "GNU Free Documentation License",
- no Front-Cover Texts,
- and
- no Back-Cover Texts.
-
-
- This documentation 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 Free Documentation License for more details.
-
-
- Note that certain sections of this document are merged
- into Linux kernel source code.
- That content is the bulk of
- and
- ,
- where the "GNU Free Documentation License" is identified
- as an alternate licence for its documentation.
-
-
+
+ This documentation 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
+
+
+
+ For more details see the file COPYING in the source
+ distribution of Linux.
+ 2003
@@ -325,9 +326,10 @@
of one or more "packets", and packet boundaries are visible to drivers.
Compared to RS-232 serial protocols, USB resembles
synchronous protocols like HDLC
-(N bytes per frame, multipoint addressing from the host)
+(N bytes per frame, multipoint addressing, host as the primary
+station and devices as secondary stations)
more than asynchronous ones
-(tty style, like 8 bytes, no parity, one stop bit).
+(tty style: 8 data bits per frame, no parity, one stop bit).
So for example the controller drivers won't buffer
two single byte writes into a single two-byte USB IN packet,
although gadget drivers may do so when they implement
@@ -527,438 +529,6 @@
-
-
-GNU Free Documentation License
-Version 1.2, November 2002
-
-
- Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
-59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-
-
-PREAMBLE
-
-The purpose of this License is to make a manual, textbook, or
-other functional and useful document "free" in the sense of freedom: to
-assure everyone the effective freedom to copy and redistribute it, with
-or without modifying it, either commercially or noncommercially.
-Secondarily, this License preserves for the author and publisher a way
-to get credit for their work, while not being considered responsible for
-modifications made by others.
-
-This License is a kind of "copyleft", which means that derivative
-works of the document must themselves be free in the same sense. It
-complements the GNU General Public License, which is a copyleft license
-designed for free software.
-
-We have designed this License in order to use it for manuals for
-free software, because free software needs free documentation: a free
-program should come with manuals providing the same freedoms that the
-software does. But this License is not limited to software manuals; it
-can be used for any textual work, regardless of subject matter or
-whether it is published as a printed book. We recommend this License
-principally for works whose purpose is instruction or reference.
-
-
-APPLICABILITY AND DEFINITIONS
-
-This License applies to any manual or other work, in
-any medium, that contains a notice placed by the copyright holder saying
-it can be distributed under the terms of this License. Such a notice
-grants a world-wide, royalty-free license, unlimited in duration, to use
-that work under the conditions stated herein. The "Document", below,
-refers to any such manual or work. Any member of the public is a
-licensee, and is addressed as "you". You accept the license if you
-copy, modify or distribute the work in a way requiring permission under
-copyright law.
-
-A "Modified Version" of the Document means any
-work containing the Document or a portion of it, either copied verbatim,
-or with modifications and/or translated into another language.
-
-A "Secondary Section" is a named appendix or
-a front-matter section of the Document that deals exclusively with the
-relationship of the publishers or authors of the Document to the
-Document's overall subject (or to related matters) and contains nothing
-that could fall directly within that overall subject. (Thus, if the
-Document is in part a textbook of mathematics, a Secondary Section may
-not explain any mathematics.) The relationship could be a matter of
-historical connection with the subject or with related matters, or of
-legal, commercial, philosophical, ethical or political position
-regarding them.
-
-The "Invariant Sections" are certain Secondary
-Sections whose titles are designated, as being those of Invariant
-Sections, in the notice that says that the Document is released under
-this License. If a section does not fit the above definition of
-Secondary then it is not allowed to be designated as Invariant. The
-Document may contain zero Invariant Sections. If the Document does not
-identify any Invariant Sections then there are none.
-
-The "Cover Texts" are certain short passages of
-text that are listed, as Front-Cover Texts or Back-Cover Texts, in the
-notice that says that the Document is released under this License. A
-Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at
-most 25 words.
-
-A "Transparent" copy of the Document means a
-machine-readable copy, represented in a format whose specification is
-available to the general public, that is suitable for revising the
-document straightforwardly with generic text editors or (for images
-composed of pixels) generic paint programs or (for drawings) some widely
-available drawing editor, and that is suitable for input to text
-formatters or for automatic translation to a variety of formats suitable
-for input to text formatters. A copy made in an otherwise Transparent
-file format whose markup, or absence of markup, has been arranged to
-thwart or discourage subsequent modification by readers is not
-Transparent. An image format is not Transparent if used for any
-substantial amount of text. A copy that is not "Transparent" is called
-"Opaque".
-
-Examples of suitable formats for Transparent copies include plain
-ASCII without markup, Texinfo input format, LaTeX input format, SGML or
-XML using a publicly available DTD, and standard-conforming simple HTML,
-PostScript or PDF designed for human modification. Examples of
-transparent image formats include PNG, XCF and JPG. Opaque formats
-include proprietary formats that can be read and edited only by
-proprietary word processors, SGML or XML for which the DTD and/or
-processing tools are not generally available, and the machine-generated
-HTML, PostScript or PDF produced by some word processors for output
-purposes only.
-
-The "Title Page" means, for a printed book,
-the title page itself, plus such following pages as are needed to hold,
-legibly, the material this License requires to appear in the title page.
-For works in formats which do not have any title page as such, "Title
-Page" means the text near the most prominent appearance of the work's
-title, preceding the beginning of the body of the text.
-
-A section "Entitled XYZ" means a named subunit
-of the Document whose title either is precisely XYZ or contains XYZ in
-parentheses following text that translates XYZ in another language.
-(Here XYZ stands for a specific section name mentioned below, such as
-"Acknowledgements", "Dedications", "Endorsements", or "History".) To
-"Preserve the Title" of such a section when you modify the Document
-means that it remains a section "Entitled XYZ" according to this
-definition.
-
-The Document may include Warranty Disclaimers next to the notice
-which states that this License applies to the Document. These Warranty
-Disclaimers are considered to be included by reference in this License,
-but only as regards disclaiming warranties: any other implication that
-these Warranty Disclaimers may have is void and has no effect on the
-meaning of this License.
-
-
-VERBATIM COPYING
-
-You may copy and distribute the Document in any medium, either
-commercially or noncommercially, provided that this License, the
-copyright notices, and the license notice saying this License applies to
-the Document are reproduced in all copies, and that you add no other
-conditions whatsoever to those of this License. You may not use
-technical measures to obstruct or control the reading or further copying
-of the copies you make or distribute. However, you may accept
-compensation in exchange for copies. If you distribute a large enough
-number of copies you must also follow the conditions in section 3.
-
-
-You may also lend copies, under the same conditions stated above,
-and you may publicly display copies.
-
-
-COPYING IN QUANTITY
-
-If you publish printed copies (or copies in media that commonly
-have printed covers) of the Document, numbering more than 100, and the
-Document's license notice requires Cover Texts, you must enclose the
-copies in covers that carry, clearly and legibly, all these Cover Texts:
-Front-Cover Texts on the front cover, and Back-Cover Texts on the back
-cover. Both covers must also clearly and legibly identify you as the
-publisher of these copies. The front cover must present the full title
-with all words of the title equally prominent and visible. You may add
-other material on the covers in addition. Copying with changes limited
-to the covers, as long as they preserve the title of the Document and
-satisfy these conditions, can be treated as verbatim copying in other
-respects.
-
-If the required texts for either cover are too voluminous to fit
-legibly, you should put the first ones listed (as many as fit
-reasonably) on the actual cover, and continue the rest onto adjacent
-pages.
-
-If you publish or distribute Opaque copies of the Document
-numbering more than 100, you must either include a machine-readable
-Transparent copy along with each Opaque copy, or state in or with each
-Opaque copy a computer-network location from which the general
-network-using public has access to download using public-standard
-network protocols a complete Transparent copy of the Document, free of
-added material. If you use the latter option, you must take reasonably
-prudent steps, when you begin distribution of Opaque copies in quantity,
-to ensure that this Transparent copy will remain thus accessible at the
-stated location until at least one year after the last time you
-distribute an Opaque copy (directly or through your agents or retailers)
-of that edition to the public.
-
-It is requested, but not required, that you contact the authors of
-the Document well before redistributing any large number of copies, to
-give them a chance to provide you with an updated version of the
-Document.
-
-
-MODIFICATIONS
-
-You may copy and distribute a Modified Version of the Document
-under the conditions of sections 2 and 3 above, provided that you
-release the Modified Version under precisely this License, with the
-Modified Version filling the role of the Document, thus licensing
-distribution and modification of the Modified Version to whoever
-possesses a copy of it. In addition, you must do these things in the
-Modified Version:
-
-
-Use in the Title Page (and on the covers, if any) a
- title distinct from that of the Document, and from those of previous
- versions (which should, if there were any, be listed in the History
- section of the Document). You may use the same title as a previous
- version if the original publisher of that version gives permission.
-
-List on the Title Page, as authors, one or more
- persons or entities responsible for authorship of the modifications in
- the Modified Version, together with at least five of the principal
- authors of the Document (all of its principal authors, if it has fewer
- than five), unless they release you from this requirement.
-
-State on the Title page the name of the publisher of
- the Modified Version, as the publisher.
-Preserve all the copyright notices of the Document.
-
-Add an appropriate copyright notice for your
- modifications adjacent to the other copyright notices.
-
-Include, immediately after the copyright notices, a
- license notice giving the public permission to use the Modified
- Version under the terms of this License, in the form shown in the
- Addendum below.
-
-Preserve in that license notice the full lists of
- Invariant Sections and required Cover Texts given in the Document's
- license notice.
-Include an unaltered copy of this License.
-
-Preserve the section Entitled "History", Preserve its
- Title, and add to it an item stating at least the title, year, new
- authors, and publisher of the Modified Version as given on the Title
- Page. If there is no section Entitled "History" in the Document,
- create one stating the title, year, authors, and publisher of the
- Document as given on its Title Page, then add an item describing the
- Modified Version as stated in the previous sentence.
-
-Preserve the network location, if any, given in the
- Document for public access to a Transparent copy of the Document, and
- likewise the network locations given in the Document for previous
- versions it was based on. These may be placed in the "History"
- section. You may omit a network location for a work that was
- published at least four years before the Document itself, or if the
- original publisher of the version it refers to gives permission.
-
-For any section Entitled "Acknowledgements" or
- "Dedications", Preserve the Title of the section, and preserve in the
- section all the substance and tone of each of the contributor
- acknowledgements and/or dedications given therein.
-
-Preserve all the Invariant Sections of the Document,
- unaltered in their text and in their titles. Section numbers or the
- equivalent are not considered part of the section titles.
-
-Delete any section Entitled "Endorsements".
- Such a section may not be included in the Modified Version.
-
-Do not retitle any existing section to be Entitled
- "Endorsements" or to conflict in title with any Invariant Section.
-
-Preserve any Warranty Disclaimers.
-
-
-
-If the Modified Version includes new front-matter sections or
-appendices that qualify as Secondary Sections and contain no material
-copied from the Document, you may at your option designate some or all
-of these sections as invariant. To do this, add their titles to the
-list of Invariant Sections in the Modified Version's license notice.
-These titles must be distinct from any other section titles.
-
-You may add a section Entitled "Endorsements", provided it
-contains nothing but endorsements of your Modified Version by various
-parties--for example, statements of peer review or that the text has
-been approved by an organization as the authoritative definition of a
-standard.
-
-You may add a passage of up to five words as a Front-Cover Text,
-and a passage of up to 25 words as a Back-Cover Text, to the end of the
-list of Cover Texts in the Modified Version. Only one passage of
-Front-Cover Text and one of Back-Cover Text may be added by (or through
-arrangements made by) any one entity. If the Document already includes
-a cover text for the same cover, previously added by you or by
-arrangement made by the same entity you are acting on behalf of, you may
-not add another; but you may replace the old one, on explicit permission
-from the previous publisher that added the old one.
-
-The author(s) and publisher(s) of the Document do not by this
-License give permission to use their names for publicity for or to
-assert or imply endorsement of any Modified Version.
-
-
-COMBINING DOCUMENTS
-
-You may combine the Document with other documents released under
-this License, under the terms defined in section
-4 above for modified versions, provided that you include in the
-combination all of the Invariant Sections of all of the original
-documents, unmodified, and list them all as Invariant Sections of your
-combined work in its license notice, and that you preserve all their
-Warranty Disclaimers.
-
-The combined work need only contain one copy of this License, and
-multiple identical Invariant Sections may be replaced with a single
-copy. If there are multiple Invariant Sections with the same name but
-different contents, make the title of each such section unique by adding
-at the end of it, in parentheses, the name of the original author or
-publisher of that section if known, or else a unique number. Make the
-same adjustment to the section titles in the list of Invariant Sections
-in the license notice of the combined work.
-
-In the combination, you must combine any sections Entitled
-"History" in the various original documents, forming one section
-Entitled "History"; likewise combine any sections Entitled
-"Acknowledgements", and any sections Entitled "Dedications". You must
-delete all sections Entitled "Endorsements".
-
-
-COLLECTIONS OF DOCUMENTS
-
-You may make a collection consisting of the Document and other
-documents released under this License, and replace the individual copies
-of this License in the various documents with a single copy that is
-included in the collection, provided that you follow the rules of this
-License for verbatim copying of each of the documents in all other
-respects.
-
-You may extract a single document from such a collection, and
-distribute it individually under this License, provided you insert a
-copy of this License into the extracted document, and follow this
-License in all other respects regarding verbatim copying of that
-document.
-
-
-AGGREGATION WITH INDEPENDENT WORKS
-
-A compilation of the Document or its derivatives with other
-separate and independent documents or works, in or on a volume of a
-storage or distribution medium, is called an "aggregate" if the
-copyright resulting from the compilation is not used to limit the legal
-rights of the compilation's users beyond what the individual works
-permit. When the Document is included an aggregate, this License does
-not apply to the other works in the aggregate which are not themselves
-derivative works of the Document.
-
-If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one half of
-the entire aggregate, the Document's Cover Texts may be placed on covers
-that bracket the Document within the aggregate, or the electronic
-equivalent of covers if the Document is in electronic form. Otherwise
-they must appear on printed covers that bracket the whole
-aggregate.
-
-
-TRANSLATION
-
-Translation is considered a kind of modification, so you may
-distribute translations of the Document under the terms of section 4.
-Replacing Invariant Sections with translations requires special
-permission from their copyright holders, but you may include
-translations of some or all Invariant Sections in addition to the
-original versions of these Invariant Sections. You may include a
-translation of this License, and all the license notices in the
-Document, and any Warranty Disclaimers, provided that you also include
-the original English version of this License and the original versions
-of those notices and disclaimers. In case of a disagreement between the
-translation and the original version of this License or a notice or
-disclaimer, the original version will prevail.
-
-If a section in the Document is Entitled "Acknowledgements",
-"Dedications", or "History", the requirement (section 4) to Preserve its
-Title (section 1) will typically require changing the actual
-title.
-
-
-TERMINATION
-
-You may not copy, modify, sublicense, or distribute the Document
-except as expressly provided for under this License. Any other attempt
-to copy, modify, sublicense or distribute the Document is void, and will
-automatically terminate your rights under this License. However,
-parties who have received copies, or rights, from you under this License
-will not have their licenses terminated so long as such parties remain
-in full compliance.
-
-
-FUTURE REVISIONS OF THIS LICENSE
-
-The Free Software Foundation may publish new, revised versions of
-the GNU Free Documentation License from time to time. Such new versions
-will be similar in spirit to the present version, but may differ in
-detail to address new problems or concerns. See
-http://www.gnu.org/copyleft/.
-
-Each version of the License is given a distinguishing version
-number. If the Document specifies that a particular numbered version of
-this License "or any later version" applies to it, you have the option
-of following the terms and conditions either of that specified version
-or of any later version that has been published (not as a draft) by the
-Free Software Foundation. If the Document does not specify a version
-number of this License, you may choose any version ever published (not
-as a draft) by the Free Software Foundation.
-
-
-ADDENDUM: How to use this License for
- your documents
-
-To use this License in a document you have written, include a copy
-of the License in the document and put the following copyright and
-license notices just after the title page:
-
-
- Copyright (c) YEAR YOUR NAME.
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.2
- or any later version published by the Free Software Foundation;
- with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
- A copy of the license is included in the section entitled "GNU
- Free Documentation License".
-
-
-If you have Invariant Sections, Front-Cover Texts and Back-Cover
-Texts, replace the "with...Texts." line with this:
-
-
- with the Invariant Sections being LIST THEIR TITLES, with the
- Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
-
-
-If you have Invariant Sections without Cover Texts, or some other
-combination of the three, merge those two alternatives to suit the
-situation.
-
-If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of free
-software license, such as the GNU General Public License, to permit
-their use in free software.
-
-
+===-------------------=========--------------------===------
+scsi_host_alloc() -->
scsi_add_host() --------+
|
- slave_alloc()
+ slave_alloc()
slave_configure() --> scsi_adjust_queue_depth()
- |
- slave_alloc()
+ |
+ slave_alloc()
slave_configure()
- |
- slave_alloc() **
- slave_destroy() **
+ |
+ slave_alloc() ***
+ slave_destroy() ***
+------------------------------------------------------------
If the LLD wants to adjust the default queue settings, it can invoke
scsi_adjust_queue_depth() in its slave_configure() routine.
-** For scsi devices that the mid level tries to scan but do not
- respond, a slave_alloc(), slave_destroy() pair is called.
+*** For scsi devices that the mid level tries to scan but do not
+ respond, a slave_alloc(), slave_destroy() pair is called.
-Here is the corresponding sequence when a host (HBA) is being
-removed:
+When a HBA is being removed is could as part of an orderly shutdown
+associated with the LLD module being unloaded (e.g. with the "rmmod"
+command) or in response to a "hot unplug" indicated by sysfs()'s
+remove() callback being invoked. In either case, the sequence is the
+same:
-[HBA REMOVE]
+ HBA REMOVE: assume 2 SCSI devices attached
LLD mid level LLD
---- --------- ---
+===----------------------=========-----------------===------
scsi_remove_host() ---------+
|
slave_destroy()
slave_destroy()
- release() --> scsi_unregister()
+scsi_host_put()
+------------------------------------------------------------
+
+It may be useful for a LLD to keep track of struct Scsi_Host instances
+(a pointer is returned by scsi_host_alloc()). Such instances are "owned"
+by the mid-level. struct Scsi_Host instances are freed from
+scsi_host_put() when the reference count hits zero.
+
+Hot unplugging a HBA that controls a disk which is processing SCSI
+commands on a mounted file system is an interesting situation. Reference
+counting logic is being introduced into the mid level to cope with many
+of the issues involved. See the section on reference counting below.
+
+
+The hotplug concept may be extended to SCSI devices. Currently, when a
+HBA is added, the scsi_add_host() function causes a scan for SCSI devices
+attached to the HBA's SCSI transport. On newer SCSI transports the HBA
+may become aware of a new SCSI device _after_ the scan has completed.
+A LLD can use this sequence to make the mid level aware of a SCSI device:
-It is practical for a LLD to keep track of struct Scsi_Host instances
-(a pointer is returned by scsi_register() ) and struct scsi_device
-instances (a pointer is passed as the parameter to slave_alloc() and
-slave_configure() ). Both classes of instances are "owned" by the
-mid-level. struct scsi_device instances are freed after slave_destroy().
-struct Scsi_Host instances are freed within scsi_unregister().
-
-TODO:
-Descriptions, are the following correct?
-[DEVICE hotplug]
+ SCSI DEVICE hotplug
LLD mid level LLD
---- --------- ---
+===-------------------=========--------------------===------
scsi_add_device() ------+
|
- slave_alloc()
+ slave_alloc()
slave_configure() [--> scsi_adjust_queue_depth()]
+------------------------------------------------------------
-[DEVICE unplug]
+In a similar fashion, a LLD may become aware that a SCSI device has been
+removed (unplugged) or the connection to it has been interrupted. Some
+existing SCSI transports (e.g. SPI) may not become aware that a SCSI
+device has been removed until a subsequent SCSI command fails which will
+probably cause that device to be set offline by the mid level. A LLD that
+detects the removal of a SCSI device can instigate its removal from
+upper layers with this sequence:
+
+ SCSI DEVICE hot unplug
LLD mid level LLD
---- --------- ---
+===----------------------=========-----------------===------
scsi_set_device_offline()
scsi_remove_device() -------+
|
slave_destroy()
+------------------------------------------------------------
+It may be useful for a LLD to keep track of struct scsi_device instances
+(a pointer is passed as the parameter to slave_alloc() and
+slave_configure() callbacks). Such instances are "owned" by the mid-level.
+struct scsi_device instances are freed after slave_destroy().
Passive initialization model
============================
-LLD initialization (both built-in and module) and shutdown are "wired
-up" by passing function pointers to the module_init() and module_exit()
-macros respectively. In this model the function identified by "module_init"
-must call scsi_register_host() and the function identified by "module_exit"
-must call scsi_unregister_host().
-Most LLDs inherited from the lk 2.4 series include a file called
-"scsi_module.c" [yes the ".c" is a little surprising] in their
-source code. For that file to work a declaration like this is needed before
-it is included:
- static struct SHT driver_template = DRIVER_TEMPLATE;
+These older LLDs include a file called "scsi_module.c" [yes the ".c" is a
+little surprising] in their source code. For that file to work an
+instance of struct scsi_host_template with the name "driver_template"
+needs to be defined. Here is a typical code sequence used in this model:
+ static struct scsi_host_template driver_template = {
+ ...
+ };
#include "scsi_module.c"
-In this case "DRIVER_TEMPLATE" is defined to be a structure initializer
-that is placed in the driver header file by convention. It contains
-pointers to supported interface functions and other values.
+The scsi_module.c file contains two functions:
+ - init_this_scsi_driver() which is executed when the LLD is
+ initialized (i.e. boot time or module load time)
+ - exit_this_scsi_driver() which is executed when the LLD is shut
+ down (i.e. module unload time)
+Note: since these functions are tagged with __init and __exit qualifiers
+a LLD should not call them explicitly (since the kernel does that).
Here is an example of an initialization sequence when two hosts are
detected (so detect() returns 2) and the SCSI bus scan on each host
finds 1 SCSI device (and a second device does not respond).
LLD mid level LLD
---- --------- ---
-scsi_register_host() -------+
+===----------------------=========-----------------===------
+init_this_scsi_driver() ----+
|
detect() -----------------+
| |
| scsi_register()
| scsi_register()
|
- slave_alloc()
+ slave_alloc()
slave_configure() --> scsi_adjust_queue_depth()
- slave_alloc() **
- slave_destroy() **
+ slave_alloc() ***
+ slave_destroy() ***
|
- slave_alloc()
+ slave_alloc()
slave_configure()
- slave_alloc() **
- slave_destroy() **
+ slave_alloc() ***
+ slave_destroy() ***
+------------------------------------------------------------
The mid level invokes scsi_adjust_queue_depth() with tagged queuing off and
"cmd_per_lun" for that host as the queue length. These settings can be
overridden by a slave_configure() supplied by the LLD.
-** For scsi devices that the mid level tries to scan but do not
- respond, a slave_alloc(), slave_destroy() pair is called.
+*** For scsi devices that the mid level tries to scan but do not
+ respond, a slave_alloc(), slave_destroy() pair is called.
Here is a LLD shutdown sequence:
LLD mid level LLD
---- --------- ---
-scsi_unregister_host() -----+
+===----------------------=========-----------------===------
+exit_this_scsi_driver() ----+
|
slave_destroy()
release() --> scsi_unregister()
|
slave_destroy()
release() --> scsi_unregister()
+------------------------------------------------------------
-slave_destroy() is optional.
+A LLD need not define slave_destroy() (i.e. it is optional).
The shortcoming of the "passive initialization model" is that host
registration and de-registration are (typically) tied to LLD initialization
and shutdown. Once the LLD is initialized then a new host that appears
(e.g. via hotplugging) cannot easily be added without a redundant
-driver shutdown and re-initialization.
+driver shutdown and re-initialization. It may be possible to write a LLD
+that uses both initialization models.
+
+
+Reference Counting
+==================
+The Scsi_Host structure has had reference counting infrastructure added.
+This effectively spreads the ownership of struct Scsi_Host instances
+across the various SCSI layers which use them. Previously such instances
+were exclusively owned by the mid level. LLDs would not usually need to
+directly manipulate these reference counts but there may be some cases
+where they do.
+
+There are 3 reference counting functions of interest associated with
+struct Scsi_Host:
+ - scsi_host_alloc(): returns a pointer to new instance of struct
+ Scsi_Host which has its reference count ^^ set to 1
+ - scsi_host_get(): adds 1 to the reference count of the given instance
+ - scsi_host_put(): decrements 1 from the reference count of the given
+ instance. If the reference count reaches 0 then the given instance
+ is freed
+
+^^ struct Scsi_Host actually has 2 reference counts which are manipulated
+in parallel by these functions.
Conventions
===========
-First, Linus's thoughts on C coding can be found in the file
-Documentation/CodingStyle .
+First, Linus Torvald's thoughts on C coding style can be found in the
+Documentation/CodingStyle file.
Next, there is a movement to "outlaw" typedefs introducing synonyms for
-struct tags. Both can be still found in the SCSI subsystem, for example:
-"typedef struct SHT { ...} Scsi_Host_Template;" in hosts.h . In this
-case "struct SHT" is preferred to "Scsi_Host_Template". [The poor naming
-example was chosen with malevolent intent.]
+struct tags. Both can be still found in the SCSI subsystem, but
+the typedefs have been moved to a single file, scsi_typedefs.h to
+make their future removal easier, for example:
+"typedef struct scsi_host_template Scsi_Host_Template;"
Also, C99 enhancements are encouraged to the extent they are supported
by the relevant gcc compilers. So "//" style comments are encouraged
@@ -304,9 +358,11 @@
scsi_bios_ptable - return copy of block device's partition table
scsi_block_requests - prevent further commands being queued to given host
scsi_delete_timer - cancel timer on a SCSI command.
+ scsi_host_alloc - return a new scsi_host instance whose refcount==1
+ scsi_host_get - increments Scsi_Host instance's refcount
+ scsi_host_put - decrements Scsi_Host instance's refcount (free if 0)
scsi_partsize - parse partition table into cylinders, heads + sectors
scsi_register - create and register a scsi host adapter instance.
- scsi_register_host - register a low level host driver
scsi_remove_device - detach and remove a SCSI device
scsi_remove_host - detach and remove all SCSI devices owned by host
scsi_report_bus_reset - report scsi _bus_ reset observed
@@ -316,8 +372,8 @@
scsi_to_sbus_dma_dir - convert SCSI subsystem direction flag to SBUS
scsi_track_queue_full - track successive QUEUE_FULL events
scsi_unblock_requests - allow further commands to be queued to given host
- scsi_unregister - unregister and free memory used by host instance
- scsi_unregister_host - unregister a low level host adapter driver
+ scsi_unregister - [calls scsi_host_put()]
+
Details:
@@ -329,17 +385,17 @@
* @lun: logical unit number
*
* Returns pointer to new struct scsi_device instance or
- * ERR_PTR(-ENODEV) (or some other bent pointer) if something is
- * wrong (e.g. no lu responds at given address)
+ * ERR_PTR(-ENODEV) (or some other bent pointer) if something is
+ * wrong (e.g. no lu responds at given address)
*
- * Notes: This call is usually performed internally during a scsi
- * bus scan when a HBA is added (i.e. scsi_add_host()). So it
- * should only be called if the HBA becomes aware of a new scsi
- * device (lu) after scsi_add_host() has completed. If successful
- * this call we lead to slave_alloc() and slave_configure() callbacks
- * into the LLD.
+ * Notes: This call is usually performed internally during a scsi
+ * bus scan when a HBA is added (i.e. scsi_add_host()). So it
+ * should only be called if the HBA becomes aware of a new scsi
+ * device (lu) after scsi_add_host() has completed. If successful
+ * this call we lead to slave_alloc() and slave_configure() callbacks
+ * into the LLD.
*
- * Defined in: drivers/scsi/scsi_scan.c
+ * Defined in: drivers/scsi/scsi_scan.c
**/
struct scsi_device * scsi_add_device(struct Scsi_Host *shost,
unsigned int channel,
@@ -353,10 +409,10 @@
*
* Returns 0 on success, negative errno of failure (e.g. -ENOMEM)
*
- * Notes: Only required in "hotplug initialization model" after a
- * successful call to scsi_register().
+ * Notes: Only required in "hotplug initialization model" after a
+ * successful call to scsi_host_alloc().
*
- * Defined in: drivers/scsi/hosts.c
+ * Defined in: drivers/scsi/hosts.c
**/
int scsi_add_host(struct Scsi_Host *shost, struct device * dev)
@@ -369,40 +425,40 @@
*
* Returns nothing
*
- * Notes: Each scsi command has its own timer, and as it is added
- * to the queue, we set up the timer. When the command completes,
+ * Notes: Each scsi command has its own timer, and as it is added
+ * to the queue, we set up the timer. When the command completes,
* we cancel the timer. A LLD can use this function to change
- * the existing timeout value.
+ * the existing timeout value.
*
- * Defined in: drivers/scsi/scsi_error.c
+ * Defined in: drivers/scsi/scsi_error.c
**/
-void scsi_add_timer(Scsi_Cmnd *scmd, int timeout, void (*complete)
- (Scsi_Cmnd *))
+void scsi_add_timer(struct scsi_cmnd *scmd, int timeout,
+ void (*complete)(struct scsi_cmnd *))
/**
* scsi_adjust_queue_depth - change the queue depth on a SCSI device
- * @SDpnt: pointer to SCSI device to change queue depth on
- * @tagged: 0 - no tagged queuing
- * MSG_SIMPLE_TAG - simple (unordered) tagged queuing
- * MSG_ORDERED_TAG - ordered tagged queuing
- * @tags Number of tags allowed if tagged queuing enabled,
- * or number of commands the LLD can queue up
- * in non-tagged mode (as per cmd_per_lun).
- *
- * Returns nothing
- *
- * Notes: Can be invoked any time on a SCSI device controlled by this
- * LLD. [Specifically during and after slave_configure() and prior to
- * slave_destroy().] Can safely be invoked from interrupt code. Actual
- * queue depth change may be delayed until the next command is being
- * processed.
+ * @SDpnt: pointer to SCSI device to change queue depth on
+ * @tagged: 0 - no tagged queuing
+ * MSG_SIMPLE_TAG - simple (unordered) tagged queuing
+ * MSG_ORDERED_TAG - ordered tagged queuing
+ * @tags Number of tags allowed if tagged queuing enabled,
+ * or number of commands the LLD can queue up
+ * in non-tagged mode (as per cmd_per_lun).
*
- * Defined in: drivers/scsi/scsi.c [see source code for more notes]
+ * Returns nothing
+ *
+ * Notes: Can be invoked any time on a SCSI device controlled by this
+ * LLD. [Specifically during and after slave_configure() and prior to
+ * slave_destroy().] Can safely be invoked from interrupt code. Actual
+ * queue depth change may be delayed until the next command is being
+ * processed.
+ *
+ * Defined in: drivers/scsi/scsi.c [see source code for more notes]
*
**/
void scsi_adjust_queue_depth(struct scsi_device * SDpnt, int tagged,
- int num_tags)
+ int num_tags)
/**
@@ -419,13 +475,13 @@
/**
* scsi_bios_ptable - return copy of block device's partition table
- * @dev: pointer to block device
+ * @dev: pointer to block device
*
- * Returns pointer to partition table, or NULL for failure
+ * Returns pointer to partition table, or NULL for failure
*
- * Notes: Caller owns memory returned (free with kfree() )
+ * Notes: Caller owns memory returned (free with kfree() )
*
- * Defined in: drivers/scsi/scsicam.c
+ * Defined in: drivers/scsi/scsicam.c
**/
unsigned char *scsi_bios_ptable(struct block_device *dev)
@@ -435,12 +491,12 @@
*
* @SHpnt: pointer to host to block commands on
*
- * Returns nothing
+ * Returns nothing
*
- * Notes: There is no timer nor any other means by which the requests
- * get unblocked other than the LLD calling scsi_unblock_requests().
+ * Notes: There is no timer nor any other means by which the requests
+ * get unblocked other than the LLD calling scsi_unblock_requests().
*
- * Defined in: drivers/scsi/scsi_lib.c
+ * Defined in: drivers/scsi/scsi_lib.c
**/
void scsi_block_requests(struct Scsi_Host * SHpnt)
@@ -450,15 +506,64 @@
* @scmd: pointer to scsi command instance
*
* Returns 1 if able to cancel timer else 0 (i.e. too late or already
- * cancelled).
+ * cancelled).
+ *
+ * Notes: All commands issued by upper levels already have a timeout
+ * associated with them. A LLD can use this function to cancel the
+ * timer.
*
- * Notes: All commands issued by upper levels already have a timeout
- * associated with them. A LLD can use this function to cancel the
- * timer.
+ * Defined in: drivers/scsi/scsi_error.c
+ **/
+int scsi_delete_timer(struct scsi_cmnd *scmd)
+
+
+/**
+ * scsi_host_alloc - create and register a scsi host adapter instance.
+ * @shost_tp: pointer to scsi host template
+ * @xtr_bytes: extra bytes to allocate in hostdata array (which is the
+ * last member of the returned Scsi_Host instance)
*
- * Defined in: drivers/scsi/scsi_error.c
+ * Returns pointer to new Scsi_Host instance or NULL on failure
+ *
+ * Notes: When this call returns to the LLDD, the SCSI bus scan on
+ * this host has _not_ yet been done.
+ * The hostdata array (by default zero length) is a per host scratch
+ * area for the LLD.
+ * Both associated refcounting objects have there refcount set to 1.
+ *
+ * Defined in: drivers/scsi/hosts.c .
**/
-int scsi_delete_timer(Scsi_Cmnd *scmd)
+struct Scsi_Host * scsi_host_alloc(struct scsi_host_template *, int xtr_bytes)
+
+
+/**
+ * scsi_host_get - increment Scsi_Host instance refcount
+ * @shost: pointer to struct Scsi_Host instance
+ *
+ * Returns nothing
+ *
+ * Notes: Actually increments the counts in two sub-objects
+ *
+ * Defined in: drivers/scsi/hosts.c
+ **/
+void scsi_host_get(struct Scsi_Host *shost)
+
+
+/**
+ * scsi_host_put - decrement Scsi_Host instance refcount, free if 0
+ * @shost: pointer to struct Scsi_Host instance
+ *
+ * Returns nothing
+ *
+ * Notes: Actually decrements the counts in two sub-objects. If the
+ * latter refcount reaches 0, the Scsi_Host instance is freed.
+ * The LLD need not worry exactly when the Scsi_Host instance is
+ * freed, it just shouldn't access the instance after it has balanced
+ * out its refcount usage.
+ *
+ * Defined in: drivers/scsi/hosts.c
+ **/
+void scsi_host_put(struct Scsi_Host *shost)
/**
@@ -469,11 +574,11 @@
* @hds: outputs number of heads calculated via this pointer
* @secs: outputs number of sectors calculated via this pointer
*
- * Returns 0 on success, -1 on failure
+ * Returns 0 on success, -1 on failure
*
- * Notes: Caller owns memory returned (free with kfree() )
+ * Notes: Caller owns memory returned (free with kfree() )
*
- * Defined in: drivers/scsi/scsicam.c
+ * Defined in: drivers/scsi/scsicam.c
**/
int scsi_partsize(unsigned char *buf, unsigned long capacity,
unsigned int *cyls, unsigned int *hds, unsigned int *secs)
@@ -483,51 +588,33 @@
* scsi_register - create and register a scsi host adapter instance.
* @shost_tp: pointer to scsi host template
* @xtr_bytes: extra bytes to allocate in hostdata array (which is the
- * last member of the returned Scsi_Host instance)
+ * last member of the returned Scsi_Host instance)
*
* Returns pointer to new Scsi_Host instance or NULL on failure
*
- * Notes: When this call returns to the LLDD, the SCSI bus scan on
- * this host has _not_ yet been done.
- * The hostdata array (by default zero length) is a per host scratch
- * area for the LLD.
- *
- * Defined in: drivers/scsi/hosts.c .
- **/
-struct Scsi_Host * scsi_register(struct SHT *, int xtr_bytes)
-
-
-/**
- * scsi_register_host - register a low level host driver
- * @shost_tp: pointer to a scsi host driver template
- *
- * Returns 0 on Success, 1 on failure
- *
- * Notes: Should only be invoked if the "passive initialization
- * model" is being used. Notice this is a _driver_ rather than
- * HBA registration function. Most older drivers call this
- * function by including the scsi_module.c file.
- * This function is deprecated, use the "hotplug initialization
- * model" instead.
+ * Notes: When this call returns to the LLDD, the SCSI bus scan on
+ * this host has _not_ yet been done.
+ * The hostdata array (by default zero length) is a per host scratch
+ * area for the LLD.
*
- * Defined in: drivers/scsi/hosts.c .
+ * Defined in: drivers/scsi/hosts.c .
**/
-int scsi_register_host(Scsi_Host_Template *shost_tp)
+struct Scsi_Host * scsi_register(struct scsi_host_template *, int xtr_bytes)
/**
* scsi_remove_device - detach and remove a SCSI device
* @sdev: a pointer to a scsi device instance
*
- * Returns value: 0 on success, -EINVAL if device not attached
+ * Returns value: 0 on success, -EINVAL if device not attached
*
* Notes: If a LLD becomes aware that a scsi device (lu) has
- * been removed but its host is still present then it can request
- * the removal of that scsi device. If successful this call will
- * lead to the slave_destroy() callback being invoked. sdev is an
- * invalid pointer after this call.
+ * been removed but its host is still present then it can request
+ * the removal of that scsi device. If successful this call will
+ * lead to the slave_destroy() callback being invoked. sdev is an
+ * invalid pointer after this call.
*
- * Defined in: drivers/scsi/scsi_scan.c .
+ * Defined in: drivers/scsi/scsi_scan.c .
**/
int scsi_remove_device(struct scsi_device *sdev)
@@ -536,13 +623,13 @@
* scsi_remove_host - detach and remove all SCSI devices owned by host
* @shost: a pointer to a scsi host instance
*
- * Returns value: 0 on success, 1 on failure (e.g. LLD busy ??)
+ * Returns value: 0 on success, 1 on failure (e.g. LLD busy ??)
*
* Notes: Should only be invoked if the "hotplug initialization
- * model" is being used. It should be called _prior_ to
- * scsi_unregister().
+ * model" is being used. It should be called _prior_ to
+ * scsi_unregister().
*
- * Defined in: drivers/scsi/hosts.c .
+ * Defined in: drivers/scsi/hosts.c .
**/
int scsi_remove_host(struct Scsi_Host *shost)
@@ -552,15 +639,15 @@
* @shost: a pointer to a scsi host involved
* @channel: channel (within) host on which scsi bus reset occurred
*
- * Returns nothing
+ * Returns nothing
*
* Notes: This only needs to be called if the reset is one which
- * originates from an unknown location. Resets originated by the
- * mid level itself don't need to call this, but there should be
- * no harm. The main purpose of this is to make sure that a
- * CHECK_CONDITION is properly treated.
+ * originates from an unknown location. Resets originated by the
+ * mid level itself don't need to call this, but there should be
+ * no harm. The main purpose of this is to make sure that a
+ * CHECK_CONDITION is properly treated.
*
- * Defined in: drivers/scsi/scsi_lib.c .
+ * Defined in: drivers/scsi/scsi_lib.c .
**/
void scsi_report_bus_reset(struct Scsi_Host * shost, int channel)
@@ -570,7 +657,7 @@
* @shost: a pointer to a scsi host instance
* @pdev: pointer to device instance to assign
*
- * Returns nothing
+ * Returns nothing
*
* Defined in: drivers/scsi/hosts.h .
**/
@@ -581,13 +668,13 @@
* scsi_set_device_offline - set device offline then flush its queue
* @sdev: a pointer to a scsi device instance to be set offline
*
- * Returns nothing
+ * Returns nothing
*
* Notes: Commands that are currently active on the scsi device have
- * their timers cancelled and are transferred to the host's
- * "eh" list for cancellation.
+ * their timers cancelled and are transferred to the host's
+ * "eh" list for cancellation.
- * Defined in: drivers/scsi/scsi.c .
+ * Defined in: drivers/scsi/scsi.c .
**/
void scsi_set_device_offline(struct scsi_device * sdev)
@@ -596,10 +683,10 @@
* scsi_to_pci_dma_dir - convert SCSI subsystem direction flag to PCI
* @scsi_data_direction: SCSI subsystem direction flag
*
- * Returns PCI_DMA_TODEVICE given SCSI_DATA_WRITE,
- * PCI_DMA_FROMDEVICE given SCSI_DATA_READ
- * PCI_DMA_BIDIRECTIONAL given SCSI_DATA_UNKNOWN
- * else returns PCI_DMA_NONE
+ * Returns PCI_DMA_TODEVICE given SCSI_DATA_WRITE,
+ * PCI_DMA_FROMDEVICE given SCSI_DATA_READ
+ * PCI_DMA_BIDIRECTIONAL given SCSI_DATA_UNKNOWN
+ * else returns PCI_DMA_NONE
*
* Defined in: drivers/scsi/scsi.h .
**/
@@ -610,10 +697,10 @@
* scsi_to_sbus_dma_dir - convert SCSI subsystem direction flag to SBUS
* @scsi_data_direction: SCSI subsystem direction flag
*
- * Returns SBUS_DMA_TODEVICE given SCSI_DATA_WRITE,
- * SBUS_DMA_FROMDEVICE given SCSI_DATA_READ
- * SBUS_DMA_BIDIRECTIONAL given SCSI_DATA_UNKNOWN
- * else returns SBUS_DMA_NONE
+ * Returns SBUS_DMA_TODEVICE given SCSI_DATA_WRITE,
+ * SBUS_DMA_FROMDEVICE given SCSI_DATA_READ
+ * SBUS_DMA_BIDIRECTIONAL given SCSI_DATA_UNKNOWN
+ * else returns SBUS_DMA_NONE
*
* Defined in: drivers/scsi/scsi.h .
**/
@@ -622,21 +709,21 @@
/**
* scsi_track_queue_full - track successive QUEUE_FULL events on given
- * device to determine if and when there is a need
- * to adjust the queue depth on the device.
+ * device to determine if and when there is a need
+ * to adjust the queue depth on the device.
* @SDptr: pointer to SCSI device instance
* @depth: Current number of outstanding SCSI commands on this device,
- * not counting the one returned as QUEUE_FULL.
+ * not counting the one returned as QUEUE_FULL.
*
* Returns 0 - no change needed
- * >0 - adjust queue depth to this new depth
- * -1 - drop back to untagged operation using host->cmd_per_lun
- * as the untagged command depth
+ * >0 - adjust queue depth to this new depth
+ * -1 - drop back to untagged operation using host->cmd_per_lun
+ * as the untagged command depth
*
* Notes: LLDs may call this at any time and we will do "The Right
- * Thing"; interrupt context safe.
+ * Thing"; interrupt context safe.
*
- * Defined in: drivers/scsi/scsi.c .
+ * Defined in: drivers/scsi/scsi.c .
**/
int scsi_track_queue_full(Scsi_Device *SDptr, int depth)
@@ -646,70 +733,48 @@
*
* @SHpnt: pointer to host to unblock commands on
*
- * Returns nothing
+ * Returns nothing
*
- * Defined in: drivers/scsi/scsi_lib.c .
+ * Defined in: drivers/scsi/scsi_lib.c .
**/
void scsi_unblock_requests(struct Scsi_Host * SHpnt)
/**
* scsi_unregister - unregister and free memory used by host instance
- * @shp: pointer to scsi host instance to unregister.
+ * @shp: pointer to scsi host instance to unregister.
*
- * Returns nothing
+ * Returns nothing
*
* Notes: Should only be invoked if the "hotplug initialization
- * model" is being used. It should be called _after_
- * scsi_remove_host(). The shp pointer is invalid after this call.
+ * model" is being used. It should be called _after_
+ * scsi_remove_host(). The shp pointer is invalid after this call.
*
- * Defined in: drivers/scsi/hosts.c .
+ * Defined in: drivers/scsi/hosts.c .
**/
void scsi_unregister(struct Scsi_Host * shp)
-/**
- * scsi_unregister_host - unregister a low level host adapter driver
- * @shost_tp: scsi host template to unregister.
- *
- * Returns 0 on Success, 1 on Failure
- *
- * Notes: Should only be invoked if the "passive initialization
- * model" is being used. Notice this is a _driver_ rather than
- * HBA deregistration function. So if there are multiple HBAs
- * associated with the given template, they are each removed. Most
- * older drivers call this function by including the scsi_module.c
- * file. This function is deprecated, use the "hotplug initialization
- * model" instead.
- *
- * Defined in: drivers/scsi/hosts.c .
- **/
-int scsi_unregister_host(Scsi_Host_Template *shost_tp)
-
Interface Functions
===================
-Interface functions are supplied (defined) by LLDs and
-their function pointers are placed in an instance of struct SHT which
-is passed to scsi_register() [or scsi_register_host()]. Some
-are mandatory. Interface functions should be declared static. The
+Interface functions are supplied (defined) by LLDs and their function
+pointers are placed in an instance of struct scsi_host_template which
+is passed to scsi_host_alloc() [or scsi_register() / init_this_scsi_driver()].
+Some are mandatory. Interface functions should be declared static. The
accepted convention is that driver "xyz" will declare its slave_configure()
function as:
static int xyz_slave_configure(struct scsi_device * sdev);
A pointer to this function should be placed in the 'slave_configure' member
-of a "struct SHT" instance. A pointer to such an instance should
-passed to the mid level's scsi_register() [or scsi_register_host()].
+of a "struct scsi_host_template" instance. A pointer to such an instance
+should passed to the mid level's scsi_host_alloc() [or scsi_register() /
+init_this_scsi_driver()].
The interface functions are also described in the hosts.h file immediately
-above their definition point in "struct SHT". In some cases more detail
-is given in hosts.h than below.
-
-Those interface functions marked "Required: yes" must be implemented
-by the LLD and a pointer to that function must be placed in the driver's
-"struct SHT" instance. Interface functions marked "Required: no" need not
-be implemented.
+above their definition point in "struct scsi_host_template". In some cases
+more detail is given in hosts.h than below.
The interface functions are listed below in alphabetical order.
@@ -731,13 +796,14 @@
slave_configure - driver fine tuning for given device after attach
slave_destroy - given device is about to be shut down
+
Details:
/**
* bios_param - fetch head, sector, cylinder info for a disk
* @sdev: pointer to scsi device context (defined in scsi.h)
* @bdev: pointer to block device context (defined in fs.h)
- * @capacity: device size (in 512 byte sectors)
+ * @capacity: device size (in 512 byte sectors)
* @params: three element array to place output:
* params[0] number of heads (max 255)
* params[1] number of sectors (max 63)
@@ -745,8 +811,6 @@
*
* Return value is ignored
*
- * Required: no
- *
* Locks: none
*
* Notes: an arbitrary geometry (based on READ CAPACITY) is used
@@ -754,10 +818,10 @@
* pre-initialized with made up values just in case this function
* doesn't output anything.
*
- * Defined in: LLD
+ * Optionally defined in: LLD
**/
int bios_param(struct scsi_device * sdev, struct block_device *bdev,
- sector_t capacity, int params[3]);
+ sector_t capacity, int params[3])
/**
@@ -768,18 +832,16 @@
* host_byte, driver_byte (status_byte is in the lsb). A value of
* 0 is an unqualified success.
*
- * Required: if struct Scsi_Host::can_queue can ever by cleared (zero)
- * then this function is required.
- *
* Locks: struct Scsi_Host::host_lock held on entry (with "irqsave")
* and is expected to be held on return.
*
* Notes: Drivers tend to be dropping support for this function and
* supporting queuecommand() instead.
*
- * Defined in: LLD
+ * Defined in: LLD (if struct Scsi_Host::can_queue can ever by cleared
+ * (zero) then this function is required)
**/
- int command(struct scsi_cmnd * scp);
+ int command(struct scsi_cmnd * scp)
/**
@@ -789,9 +851,6 @@
* Returns number of hosts this driver wants to control. 0 means no
* suitable hosts found.
*
- * Required: yes, if "passive initialization mode" is used
- * [in "hotplug initialization mode" it is not invoked]
- *
* Locks: none held
*
* Notes: First function called from the SCSI mid level on this
@@ -799,9 +858,10 @@
* For each host found, this method should call scsi_register()
* [see hosts.c].
*
- * Defined in: LLD
+ * Defined in: LLD (required if "passive initialization mode" is used,
+ * not invoked in "hotplug initialization mode")
**/
- int detect(struct SHT * shtp);
+ int detect(struct scsi_host_template * shtp)
/**
@@ -810,17 +870,15 @@
*
* Returns SUCCESS if command aborted else FAILED
*
- * Required: no
- *
* Locks: struct Scsi_Host::host_lock held (with irqsave) on entry
- * and assumed to be held on return.
+ * and assumed to be held on return.
*
* Notes: Invoked from scsi_eh thread. No other commands will be
* queued on current host during eh.
*
- * Defined in: LLD
+ * Optionally defined in: LLD
**/
- int eh_abort_handler(struct scsi_cmnd * scp);
+ int eh_abort_handler(struct scsi_cmnd * scp)
/**
@@ -829,17 +887,15 @@
*
* Returns SUCCESS if command aborted else FAILED
*
- * Required: no
- *
* Locks: struct Scsi_Host::host_lock held (with irqsave) on entry
- * and assumed to be held on return.
+ * and assumed to be held on return.
*
* Notes: Invoked from scsi_eh thread. No other commands will be
* queued on current host during eh.
*
- * Defined in: LLD
+ * Optionally defined in: LLD
**/
- int eh_bus_reset_handler(struct scsi_cmnd * scp);
+ int eh_bus_reset_handler(struct scsi_cmnd * scp)
/**
@@ -848,17 +904,15 @@
*
* Returns SUCCESS if command aborted else FAILED
*
- * Required: no
- *
* Locks: struct Scsi_Host::host_lock held (with irqsave) on entry
- * and assumed to be held on return.
+ * and assumed to be held on return.
*
* Notes: Invoked from scsi_eh thread. No other commands will be
* queued on current host during eh.
*
- * Defined in: LLD
+ * Optionally defined in: LLD
**/
- int eh_device_reset_handler(struct scsi_cmnd * scp);
+ int eh_device_reset_handler(struct scsi_cmnd * scp)
/**
@@ -867,10 +921,8 @@
*
* Returns SUCCESS if command aborted else FAILED
*
- * Required: no
- *
* Locks: struct Scsi_Host::host_lock held (with irqsave) on entry
- * and assumed to be held on return.
+ * and assumed to be held on return.
*
* Notes: Invoked from scsi_eh thread. No other commands will be
* queued on current host during eh.
@@ -879,9 +931,9 @@
* defined (or they all return FAILED) then the device in question
* will be set offline whenever eh is invoked.
*
- * Defined in: LLD
+ * Optionally defined in: LLD
**/
- int eh_host_reset_handler(struct scsi_cmnd * scp);
+ int eh_host_reset_handler(struct scsi_cmnd * scp)
/**
@@ -890,16 +942,14 @@
*
* Returns TRUE if host unjammed, else FALSE.
*
- * Required: no
- *
* Locks: none
*
- * Notes: Invoked from scsi_eh thread. Driver supplied alternate to
+ * Notes: Invoked from scsi_eh thread. LLD supplied alternate to
* scsi_unjam_host() found in scsi_error.c
*
- * Defined in: LLD
+ * Optionally defined in: LLD
**/
- int eh_strategy_handler(struct Scsi_Host * shp);
+ int eh_strategy_handler(struct Scsi_Host * shp)
/**
@@ -911,8 +961,6 @@
* manage the memory pointed to and maintain it, typically for the
* lifetime of this host.]
*
- * Required: no
- *
* Locks: none
*
* Notes: Often supplies PCI or ISA information such as IO addresses
@@ -921,15 +969,15 @@
* (i.e. does not included embedded newlines).
* The SCSI_IOCTL_PROBE_HOST ioctl yields the string returned by this
* function (or struct Scsi_Host::name if this function is not
- * available).
- * In a similar manner, scsi_register_host() outputs to the console
+ * available).
+ * In a similar manner, init_this_scsi_driver() outputs to the console
* each host's "info" (or name) for the driver it is registering.
* Also if proc_info() is not supplied, the output of this function
* is used instead.
*
- * Defined in: LLD
+ * Optionally defined in: LLD
**/
- const char * info(struct Scsi_Host * shp);
+ const char * info(struct Scsi_Host * shp)
/**
@@ -944,8 +992,6 @@
* Returns negative "errno" value when there is a problem. 0 or a
* positive value indicates success and is returned to the user space.
*
- * Required: no
- *
* Locks: none
*
* Notes: The SCSI subsystem uses a "trickle down" ioctl model.
@@ -958,11 +1004,11 @@
* However the mid level returns -EINVAL for unrecognized 'cmd'
* numbers when this function is not supplied by the driver.
* Unfortunately some applications expect -EINVAL and react badly
- * when -ENOTTY is returned; stick with -EINVAL.
+ * when -ENOTTY is returned; stick with -EINVAL.
*
- * Defined in: LLD
+ * Optionally defined in: LLD
**/
- int ioctl(struct scsi_device *sdp, int cmd, void *arg);
+ int ioctl(struct scsi_device *sdp, int cmd, void *arg)
/**
@@ -983,16 +1029,14 @@
* Returns length when 1==writeto1_read0. Otherwise number of chars
* output to buffer past offset.
*
- * Required: no
- *
* Locks: none held
*
* Notes: Driven from scsi_proc.c which interfaces to proc_fs
*
- * Defined in: LLD
+ * Optionally defined in: LLD
**/
-int proc_info(char * buffer, char ** start, off_t offset,
- int length, int hostno, int writeto1_read0);
+ int proc_info(char * buffer, char ** start, off_t offset,
+ int length, int hostno, int writeto1_read0)
/**
@@ -1000,13 +1044,10 @@
* @scp: pointer to scsi command object
* @done: function pointer to be invoked on completion
*
- * Returns 1 if the adapter (host) is busy, else returns 0. One
- * reason for an adapter to be busy is that the number
- * of outstanding queued commands is already equal to
- * struct Scsi_Host::can_queue .
- *
- * Required: if struct Scsi_Host::can_queue is ever non-zero
- * then this function is required.
+ * Returns 0 on success and 1 if the LLD or the HBA is busy (i.e. run
+ * out of resources to queue further commands). Other types of errors
+ * are flagged by setting struct scsi_cmnd:result to an appropriate
+ * value, invoking the 'done' callback, and then returning 0.
*
* Locks: struct Scsi_Host::host_lock held on entry (with "irqsave")
* and is expected to be held on return.
@@ -1024,14 +1065,15 @@
* this case, it should be placed in scp->result before this function
* returns.
* If a status of CHECK CONDITION is placed in "result" when the
- * 'done' callback is invoked, then the LLD driver should
- * perform autosense and fill in the struct scsi_cmnd::sense_buffer
- * array.
+ * 'done' callback is invoked, then the LLD driver should
+ * perform autosense and fill in the struct scsi_cmnd::sense_buffer
+ * array.
*
- * Defined in: LLD
+ * Defined in: LLD (required if if struct Scsi_Host::can_queue is ever
+ * non-zero)
**/
int queuecommand(struct scsi_cmnd * scp,
- void (*done)(struct scsi_cmnd *));
+ void (*done)(struct scsi_cmnd *))
/**
@@ -1040,100 +1082,91 @@
*
* Return value ignored (could soon be a function returning void).
*
- * Required: yes (see notes)
- *
* Locks: none held
*
- * Notes: Invoked from mid level's scsi_unregister_host().
+ * Notes: Invoked from scsi_module.c's exit_this_scsi_driver().
* LLD's implementation of this function should call
- * scsi_unregister(shp) prior to returning.
- * If not supplied mid-level [in hosts.c] supplies its own
- * implementation (see scsi_host_legacy_release()) which is for old
- * ISA adapters so it is best not to use it.
+ * scsi_unregister(shp) prior to returning.
+ * Only needed for old-style host templates.
*
- * Defined in: LLD
+ * Defined in: LLD (required in "passive initialization model",
+ * should not be defined in hotplug model)
**/
- int release(struct Scsi_Host * shp);
+ int release(struct Scsi_Host * shp)
/**
- * slave_alloc - prior to any commands being sent to a new device
- * (i.e. just prior to scan) this call is made
+ * slave_alloc - prior to any commands being sent to a new device
+ * (i.e. just prior to scan) this call is made
* @sdp: pointer to new device (about to be scanned)
*
* Returns 0 if ok. Any other return is assumed to be an error and
- * the device is ignored.
- *
- * Required: no
+ * the device is ignored.
*
* Locks: none
*
* Notes: Allows the driver to allocate any resources for a device
- * prior to its initial scan. The corresponding scsi device may not
- * exist but the mid level is just about to scan for it (i.e. send
- * and INQUIRY command plus ...). If a device is found then
- * slave_configure() will be called while if a device is not found
- * slave_destroy() is called.
+ * prior to its initial scan. The corresponding scsi device may not
+ * exist but the mid level is just about to scan for it (i.e. send
+ * and INQUIRY command plus ...). If a device is found then
+ * slave_configure() will be called while if a device is not found
+ * slave_destroy() is called.
* For more details see the hosts.h file.
*
- * Defined in: LLD
+ * Optionally defined in: LLD
**/
- int slave_alloc(struct scsi_device *sdp);
+ int slave_alloc(struct scsi_device *sdp)
/**
* slave_configure - driver fine tuning for given device just after it
- * has been first scanned (i.e. it responded to an
- * INQUIRY)
+ * has been first scanned (i.e. it responded to an
+ * INQUIRY)
* @sdp: device that has just been attached
*
* Returns 0 if ok. Any other return is assumed to be an error and
- * the device is taken offline. [offline devices will _not_ have
- * slave_destroy() called on them so clean up resources.]
- *
- * Required: no
+ * the device is taken offline. [offline devices will _not_ have
+ * slave_destroy() called on them so clean up resources.]
*
* Locks: none
*
* Notes: Allows the driver to inspect the response to the initial
- * INQUIRY done by the scanning code and take appropriate action.
- * For more details see the hosts.h file.
+ * INQUIRY done by the scanning code and take appropriate action.
+ * For more details see the hosts.h file.
*
- * Defined in: LLD
+ * Optionally defined in: LLD
**/
- int slave_configure(struct scsi_device *sdp);
+ int slave_configure(struct scsi_device *sdp)
/**
* slave_destroy - given device is about to be shut down. All
- * activity has ceased on this device.
+ * activity has ceased on this device.
* @sdp: device that is about to be shut down
*
* Returns nothing
*
- * Required: no
- *
* Locks: none
*
* Notes: Mid level structures for given device are still in place
- * but are about to be torn down. Any per device resources allocated
- * by this driver for given device should be freed now. No further
- * commands will be sent for this sdp instance. [However the device
- * could be re-attached in the future in which case a new instance
- * of struct scsi_device would be supplied by future slave_alloc()
- * and slave_configure() calls.]
+ * but are about to be torn down. Any per device resources allocated
+ * by this driver for given device should be freed now. No further
+ * commands will be sent for this sdp instance. [However the device
+ * could be re-attached in the future in which case a new instance
+ * of struct scsi_device would be supplied by future slave_alloc()
+ * and slave_configure() calls.]
*
- * Defined in: LLD
+ * Optionally defined in: LLD
**/
- void slave_destroy(struct scsi_device *sdp);
+ void slave_destroy(struct scsi_device *sdp)
Data Structures
===============
-struct SHT
-----------
-There is one "struct SHT" instance per LLD ***. It is
+struct scsi_host_template
+-------------------------
+There is one "struct scsi_host_template" instance per LLD ***. It is
typically initialized as a file scope static in a driver's header file. That
way members that are not explicitly initialized will be set to 0 or NULL.
Member of interest:
@@ -1143,22 +1176,23 @@
by sysfs in one of its "drivers" directories. Hence
"proc_name" should only contain characters acceptable
to a Unix file name.
- (*release)() - should be defined by all LLDs as the default (legacy)
- implementation is only appropriate for ISA adapters).
+ (*queuecommand)() - primary callback that the mid level uses to inject
+ SCSI commands into a LLD.
The structure is defined and commented in hosts.h
*** In extreme situations a single driver may have several instances
- if it controls several different classes of hardware (e.g. the
- advansys driver handles both ISA and PCI cards and has a separate
- instance of struct SHT for each).
+ if it controls several different classes of hardware (e.g. a LLD
+ that handles both ISA and PCI cards and has a separate instance of
+ struct scsi_host_template for each class).
struct Scsi_Host
----------------
There is one struct Scsi_Host instance per host (HBA) that a LLD
controls. The struct Scsi_Host structure has many members in common
-with "struct SHT". When a new struct Scsi_Host instance is created (in
-scsi_register() in hosts.c) those common members are initialized from
-the driver's struct SHT instance. Members of interest:
+with "struct scsi_host_template". When a new struct Scsi_Host instance
+is created (in scsi_host_alloc() in hosts.c) those common members are
+initialized from the driver's struct scsi_host_template instance. Members
+of interest:
host_no - system wide unique number that is used for identifying
this host. Issued in ascending order from 0 (and the
positioning can be influenced by the scsihosts
@@ -1172,7 +1206,7 @@
in a single SCSI command. 0 implies no maximum.
cmd_per_lun - maximum number of command that can be queued on devices
controlled by the host. Overridden by LLD calls to
- scsi_adjust_queue_depth().
+ scsi_adjust_queue_depth().
unchecked_isa_dma - 1->only use bottom 16 MB of ram (ISA DMA addressing
restriction), 0->can use full 32 bit (or better) DMA
address space
@@ -1180,22 +1214,22 @@
0->disallow SCSI command merging
highmem_io - 1->can DMA in to or out of high memory,
0->use bounce buffers if data is in high memory
- hostt - pointer to driver's struct SHT from which this
- struct Scsi_Host instance was spawned
+ hostt - pointer to driver's struct scsi_host_template from which
+ this struct Scsi_Host instance was spawned
sh_list - a double linked list of pointers to all struct Scsi_Host
instances (currently ordered by ascending host_no)
my_devices - a double linked list of pointers to struct scsi_device
- instances that belong to this host.
+ instances that belong to this host.
hostdata[0] - area reserved for LLD at end of struct Scsi_Host. Size
is set by the second argument (named 'xtr_bytes') to
- scsi_register().
+ scsi_host_alloc() or scsi_register().
The structure is defined in hosts.h
struct scsi_device
------------------
Generally, there is one instance of this structure for each SCSI logical unit
-on a host. Scsi devices are uniquely identified within a host by bus number,
-cahnnel number, target id and logical unit number (lun).
+on a host. Scsi devices connected to a host are uniquely identified by a
+channel number, target id and logical unit number (lun).
The structure is defined in scsi.h
struct scsi_cmnd
@@ -1211,7 +1245,7 @@
Locks
=====
Each struct Scsi_Host instance has a spin_lock called struct
-Scsi_Host::default_lock which is initialized in scsi_register() [found in
+Scsi_Host::default_lock which is initialized in scsi_host_alloc() [found in
hosts.c]. Within the same function the struct Scsi_Host::host_lock pointer
is initialized to point at default_lock with the scsi_assign_lock() function.
Thereafter lock and unlock operations performed by the mid level use the
@@ -1236,11 +1270,12 @@
to perform an extra data in phase on such responses
b) or, the LLD issuing a REQUEST SENSE command itself
-Either way, the mid level decides whether the LLD has
-performed autosense by checking struct scsi_cmnd::sense_buffer[0] . If this
-byte has an upper nibble of 7 (or 0xf) then autosense is assumed to have
-taken place. If it has another value (and this byte is initialized to 0
-before each command) then the mid level will issue a REQUEST SENSE command.
+Either way, when a status of CHECK CONDITION is detected, the mid level
+decides whether the LLD has performed autosense by checking struct
+scsi_cmnd::sense_buffer[0] . If this byte has an upper nibble of 7 (or 0xf)
+then autosense is assumed to have taken place. If it has another value (and
+this byte is initialized to 0 before each command) then the mid level will
+issue a REQUEST SENSE command.
In the presence of queued commands the "nexus" that maintains sense
buffer data from the command that failed until a following REQUEST SENSE
@@ -1256,7 +1291,7 @@
The older error handling mechanism has been removed. This means the
LLD interface functions abort() and reset() have been removed.
-The struct SHT::use_new_eh_code flag has been removed.
+The struct scsi_host_template::use_new_eh_code flag has been removed.
In the 2.4 series the SCSI subsystem configuration descriptions were
aggregated with the configuration descriptions from all other Linux
@@ -1264,9 +1299,10 @@
the SCSI subsystem now has its own (much smaller) drivers/scsi/Config.help
file.
-Addition of slave_alloc(), slave_configure() and slave_destroy().
+struct SHT has been renamed to struct scsi_host_template.
-Addition of the "hotplug initialization model".
+Addition of the "hotplug initialization model" and many extra functions
+to support it.
Credits
@@ -1275,11 +1311,11 @@
Mike Anderson
James Bottomley
Patrick Mansfield
- Christoph Hellwig
- Doug Ledford
+ Christoph Hellwig
+ Doug Ledford
Andries Brouwer
Douglas Gilbert
dgilbert@interlog.com
-29th April 2003
+18th June 2003
diff -Nru a/MAINTAINERS b/MAINTAINERS
--- a/MAINTAINERS Wed Jul 2 14:00:09 2003
+++ b/MAINTAINERS Wed Jul 2 14:00:09 2003
@@ -1628,8 +1628,8 @@
SGI VISUAL WORKSTATION 320 AND 540
P: Andrey Panin
-M: pazke@orbita1.ru
-L: linux-visws@lists.sf.net
+M: pazke@donpac.ru
+L: linux-visws-devel@lists.sf.net
W: http://linux-visws.sf.net
S: Maintained for 2.5.
diff -Nru a/Makefile b/Makefile
--- a/Makefile Wed Jul 2 14:00:11 2003
+++ b/Makefile Wed Jul 2 14:00:11 2003
@@ -1,6 +1,6 @@
VERSION = 2
PATCHLEVEL = 5
-SUBLEVEL = 73
+SUBLEVEL = 74
EXTRAVERSION =
# *DOCUMENTATION*
@@ -388,7 +388,7 @@
kallsyms.o := .tmp_kallsyms2.o
quiet_cmd_kallsyms = KSYM $@
-cmd_kallsyms = $(NM) -n $< | scripts/kallsyms > $@
+cmd_kallsyms = $(NM) -n $< | $(KALLSYMS) > $@
.tmp_kallsyms1.o .tmp_kallsyms2.o: %.o: %.S scripts FORCE
$(call if_changed_dep,as_o_S)
diff -Nru a/arch/alpha/Kconfig b/arch/alpha/Kconfig
--- a/arch/alpha/Kconfig Wed Jul 2 14:00:16 2003
+++ b/arch/alpha/Kconfig Wed Jul 2 14:00:16 2003
@@ -665,33 +665,8 @@
source "drivers/ide/Kconfig"
-
-menu "SCSI support"
-
-config SCSI
- tristate "SCSI support"
- ---help---
- If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
- any other SCSI device under Linux, say Y and make sure that you know
- the name of your SCSI host adapter (the card inside your computer
- that "speaks" the SCSI protocol, also called SCSI controller),
- because you will be asked for it.
-
- You also need to say Y here if you want support for the parallel
- port version of the 100 MB IOMEGA ZIP drive.
-
- This driver is also available as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want).
- The module will be called scsi_mod. If you want to compile it as
- a module, say M here and read and
- . However, do not compile this as a
- module if your root file system (the one containing the directory /)
- is located on a SCSI device.
-
source "drivers/scsi/Kconfig"
-endmenu
-
if PCI
source "drivers/message/fusion/Kconfig"
endif
@@ -704,41 +679,7 @@
source "drivers/isdn/Kconfig"
-
-menu "Old CD-ROM drivers (not SCSI, not IDE)"
-
-config CD_NO_IDESCSI
- bool "Support non-SCSI/IDE/ATAPI CDROM drives"
- ---help---
- If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
- here, otherwise N. Read the CD-ROM-HOWTO, available from
- .
-
- Note that the answer to this question doesn't directly affect the
- kernel: saying N will just cause the configurator to skip all
- the questions about these CD-ROM drives. If you are unsure what you
- have, say Y and find out whether you have one of the following
- drives.
-
- For each of these drivers, a file Documentation/cdrom/{driver_name}
- exists. Especially in cases where you do not know exactly which kind
- of drive you have you should read there. Most of these drivers use a
- file drivers/cdrom/{driver_name}.h where you can define your
- interface parameters and switch some internal goodies.
-
- All these CD-ROM drivers are also usable as a module ( = code which
- can be inserted in and removed from the running kernel whenever you
- want). If you want to compile them as module, say M instead of Y and
- read .
-
- If you want to use any of these CD-ROM drivers, you also have to
- answer Y or M to "ISO 9660 CD-ROM file system support" below (this
- answer will get "defaulted" for you if you enable any of the Linux
- CD-ROM drivers).
-
source "drivers/cdrom/Kconfig"
-
-endmenu
source "drivers/input/Kconfig"
diff -Nru a/arch/alpha/kernel/core_t2.c b/arch/alpha/kernel/core_t2.c
--- a/arch/alpha/kernel/core_t2.c Wed Jul 2 13:59:48 2003
+++ b/arch/alpha/kernel/core_t2.c Wed Jul 2 13:59:48 2003
@@ -465,10 +465,17 @@
*(vulp)T2_HAE_1 = 0; mb(); /* Sparse MEM HAE */
*(vulp)T2_HAE_2 = 0; mb(); /* Sparse I/O HAE */
*(vulp)T2_HAE_3 = 0; mb(); /* Config Space HAE */
-#if 0
- /* !!! DO NOT EVER TOUCH THIS !!! */
- *(vulp)T2_HAE_4 = 0; mb(); /* Dense MEM HAE */
-#endif
+
+ /*
+ * We also now zero out HAE_4, the dense memory HAE, so that
+ * we need not account for its "offset" when accessing dense
+ * memory resources which we allocated in our normal way. This
+ * HAE would need to stay untouched were we to keep the SRM
+ * resource settings.
+ *
+ * Thus we can now run standard X servers on SABLE/LYNX. :-)
+ */
+ *(vulp)T2_HAE_4 = 0; mb();
}
void
diff -Nru a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
--- a/arch/alpha/kernel/process.c Wed Jul 2 14:00:38 2003
+++ b/arch/alpha/kernel/process.c Wed Jul 2 14:00:38 2003
@@ -270,7 +270,7 @@
struct thread_info *childti = p->thread_info;
struct pt_regs * childregs;
struct switch_stack * childstack, *stack;
- unsigned long stack_offset;
+ unsigned long stack_offset, settls;
stack_offset = PAGE_SIZE - sizeof(struct pt_regs);
if (!(regs->ps & 8))
@@ -279,6 +279,7 @@
(stack_offset + PAGE_SIZE + (long) childti);
*childregs = *regs;
+ settls = regs->r20;
childregs->r0 = 0;
childregs->r19 = 0;
childregs->r20 = 1; /* OSF/1 has some strange fork() semantics. */
@@ -292,14 +293,16 @@
childti->pcb.flags = 1; /* set FEN, clear everything else */
/* Set a new TLS for the child thread? Peek back into the
- syscall arguments that we saved on syscall entry. */
+ syscall arguments that we saved on syscall entry. Oops,
+ except we'd have clobbered it with the parent/child set
+ of r20. Read the saved copy. */
/* Note: if CLONE_SETTLS is not set, then we must inherit the
value from the parent, which will have been set by the block
copy in dup_task_struct. This is non-intuitive, but is
required for proper operation in the case of a threaded
application calling fork. */
if (clone_flags & CLONE_SETTLS)
- childti->pcb.unique = regs->r20;
+ childti->pcb.unique = settls;
return 0;
}
diff -Nru a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c
--- a/arch/alpha/kernel/time.c Wed Jul 2 14:00:06 2003
+++ b/arch/alpha/kernel/time.c Wed Jul 2 14:00:06 2003
@@ -371,6 +371,9 @@
xtime.tv_sec = mktime(year, mon, day, hour, min, sec);
xtime.tv_nsec = 0;
+ wall_to_monotonic.tv_sec -= xtime.tv_sec;
+ wall_to_monotonic.tv_nsec = 0;
+
if (HZ > (1<<16)) {
extern void __you_loose (void);
__you_loose();
@@ -485,6 +488,16 @@
time_status |= STA_UNSYNC;
time_maxerror = NTP_PHASE_LIMIT;
time_esterror = NTP_PHASE_LIMIT;
+
+ wall_to_monotonic.tv_sec += xtime.tv_sec - tv->tv_sec;
+ wall_to_monotonic.tv_nsec += xtime.tv_nsec - tv->tv_nsec;
+ if (wall_to_monotonic.tv_nsec > NSEC_PER_SEC) {
+ wall_to_monotonic.tv_nsec -= NSEC_PER_SEC;
+ wall_to_monotonic.tv_sec++;
+ } else if (wall_to_monotonic.tv_nsec < 0) {
+ wall_to_monotonic.tv_nsec += NSEC_PER_SEC;
+ wall_to_monotonic.tv_sec--;
+ }
write_sequnlock_irq(&xtime_lock);
return 0;
diff -Nru a/arch/alpha/lib/ev6-memset.S b/arch/alpha/lib/ev6-memset.S
--- a/arch/alpha/lib/ev6-memset.S Wed Jul 2 13:59:51 2003
+++ b/arch/alpha/lib/ev6-memset.S Wed Jul 2 13:59:51 2003
@@ -38,7 +38,6 @@
.ent __memset
.align 5
__memset:
-memset:
.frame $30,0,$26,0
.prologue 0
@@ -594,3 +593,5 @@
ret $31,($26),1 # L0 :
.end __memsetw
+
+memset = __memset
diff -Nru a/arch/alpha/lib/memset.S b/arch/alpha/lib/memset.S
--- a/arch/alpha/lib/memset.S Wed Jul 2 13:59:50 2003
+++ b/arch/alpha/lib/memset.S Wed Jul 2 13:59:50 2003
@@ -17,6 +17,7 @@
.set noat
.set noreorder
.text
+ .globl memset
.globl __memset
.globl __memsetw
.globl __constant_c_memset
@@ -120,8 +121,4 @@
.end __memsetw
-#ifdef __ELF__
- .weak memset; memset = __memset
-#else
- .weakext memset, __memset
-#endif
+memset = __memset
diff -Nru a/arch/arm/Kconfig b/arch/arm/Kconfig
--- a/arch/arm/Kconfig Wed Jul 2 14:00:07 2003
+++ b/arch/arm/Kconfig Wed Jul 2 14:00:07 2003
@@ -898,32 +898,7 @@
source "drivers/ide/Kconfig"
-
-menu "SCSI support"
-
-config SCSI
- tristate "SCSI support"
- ---help---
- If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
- any other SCSI device under Linux, say Y and make sure that you know
- the name of your SCSI host adapter (the card inside your computer
- that "speaks" the SCSI protocol, also called SCSI controller),
- because you will be asked for it.
-
- You also need to say Y here if you want support for the parallel
- port version of the 100 MB IOMEGA ZIP drive.
-
- This driver is also available as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want).
- The module will be called scsi_mod. If you want to compile it as
- a module, say M here and read and
- . However, do not compile this as a
- module if your root file system (the one containing the directory /)
- is located on a SCSI device.
-
source "drivers/scsi/Kconfig"
-
-endmenu
source "drivers/ieee1394/Kconfig"
diff -Nru a/arch/arm26/Kconfig b/arch/arm26/Kconfig
--- a/arch/arm26/Kconfig Wed Jul 2 14:00:08 2003
+++ b/arch/arm26/Kconfig Wed Jul 2 14:00:08 2003
@@ -364,31 +364,7 @@
endmenu
-menu "SCSI support"
-
-config SCSI
- tristate "SCSI support"
- ---help---
- If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
- any other SCSI device under Linux, say Y and make sure that you know
- the name of your SCSI host adapter (the card inside your computer
- that "speaks" the SCSI protocol, also called SCSI controller),
- because you will be asked for it.
-
- You also need to say Y here if you want support for the parallel
- port version of the 100 MB IOMEGA ZIP drive.
-
- This driver is also available as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want).
- The module will be called scsi_mod. If you want to compile it as
- a module, say M here and read and
- . However, do not compile this as a
- module if your root file system (the one containing the directory /)
- is located on a SCSI device.
-
source "drivers/scsi/Kconfig"
-
-endmenu
source "drivers/isdn/Kconfig"
diff -Nru a/arch/cris/Kconfig b/arch/cris/Kconfig
--- a/arch/cris/Kconfig Wed Jul 2 14:00:39 2003
+++ b/arch/cris/Kconfig Wed Jul 2 14:00:39 2003
@@ -533,33 +533,8 @@
source "drivers/ide/Kconfig"
-
-menu "SCSI support"
-
-config SCSI
- tristate "SCSI support"
- ---help---
- If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
- any other SCSI device under Linux, say Y and make sure that you know
- the name of your SCSI host adapter (the card inside your computer
- that "speaks" the SCSI protocol, also called SCSI controller),
- because you will be asked for it.
-
- You also need to say Y here if you want support for the parallel
- port version of the 100 MB IOMEGA ZIP drive.
-
- This driver is also available as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want).
- The module will be called scsi_mod. If you want to compile it as
- a module, say M here and read and
- . However, do not compile this as a
- module if your root file system (the one containing the directory /)
- is located on a SCSI device.
-
source "drivers/scsi/Kconfig"
-endmenu
-
source "drivers/ieee1394/Kconfig"
source "drivers/message/i2o/Kconfig"
@@ -574,41 +549,7 @@
source "drivers/telephony/Kconfig"
-
-menu "Old CD-ROM drivers (not SCSI, not IDE)"
-
-config CD_NO_IDESCSI
- bool "Support non-SCSI/IDE/ATAPI CDROM drives"
- ---help---
- If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
- here, otherwise N. Read the CD-ROM-HOWTO, available from
- .
-
- Note that the answer to this question doesn't directly affect the
- kernel: saying N will just cause the configurator to skip all
- the questions about these CD-ROM drives. If you are unsure what you
- have, say Y and find out whether you have one of the following
- drives.
-
- For each of these drivers, a file Documentation/cdrom/{driver_name}
- exists. Especially in cases where you do not know exactly which kind
- of drive you have you should read there. Most of these drivers use a
- file drivers/cdrom/{driver_name}.h where you can define your
- interface parameters and switch some internal goodies.
-
- All these CD-ROM drivers are also usable as a module ( = code which
- can be inserted in and removed from the running kernel whenever you
- want). If you want to compile them as module, say M instead of Y and
- read .
-
- If you want to use any of these CD-ROM drivers, you also have to
- answer Y or M to "ISO 9660 CD-ROM file system support" below (this
- answer will get "defaulted" for you if you enable any of the Linux
- CD-ROM drivers).
-
source "drivers/cdrom/Kconfig"
-
-endmenu
#
# input before char - char/joystick depends on it. As does USB.
diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig
--- a/arch/i386/Kconfig Wed Jul 2 13:59:53 2003
+++ b/arch/i386/Kconfig Wed Jul 2 13:59:53 2003
@@ -1206,69 +1206,9 @@
source "drivers/ide/Kconfig"
-
-menu "SCSI device support"
-
-config SCSI
- tristate "SCSI device support"
- ---help---
- If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
- any other SCSI device under Linux, say Y and make sure that you know
- the name of your SCSI host adapter (the card inside your computer
- that "speaks" the SCSI protocol, also called SCSI controller),
- because you will be asked for it.
-
- You also need to say Y here if you want support for the parallel
- port version of the 100 MB IOMEGA ZIP drive.
-
- This driver is also available as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want).
- The module will be called scsi_mod. If you want to compile it as
- a module, say M here and read and
- . However, do not compile this as a
- module if your root file system (the one containing the directory /)
- is located on a SCSI device.
-
source "drivers/scsi/Kconfig"
-endmenu
-
-
-menu "Old CD-ROM drivers (not SCSI, not IDE)"
- depends on ISA
-
-config CD_NO_IDESCSI
- bool "Support non-SCSI/IDE/ATAPI CDROM drives"
- ---help---
- If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
- here, otherwise N. Read the CD-ROM-HOWTO, available from
- .
-
- Note that the answer to this question doesn't directly affect the
- kernel: saying N will just cause the configurator to skip all
- the questions about these CD-ROM drives. If you are unsure what you
- have, say Y and find out whether you have one of the following
- drives.
-
- For each of these drivers, a file Documentation/cdrom/{driver_name}
- exists. Especially in cases where you do not know exactly which kind
- of drive you have you should read there. Most of these drivers use a
- file drivers/cdrom/{driver_name}.h where you can define your
- interface parameters and switch some internal goodies.
-
- All these CD-ROM drivers are also usable as a module ( = code which
- can be inserted in and removed from the running kernel whenever you
- want). If you want to compile them as module, say M instead of Y and
- read .
-
- If you want to use any of these CD-ROM drivers, you also have to
- answer Y or M to "ISO 9660 CD-ROM file system support" below (this
- answer will get "defaulted" for you if you enable any of the Linux
- CD-ROM drivers).
-
source "drivers/cdrom/Kconfig"
-
-endmenu
source "drivers/md/Kconfig"
diff -Nru a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
--- a/arch/i386/kernel/Makefile Wed Jul 2 13:59:54 2003
+++ b/arch/i386/kernel/Makefile Wed Jul 2 13:59:54 2003
@@ -47,7 +47,7 @@
cmd_syscall = $(CC) -nostdlib $(SYSCFLAGS_$(@F)) \
-Wl,-T,$(filter-out FORCE,$^) -o $@
-vsyscall-flags = -shared -s -Wl,-soname=linux-vsyscall.so.1
+vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1
SYSCFLAGS_vsyscall-sysenter.so = $(vsyscall-flags)
SYSCFLAGS_vsyscall-int80.so = $(vsyscall-flags)
diff -Nru a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
--- a/arch/i386/kernel/apic.c Wed Jul 2 14:00:44 2003
+++ b/arch/i386/kernel/apic.c Wed Jul 2 14:00:44 2003
@@ -616,7 +616,7 @@
goto no_apic;
case X86_VENDOR_INTEL:
if (boot_cpu_data.x86 == 6 ||
- (boot_cpu_data.x86 == 15 && cpu_has_apic) ||
+ boot_cpu_data.x86 == 15 ||
(boot_cpu_data.x86 == 5 && cpu_has_apic))
break;
goto no_apic;
diff -Nru a/arch/i386/kernel/cpu/cpufreq/Kconfig b/arch/i386/kernel/cpu/cpufreq/Kconfig
--- a/arch/i386/kernel/cpu/cpufreq/Kconfig Wed Jul 2 13:59:55 2003
+++ b/arch/i386/kernel/cpu/cpufreq/Kconfig Wed Jul 2 13:59:55 2003
@@ -123,6 +123,11 @@
If in doubt, say N.
+config X86_SPEEDSTEP_LIB
+ tristate
+ depends on X86_SPEEDSTEP_ICH
+ default X86_SPEEDSTEP_ICH
+
config X86_P4_CLOCKMOD
tristate "Intel Pentium 4 clock modulation"
depends on CPU_FREQ_TABLE
diff -Nru a/arch/i386/kernel/cpu/cpufreq/Makefile b/arch/i386/kernel/cpu/cpufreq/Makefile
--- a/arch/i386/kernel/cpu/cpufreq/Makefile Wed Jul 2 14:00:02 2003
+++ b/arch/i386/kernel/cpu/cpufreq/Makefile Wed Jul 2 14:00:02 2003
@@ -8,6 +8,7 @@
obj-$(CONFIG_X86_ACPI_CPUFREQ) += acpi.o
obj-$(CONFIG_X86_SPEEDSTEP_ICH) += speedstep-ich.o
obj-$(CONFIG_X86_SPEEDSTEP_CENTRINO) += speedstep-centrino.o
+obj-$(CONFIG_X86_SPEEDSTEP_LIB) += speedstep-lib.o
ifdef CONFIG_X86_ACPI_CPUFREQ
ifdef CONFIG_ACPI_DEBUG
diff -Nru a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c Wed Jul 2 14:00:00 2003
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c Wed Jul 2 14:00:00 2003
@@ -29,7 +29,7 @@
#define PFX "speedstep-centrino: "
#define MAINTAINER "Jeremy Fitzhardinge "
-#define CENTRINO_DEBUG
+/*#define CENTRINO_DEBUG*/
#ifdef CENTRINO_DEBUG
#define dprintk(msg...) printk(msg)
diff -Nru a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c Wed Jul 2 13:59:46 2003
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c Wed Jul 2 13:59:46 2003
@@ -1,6 +1,4 @@
/*
- * $Id: speedstep.c,v 1.70 2003/02/22 10:23:46 db Exp $
- *
* (C) 2001 Dave Jones, Arjan van de ven.
* (C) 2002 - 2003 Dominik Brodowski
*
@@ -27,46 +25,32 @@
#include
#include
-#include
+#include "speedstep-lib.h"
+
/* speedstep_chipset:
* It is necessary to know which chipset is used. As accesses to
* this device occur at various places in this module, we need a
* static struct pci_dev * pointing to that device.
*/
-static unsigned int speedstep_chipset;
-static struct pci_dev *speedstep_chipset_dev;
+static struct pci_dev *speedstep_chipset_dev;
-#define SPEEDSTEP_CHIPSET_ICH2M 0x00000002
-#define SPEEDSTEP_CHIPSET_ICH3M 0x00000003
-#define SPEEDSTEP_CHIPSET_ICH4M 0x00000004
/* speedstep_processor
*/
-static unsigned int speedstep_processor = 0;
-static int speedstep_coppermine = 0;
-
-#define SPEEDSTEP_PROCESSOR_PIII_C 0x00000001 /* Coppermine core */
-#define SPEEDSTEP_PROCESSOR_PIII_T 0x00000002 /* Tualatin core */
-#define SPEEDSTEP_PROCESSOR_P4M 0x00000003 /* P4-M with 100 MHz FSB */
+static unsigned int speedstep_processor = 0;
-/* speedstep_[low,high]_freq
+/*
* There are only two frequency states for each processor. Values
* are in kHz for the time being.
*/
-#define SPEEDSTEP_HIGH 0x00000000
-#define SPEEDSTEP_LOW 0x00000001
-
static struct cpufreq_frequency_table speedstep_freqs[] = {
{SPEEDSTEP_HIGH, 0},
{SPEEDSTEP_LOW, 0},
{0, CPUFREQ_TABLE_END},
};
-#define speedstep_low_freq speedstep_freqs[SPEEDSTEP_LOW].frequency
-#define speedstep_high_freq speedstep_freqs[SPEEDSTEP_HIGH].frequency
-
/* DEBUG
* Define it if you want verbose debug output, e.g. for bug reporting
@@ -80,149 +64,82 @@
#endif
-
-/*********************************************************************
- * LOW LEVEL CHIPSET INTERFACE *
- *********************************************************************/
-
-/**
- * speedstep_get_state - read the current SpeedStep state
- * @state: Speedstep state (SPEEDSTEP_LOW or SPEEDSTEP_HIGH)
- *
- * Tries to read the SpeedStep state. Returns -EIO when there has been
- * trouble to read the status or write to the control register, -EINVAL
- * on an unsupported chipset, and zero on success.
- */
-static int speedstep_get_state (unsigned int *state)
-{
- unsigned long flags;
- u32 pmbase;
- u8 value;
-
- if (!speedstep_chipset_dev || !state)
- return -EINVAL;
-
- switch (speedstep_chipset) {
- case SPEEDSTEP_CHIPSET_ICH2M:
- case SPEEDSTEP_CHIPSET_ICH3M:
- case SPEEDSTEP_CHIPSET_ICH4M:
- /* get PMBASE */
- pci_read_config_dword(speedstep_chipset_dev, 0x40, &pmbase);
- if (!(pmbase & 0x01))
- return -EIO;
-
- pmbase &= 0xFFFFFFFE;
- if (!pmbase)
- return -EIO;
-
- /* read state */
- local_irq_save(flags);
- value = inb(pmbase + 0x50);
- local_irq_restore(flags);
-
- dprintk(KERN_DEBUG "cpufreq: read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value);
-
- *state = value & 0x01;
- return 0;
-
- }
-
- printk (KERN_ERR "cpufreq: setting CPU frequency on this chipset unsupported.\n");
- return -EINVAL;
-}
-
-
/**
* speedstep_set_state - set the SpeedStep state
* @state: new processor frequency state (SPEEDSTEP_LOW or SPEEDSTEP_HIGH)
*
* Tries to change the SpeedStep state.
*/
-static void speedstep_set_state (unsigned int state, int notify)
+static void speedstep_set_state (unsigned int state, unsigned int notify)
{
- u32 pmbase;
- u8 pm2_blk;
- u8 value;
- unsigned long flags;
- unsigned int oldstate;
- struct cpufreq_freqs freqs;
+ u32 pmbase;
+ u8 pm2_blk;
+ u8 value;
+ unsigned long flags;
+ struct cpufreq_freqs freqs;
if (!speedstep_chipset_dev || (state > 0x1))
return;
- if (speedstep_get_state(&oldstate))
- return;
-
- if (oldstate == state)
- return;
-
- freqs.old = (oldstate == SPEEDSTEP_HIGH) ? speedstep_high_freq : speedstep_low_freq;
- freqs.new = (state == SPEEDSTEP_HIGH) ? speedstep_high_freq : speedstep_low_freq;
+ freqs.old = speedstep_get_processor_frequency(speedstep_processor);
+ freqs.new = speedstep_freqs[SPEEDSTEP_LOW].frequency;
freqs.cpu = 0; /* speedstep.c is UP only driver */
if (notify)
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
- switch (speedstep_chipset) {
- case SPEEDSTEP_CHIPSET_ICH2M:
- case SPEEDSTEP_CHIPSET_ICH3M:
- case SPEEDSTEP_CHIPSET_ICH4M:
- /* get PMBASE */
- pci_read_config_dword(speedstep_chipset_dev, 0x40, &pmbase);
- if (!(pmbase & 0x01))
- {
- printk(KERN_ERR "cpufreq: could not find speedstep register\n");
- return;
- }
+ /* get PMBASE */
+ pci_read_config_dword(speedstep_chipset_dev, 0x40, &pmbase);
+ if (!(pmbase & 0x01))
+ {
+ printk(KERN_ERR "cpufreq: could not find speedstep register\n");
+ return;
+ }
- pmbase &= 0xFFFFFFFE;
- if (!pmbase) {
- printk(KERN_ERR "cpufreq: could not find speedstep register\n");
- return;
- }
+ pmbase &= 0xFFFFFFFE;
+ if (!pmbase) {
+ printk(KERN_ERR "cpufreq: could not find speedstep register\n");
+ return;
+ }
- /* Disable IRQs */
- local_irq_save(flags);
+ /* Disable IRQs */
+ local_irq_save(flags);
- /* read state */
- value = inb(pmbase + 0x50);
+ /* read state */
+ value = inb(pmbase + 0x50);
- dprintk(KERN_DEBUG "cpufreq: read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value);
+ dprintk(KERN_DEBUG "cpufreq: read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value);
- /* write new state */
- value &= 0xFE;
- value |= state;
+ /* write new state */
+ value &= 0xFE;
+ value |= state;
- dprintk(KERN_DEBUG "cpufreq: writing 0x%x to pmbase 0x%x + 0x50\n", value, pmbase);
+ dprintk(KERN_DEBUG "cpufreq: writing 0x%x to pmbase 0x%x + 0x50\n", value, pmbase);
- /* Disable bus master arbitration */
- pm2_blk = inb(pmbase + 0x20);
- pm2_blk |= 0x01;
- outb(pm2_blk, (pmbase + 0x20));
+ /* Disable bus master arbitration */
+ pm2_blk = inb(pmbase + 0x20);
+ pm2_blk |= 0x01;
+ outb(pm2_blk, (pmbase + 0x20));
- /* Actual transition */
- outb(value, (pmbase + 0x50));
+ /* Actual transition */
+ outb(value, (pmbase + 0x50));
- /* Restore bus master arbitration */
- pm2_blk &= 0xfe;
- outb(pm2_blk, (pmbase + 0x20));
+ /* Restore bus master arbitration */
+ pm2_blk &= 0xfe;
+ outb(pm2_blk, (pmbase + 0x20));
- /* check if transition was successful */
- value = inb(pmbase + 0x50);
+ /* check if transition was successful */
+ value = inb(pmbase + 0x50);
- /* Enable IRQs */
- local_irq_restore(flags);
+ /* Enable IRQs */
+ local_irq_restore(flags);
- dprintk(KERN_DEBUG "cpufreq: read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value);
+ dprintk(KERN_DEBUG "cpufreq: read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value);
- if (state == (value & 0x1)) {
- dprintk (KERN_INFO "cpufreq: change to %u MHz succeeded\n", (freqs.new / 1000));
- } else {
- printk (KERN_ERR "cpufreq: change failed - I/O error\n");
- }
- break;
- default:
- printk (KERN_ERR "cpufreq: setting CPU frequency on this chipset unsupported.\n");
+ if (state == (value & 0x1)) {
+ dprintk (KERN_INFO "cpufreq: change to %u MHz succeeded\n", (freqs.new / 1000));
+ } else {
+ printk (KERN_ERR "cpufreq: change failed - I/O error\n");
}
if (notify)
@@ -240,31 +157,21 @@
*/
static int speedstep_activate (void)
{
+ u16 value = 0;
+
if (!speedstep_chipset_dev)
return -EINVAL;
- switch (speedstep_chipset) {
- case SPEEDSTEP_CHIPSET_ICH2M:
- case SPEEDSTEP_CHIPSET_ICH3M:
- case SPEEDSTEP_CHIPSET_ICH4M:
- {
- u16 value = 0;
-
- pci_read_config_word(speedstep_chipset_dev,
- 0x00A0, &value);
- if (!(value & 0x08)) {
- value |= 0x08;
- dprintk(KERN_DEBUG "cpufreq: activating SpeedStep (TM) registers\n");
- pci_write_config_word(speedstep_chipset_dev,
- 0x00A0, value);
- }
-
- return 0;
- }
+ pci_read_config_word(speedstep_chipset_dev,
+ 0x00A0, &value);
+ if (!(value & 0x08)) {
+ value |= 0x08;
+ dprintk(KERN_DEBUG "cpufreq: activating SpeedStep (TM) registers\n");
+ pci_write_config_word(speedstep_chipset_dev,
+ 0x00A0, value);
}
-
- printk (KERN_ERR "cpufreq: SpeedStep (TM) on this chipset unsupported.\n");
- return -EINVAL;
+
+ return 0;
}
@@ -284,7 +191,7 @@
PCI_ANY_ID,
NULL);
if (speedstep_chipset_dev)
- return SPEEDSTEP_CHIPSET_ICH4M;
+ return 4; /* 4-M */
speedstep_chipset_dev = pci_find_subsys(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82801CA_12,
@@ -292,7 +199,7 @@
PCI_ANY_ID,
NULL);
if (speedstep_chipset_dev)
- return SPEEDSTEP_CHIPSET_ICH3M;
+ return 3; /* 3-M */
speedstep_chipset_dev = pci_find_subsys(PCI_VENDOR_ID_INTEL,
@@ -305,7 +212,7 @@
* 8100 which use a pretty old revision of the 82815
* host brige. Abort on these systems.
*/
- static struct pci_dev *hostbridge;
+ static struct pci_dev *hostbridge;
u8 rev = 0;
hostbridge = pci_find_subsys(PCI_VENDOR_ID_INTEL,
@@ -315,7 +222,7 @@
NULL);
if (!hostbridge)
- return SPEEDSTEP_CHIPSET_ICH2M;
+ return 2; /* 2-M */
pci_read_config_byte(hostbridge, PCI_REVISION_ID, &rev);
if (rev < 5) {
@@ -324,266 +231,9 @@
return 0;
}
- return SPEEDSTEP_CHIPSET_ICH2M;
- }
-
- return 0;
-}
-
-
-
-/*********************************************************************
- * LOW LEVEL PROCESSOR INTERFACE *
- *********************************************************************/
-
-
-/**
- * pentium3_get_frequency - get the core frequencies for PIIIs
- *
- * Returns the core frequency of a Pentium III processor (in kHz)
- */
-static unsigned int pentium3_get_frequency (void)
-{
- /* See table 14 of p3_ds.pdf and table 22 of 29834003.pdf */
- struct {
- unsigned int ratio; /* Frequency Multiplier (x10) */
- u8 bitmap; /* power on configuration bits
- [27, 25:22] (in MSR 0x2a) */
- } msr_decode_mult [] = {
- { 30, 0x01 },
- { 35, 0x05 },
- { 40, 0x02 },
- { 45, 0x06 },
- { 50, 0x00 },
- { 55, 0x04 },
- { 60, 0x0b },
- { 65, 0x0f },
- { 70, 0x09 },
- { 75, 0x0d },
- { 80, 0x0a },
- { 85, 0x26 },
- { 90, 0x20 },
- { 100, 0x2b },
- { 0, 0xff } /* error or unknown value */
- };
- /* PIII(-M) FSB settings: see table b1-b of 24547206.pdf */
- struct {
- unsigned int value; /* Front Side Bus speed in MHz */
- u8 bitmap; /* power on configuration bits [18: 19]
- (in MSR 0x2a) */
- } msr_decode_fsb [] = {
- { 66, 0x0 },
- { 100, 0x2 },
- { 133, 0x1 },
- { 0, 0xff}
- };
- u32 msr_lo, msr_tmp;
- int i = 0, j = 0;
- struct cpuinfo_x86 *c = cpu_data;
-
- /* read MSR 0x2a - we only need the low 32 bits */
- rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp);
- dprintk(KERN_DEBUG "cpufreq: P3 - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", msr_lo, msr_tmp);
- msr_tmp = msr_lo;
-
- /* decode the FSB */
- msr_tmp &= 0x00c0000;
- msr_tmp >>= 18;
- while (msr_tmp != msr_decode_fsb[i].bitmap) {
- if (msr_decode_fsb[i].bitmap == 0xff)
- return -EINVAL;
- i++;
- }
-
- /* decode the multiplier */
- if ((c->x86_model == 0x08) && (c->x86_mask == 0x01))
- /* different on early Coppermine PIII */
- msr_lo &= 0x03c00000;
- else
- msr_lo &= 0x0bc00000;
- msr_lo >>= 22;
- while (msr_lo != msr_decode_mult[j].bitmap) {
- if (msr_decode_mult[j].bitmap == 0xff)
- return -EINVAL;
- j++;
- }
-
- return (msr_decode_mult[j].ratio * msr_decode_fsb[i].value * 100);
-}
-
-
-/**
- * pentium4_get_frequency - get the core frequency for P4-Ms
- *
- * Should return the core frequency (in kHz) for P4-Ms.
- */
-static unsigned int pentium4_get_frequency(void)
-{
- u32 msr_lo, msr_hi;
-
- rdmsr(0x2c, msr_lo, msr_hi);
-
- dprintk(KERN_DEBUG "cpufreq: P4 - MSR_EBC_FREQUENCY_ID: 0x%x 0x%x\n", msr_lo, msr_hi);
-
- /* First 12 bits seem to change a lot (0x511, 0x410 and 0x30f seen
- * yet). Next 12 bits always seem to be 0x300. If this is not true
- * on this CPU, complain. Last 8 bits are frequency (in 100MHz).
- */
- if (msr_hi || ((msr_lo & 0x00FFF000) != 0x300000)) {
- printk(KERN_DEBUG "cpufreq: P4 - MSR_EBC_FREQUENCY_ID: 0x%x 0x%x\n", msr_lo, msr_hi);
- printk(KERN_INFO "cpufreq: problem in initialization. Please contact Dominik Brodowski\n");
- printk(KERN_INFO "cpufreq: and attach this dmesg. Thanks in advance\n");
- return 0;
- }
-
- msr_lo >>= 24;
- return (msr_lo * 100000);
-}
-
-
-/**
- * speedstep_detect_processor - detect Intel SpeedStep-capable processors.
- *
- * Returns the SPEEDSTEP_PROCESSOR_-number for the detected processor,
- * or zero on failure.
- */
-static unsigned int speedstep_detect_processor (void)
-{
- struct cpuinfo_x86 *c = cpu_data;
- u32 ebx;
-
- if ((c->x86_vendor != X86_VENDOR_INTEL) ||
- ((c->x86 != 6) && (c->x86 != 0xF)))
- return 0;
-
- if (c->x86 == 0xF) {
- /* Intel Pentium 4 Mobile P4-M */
- if (c->x86_model != 2)
- return 0;
-
- if ((c->x86_mask != 4) && (c->x86_mask != 7))
- return 0;
-
- ebx = cpuid_ebx(0x00000001);
- ebx &= 0x000000FF;
- if ((ebx != 0x0e) && (ebx != 0x0f))
- return 0;
-
- return SPEEDSTEP_PROCESSOR_P4M;
- }
-
- switch (c->x86_model) {
- case 0x0B: /* Intel PIII [Tualatin] */
- /* cpuid_ebx(1) is 0x04 for desktop PIII,
- 0x06 for mobile PIII-M */
- ebx = cpuid_ebx(0x00000001);
-
- ebx &= 0x000000FF;
- if (ebx != 0x06)
- return 0;
-
- /* So far all PIII-M processors support SpeedStep. See
- * Intel's 24540633.pdf of August 2002
- */
-
- return SPEEDSTEP_PROCESSOR_PIII_T;
-
- case 0x08: /* Intel PIII [Coppermine] */
- {
- u32 msr_lo, msr_hi;
-
- /* all mobile PIII Coppermines have FSB 100 MHz
- * ==> sort out a few desktop PIIIs. */
- rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_hi);
- dprintk(KERN_DEBUG "cpufreq: Coppermine: MSR_IA32_EBL_Cr_POWERON is 0x%x, 0x%x\n", msr_lo, msr_hi);
- msr_lo &= 0x00c0000;
- if (msr_lo != 0x0080000)
- return 0;
-
- if (speedstep_coppermine)
- return SPEEDSTEP_PROCESSOR_PIII_C;
-
- /*
- * If the processor is a mobile version,
- * platform ID has bit 50 set
- * it has SpeedStep technology if either
- * bit 56 or 57 is set
- */
- rdmsr(MSR_IA32_PLATFORM_ID, msr_lo, msr_hi);
- dprintk(KERN_DEBUG "cpufreq: Coppermine: MSR_IA32_PLATFORM ID is 0x%x, 0x%x\n", msr_lo, msr_hi);
- if ((msr_hi & (1<<18)) && (msr_hi & (3<<24)))
- return SPEEDSTEP_PROCESSOR_PIII_C;
-
- printk(KERN_INFO "cpufreq: in case this is a SpeedStep-capable Intel Pentium III Coppermine\n");
- printk(KERN_INFO "cpufreq: processor, please pass the boot option or module parameter\n");
- printk(KERN_INFO "cpufreq: `speedstep_coppermine=1` to the kernel. Thanks!\n");
- return 0;
- }
-
- default:
- return 0;
- }
-}
-
-
-
-/*********************************************************************
- * HIGH LEVEL FUNCTIONS *
- *********************************************************************/
-
-/**
- * speedstep_detect_speeds - detects low and high CPU frequencies.
- *
- * Detects the low and high CPU frequencies in kHz. Returns 0 on
- * success or -EINVAL / -EIO on problems.
- */
-static int speedstep_detect_speeds (void)
-{
- unsigned long flags;
- unsigned int state;
- int i, result;
-
- /* Disable irqs for entire detection process */
- local_irq_save(flags);
-
- for (i=0; i<2; i++) {
- /* read the current state */
- result = speedstep_get_state(&state);
- if (result) {
- local_irq_restore(flags);
- return result;
- }
-
- /* save the correct value, and switch to other */
- if (state == SPEEDSTEP_LOW) {
- switch (speedstep_processor) {
- case SPEEDSTEP_PROCESSOR_PIII_C:
- case SPEEDSTEP_PROCESSOR_PIII_T:
- speedstep_low_freq = pentium3_get_frequency();
- break;
- case SPEEDSTEP_PROCESSOR_P4M:
- speedstep_low_freq = pentium4_get_frequency();
- }
- speedstep_set_state(SPEEDSTEP_HIGH, 0);
- } else {
- switch (speedstep_processor) {
- case SPEEDSTEP_PROCESSOR_PIII_C:
- case SPEEDSTEP_PROCESSOR_PIII_T:
- speedstep_high_freq = pentium3_get_frequency();
- break;
- case SPEEDSTEP_PROCESSOR_P4M:
- speedstep_high_freq = pentium4_get_frequency();
- }
- speedstep_set_state(SPEEDSTEP_LOW, 0);
- }
+ return 2; /* 2-M */
}
- local_irq_restore(flags);
-
- if (!speedstep_low_freq || !speedstep_high_freq ||
- (speedstep_low_freq == speedstep_high_freq))
- return -EIO;
-
return 0;
}
@@ -598,7 +248,7 @@
unsigned int target_freq,
unsigned int relation)
{
- unsigned int newstate = 0;
+ unsigned int newstate = 0;
if (cpufreq_frequency_table_target(policy, &speedstep_freqs[0], target_freq, relation, &newstate))
return -EINVAL;
@@ -632,22 +282,24 @@
return -ENODEV;
/* detect low and high frequency */
- result = speedstep_detect_speeds();
+ result = speedstep_get_freqs(speedstep_processor,
+ &speedstep_freqs[SPEEDSTEP_LOW].frequency,
+ &speedstep_freqs[SPEEDSTEP_HIGH].frequency,
+ &speedstep_set_state);
if (result)
return result;
/* get current speed setting */
- result = speedstep_get_state(&speed);
- if (result)
- return result;
+ speed = speedstep_get_processor_frequency(speedstep_processor);
+ if (!speed)
+ return -EIO;
- speed = (speed == SPEEDSTEP_LOW) ? speedstep_low_freq : speedstep_high_freq;
dprintk(KERN_INFO "cpufreq: currently at %s speed setting - %i MHz\n",
(speed == speedstep_low_freq) ? "low" : "high",
(speed / 1000));
/* cpuinfo and default policy values */
- policy->policy = (speed == speedstep_low_freq) ?
+ policy->policy = (speed == speedstep_freqs[SPEEDSTEP_LOW].frequency) ?
CPUFREQ_POLICY_POWERSAVE : CPUFREQ_POLICY_PERFORMANCE;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
policy->cur = speed;
@@ -656,26 +308,6 @@
}
-#ifndef MODULE
-/**
- * speedstep_setup speedstep command line parameter parsing
- *
- * speedstep command line parameter. Use:
- * speedstep_coppermine=1
- * if the CPU in your notebook is a SpeedStep-capable Intel
- * Pentium III Coppermine. These processors cannot be detected
- * automatically, as Intel continues to consider the detection
- * algorithm as proprietary material.
- */
-static int __init speedstep_setup(char *str)
-{
- speedstep_coppermine = simple_strtoul(str, &str, 0);
- return 1;
-}
-__setup("speedstep_coppermine=", speedstep_setup);
-#endif
-
-
static struct cpufreq_driver speedstep_driver = {
.name = "speedstep",
.verify = speedstep_verify,
@@ -694,20 +326,17 @@
*/
static int __init speedstep_init(void)
{
- /* detect chipset */
- speedstep_chipset = speedstep_detect_chipset();
+ /* detect processor */
+ speedstep_processor = speedstep_detect_processor();
+ if (!speedstep_processor)
+ return -ENODEV;
/* detect chipset */
- if (speedstep_chipset)
- speedstep_processor = speedstep_detect_processor();
-
- if ((!speedstep_chipset) || (!speedstep_processor)) {
- printk(KERN_INFO "cpufreq: Intel(R) SpeedStep(TM) for this %s not (yet) available.\n", speedstep_chipset ? "processor" : "chipset");
+ if (!speedstep_detect_chipset()) {
+ printk(KERN_INFO "cpufreq: Intel(R) SpeedStep(TM) for this chipset not (yet) available.\n");
return -ENODEV;
}
- dprintk(KERN_INFO "cpufreq: Intel(R) SpeedStep(TM) support $Revision: 1.70 $\n");
-
/* activate speedstep support */
if (speedstep_activate())
return -EINVAL;
@@ -727,10 +356,8 @@
}
-MODULE_PARM (speedstep_coppermine, "i");
-
MODULE_AUTHOR ("Dave Jones , Dominik Brodowski ");
-MODULE_DESCRIPTION ("Speedstep driver for Intel mobile processors.");
+MODULE_DESCRIPTION ("Speedstep driver for Intel mobile processors on chipsets with ICH-M southbridges.");
MODULE_LICENSE ("GPL");
module_init(speedstep_init);
diff -Nru a/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c b/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c Wed Jul 2 14:00:48 2003
@@ -0,0 +1,275 @@
+/*
+ * (C) 2002 - 2003 Dominik Brodowski
+ *
+ * Licensed under the terms of the GNU GPL License version 2.
+ *
+ * Library for common functions for Intel SpeedStep v.1 and v.2 support
+ *
+ * BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous*
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include "speedstep-lib.h"
+
+
+/* DEBUG
+ * Define it if you want verbose debug output, e.g. for bug reporting
+ */
+//#define SPEEDSTEP_DEBUG
+
+#ifdef SPEEDSTEP_DEBUG
+#define dprintk(msg...) printk(msg)
+#else
+#define dprintk(msg...) do { } while(0)
+#endif
+
+/*********************************************************************
+ * GET PROCESSOR CORE SPEED IN KHZ *
+ *********************************************************************/
+
+static unsigned int pentium3_get_frequency (unsigned int processor)
+{
+ /* See table 14 of p3_ds.pdf and table 22 of 29834003.pdf */
+ struct {
+ unsigned int ratio; /* Frequency Multiplier (x10) */
+ u8 bitmap; /* power on configuration bits
+ [27, 25:22] (in MSR 0x2a) */
+ } msr_decode_mult [] = {
+ { 30, 0x01 },
+ { 35, 0x05 },
+ { 40, 0x02 },
+ { 45, 0x06 },
+ { 50, 0x00 },
+ { 55, 0x04 },
+ { 60, 0x0b },
+ { 65, 0x0f },
+ { 70, 0x09 },
+ { 75, 0x0d },
+ { 80, 0x0a },
+ { 85, 0x26 },
+ { 90, 0x20 },
+ { 100, 0x2b },
+ { 0, 0xff } /* error or unknown value */
+ };
+
+ /* PIII(-M) FSB settings: see table b1-b of 24547206.pdf */
+ struct {
+ unsigned int value; /* Front Side Bus speed in MHz */
+ u8 bitmap; /* power on configuration bits [18: 19]
+ (in MSR 0x2a) */
+ } msr_decode_fsb [] = {
+ { 66, 0x0 },
+ { 100, 0x2 },
+ { 133, 0x1 },
+ { 0, 0xff}
+ };
+
+ u32 msr_lo, msr_tmp;
+ int i = 0, j = 0;
+
+ /* read MSR 0x2a - we only need the low 32 bits */
+ rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp);
+ dprintk(KERN_DEBUG "speedstep-lib: P3 - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", msr_lo, msr_tmp);
+ msr_tmp = msr_lo;
+
+ /* decode the FSB */
+ msr_tmp &= 0x00c0000;
+ msr_tmp >>= 18;
+ while (msr_tmp != msr_decode_fsb[i].bitmap) {
+ if (msr_decode_fsb[i].bitmap == 0xff)
+ return 0;
+ i++;
+ }
+
+ /* decode the multiplier */
+ if (processor == SPEEDSTEP_PROCESSOR_PIII_C_EARLY)
+ msr_lo &= 0x03c00000;
+ else
+ msr_lo &= 0x0bc00000;
+ msr_lo >>= 22;
+ while (msr_lo != msr_decode_mult[j].bitmap) {
+ if (msr_decode_mult[j].bitmap == 0xff)
+ return 0;
+ j++;
+ }
+
+ return (msr_decode_mult[j].ratio * msr_decode_fsb[i].value * 100);
+}
+
+
+static unsigned int pentium4_get_frequency(void)
+{
+ u32 msr_lo, msr_hi;
+
+ rdmsr(0x2c, msr_lo, msr_hi);
+
+ dprintk(KERN_DEBUG "speedstep-lib: P4 - MSR_EBC_FREQUENCY_ID: 0x%x 0x%x\n", msr_lo, msr_hi);
+
+ msr_lo >>= 24;
+ return (msr_lo * 100000);
+}
+
+
+unsigned int speedstep_get_processor_frequency(unsigned int processor)
+{
+ switch (processor) {
+ case SPEEDSTEP_PROCESSOR_P4M:
+ return pentium4_get_frequency();
+ case SPEEDSTEP_PROCESSOR_PIII_T:
+ case SPEEDSTEP_PROCESSOR_PIII_C:
+ case SPEEDSTEP_PROCESSOR_PIII_C_EARLY:
+ return pentium3_get_frequency(processor);
+ default:
+ return 0;
+ };
+ return 0;
+}
+EXPORT_SYMBOL_GPL(speedstep_get_processor_frequency);
+
+
+/*********************************************************************
+ * DETECT SPEEDSTEP-CAPABLE PROCESSOR *
+ *********************************************************************/
+
+unsigned int speedstep_detect_processor (void)
+{
+ struct cpuinfo_x86 *c = cpu_data;
+ u32 ebx, msr_lo, msr_hi;
+
+ if ((c->x86_vendor != X86_VENDOR_INTEL) ||
+ ((c->x86 != 6) && (c->x86 != 0xF)))
+ return 0;
+
+ if (c->x86 == 0xF) {
+ /* Intel Mobile Pentium 4-M
+ * or Intel Mobile Pentium 4 with 533 MHz FSB */
+ if (c->x86_model != 2)
+ return 0;
+
+ if ((c->x86_mask != 4) && /* B-stepping [M-P4-M] */
+ (c->x86_mask != 7) && /* C-stepping [M-P4-M] */
+ (c->x86_mask != 9)) /* D-stepping [M-P4-M or M-P4/533] */
+ return 0;
+
+ ebx = cpuid_ebx(0x00000001);
+ ebx &= 0x000000FF;
+ if ((ebx != 0x0e) && (ebx != 0x0f))
+ return 0;
+
+ return SPEEDSTEP_PROCESSOR_P4M;
+ }
+
+ switch (c->x86_model) {
+ case 0x0B: /* Intel PIII [Tualatin] */
+ /* cpuid_ebx(1) is 0x04 for desktop PIII,
+ 0x06 for mobile PIII-M */
+ ebx = cpuid_ebx(0x00000001);
+
+ ebx &= 0x000000FF;
+ if (ebx != 0x06)
+ return 0;
+
+ /* So far all PIII-M processors support SpeedStep. See
+ * Intel's 24540640.pdf of June 2003
+ */
+
+ return SPEEDSTEP_PROCESSOR_PIII_T;
+
+ case 0x08: /* Intel PIII [Coppermine] */
+
+ /* all mobile PIII Coppermines have FSB 100 MHz
+ * ==> sort out a few desktop PIIIs. */
+ rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_hi);
+ dprintk(KERN_DEBUG "cpufreq: Coppermine: MSR_IA32_EBL_CR_POWERON is 0x%x, 0x%x\n", msr_lo, msr_hi);
+ msr_lo &= 0x00c0000;
+ if (msr_lo != 0x0080000)
+ return 0;
+
+ /*
+ * If the processor is a mobile version,
+ * platform ID has bit 50 set
+ * it has SpeedStep technology if either
+ * bit 56 or 57 is set
+ */
+ rdmsr(MSR_IA32_PLATFORM_ID, msr_lo, msr_hi);
+ dprintk(KERN_DEBUG "cpufreq: Coppermine: MSR_IA32_PLATFORM ID is 0x%x, 0x%x\n", msr_lo, msr_hi);
+ if ((msr_hi & (1<<18)) && (msr_hi & (3<<24))) {
+ if (c->x86_mask == 0x01)
+ return SPEEDSTEP_PROCESSOR_PIII_C_EARLY;
+ else
+ return SPEEDSTEP_PROCESSOR_PIII_C;
+ }
+
+ default:
+ return 0;
+ }
+}
+EXPORT_SYMBOL_GPL(speedstep_detect_processor);
+
+
+/*********************************************************************
+ * DETECT SPEEDSTEP SPEEDS *
+ *********************************************************************/
+
+unsigned int speedstep_get_freqs(unsigned int processor,
+ unsigned int *low_speed,
+ unsigned int *high_speed,
+ void (*set_state) (unsigned int state,
+ unsigned int notify)
+ )
+{
+ unsigned int prev_speed;
+ unsigned int ret = 0;
+ unsigned long flags;
+
+ if ((!processor) || (!low_speed) || (!high_speed) || (!set_state))
+ return EINVAL;
+
+ /* get current speed */
+ prev_speed = speedstep_get_processor_frequency(processor);
+ if (!prev_speed)
+ return EIO;
+
+ local_irq_save(flags);
+
+ /* switch to low state */
+ set_state(SPEEDSTEP_LOW, 0);
+ *low_speed = speedstep_get_processor_frequency(processor);
+ if (!*low_speed) {
+ ret = EIO;
+ goto out;
+ }
+
+ /* switch to high state */
+ set_state(SPEEDSTEP_HIGH, 0);
+ *high_speed = speedstep_get_processor_frequency(processor);
+ if (!*high_speed) {
+ ret = EIO;
+ goto out;
+ }
+
+ if (*low_speed == *high_speed) {
+ ret = ENODEV;
+ goto out;
+ }
+
+ /* switch to previous state, if necessary */
+ if (*high_speed != prev_speed)
+ set_state(SPEEDSTEP_LOW, 0);
+
+ out:
+ local_irq_restore(flags);
+ return (ret);
+}
+EXPORT_SYMBOL_GPL(speedstep_get_freqs);
+
+MODULE_AUTHOR ("Dominik Brodowski ");
+MODULE_DESCRIPTION ("Library for Intel SpeedStep 1 or 2 cpufreq drivers.");
+MODULE_LICENSE ("GPL");
diff -Nru a/arch/i386/kernel/cpu/cpufreq/speedstep-lib.h b/arch/i386/kernel/cpu/cpufreq/speedstep-lib.h
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-lib.h Wed Jul 2 14:00:46 2003
@@ -0,0 +1,41 @@
+/*
+ * (C) 2002 - 2003 Dominik Brodowski
+ *
+ * Licensed under the terms of the GNU GPL License version 2.
+ *
+ * Library for common functions for Intel SpeedStep v.1 and v.2 support
+ *
+ * BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous*
+ */
+
+
+
+/* processors */
+
+#define SPEEDSTEP_PROCESSOR_PIII_C_EARLY 0x00000001 /* Coppermine core */
+#define SPEEDSTEP_PROCESSOR_PIII_C 0x00000002 /* Coppermine core */
+#define SPEEDSTEP_PROCESSOR_PIII_T 0x00000003 /* Tualatin core */
+#define SPEEDSTEP_PROCESSOR_P4M 0x00000004 /* P4-M with 100 MHz FSB */
+
+/* speedstep states -- only two of them */
+
+#define SPEEDSTEP_HIGH 0x00000000
+#define SPEEDSTEP_LOW 0x00000001
+
+
+/* detect a speedstep-capable processor */
+extern unsigned int speedstep_detect_processor (void);
+
+/* detect the current speed (in khz) of the processor */
+extern unsigned int speedstep_get_processor_frequency(unsigned int processor);
+
+
+/* detect the low and high speeds of the processor. The callback
+ * set_state"'s first argument is either SPEEDSTEP_HIGH or
+ * SPEEDSTEP_LOW; the second argument is zero so that no
+ * cpufreq_notify_transition calls are initiated.
+ */
+extern unsigned int speedstep_get_freqs(unsigned int processor,
+ unsigned int *low_speed,
+ unsigned int *high_speed,
+ void (*set_state) (unsigned int state, unsigned int notify));
diff -Nru a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c
--- a/arch/i386/kernel/i386_ksyms.c Wed Jul 2 14:00:44 2003
+++ b/arch/i386/kernel/i386_ksyms.c Wed Jul 2 14:00:44 2003
@@ -159,6 +159,7 @@
/* TLB flushing */
EXPORT_SYMBOL(flush_tlb_page);
+EXPORT_SYMBOL_GPL(flush_tlb_all);
#endif
#ifdef CONFIG_X86_IO_APIC
diff -Nru a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
--- a/arch/i386/kernel/io_apic.c Wed Jul 2 13:59:58 2003
+++ b/arch/i386/kernel/io_apic.c Wed Jul 2 13:59:58 2003
@@ -1272,9 +1272,10 @@
void __init print_IO_APIC(void)
{
int apic, i;
- struct IO_APIC_reg_00 reg_00;
- struct IO_APIC_reg_01 reg_01;
- struct IO_APIC_reg_02 reg_02;
+ union IO_APIC_reg_00 reg_00;
+ union IO_APIC_reg_01 reg_01;
+ union IO_APIC_reg_02 reg_02;
+ union IO_APIC_reg_03 reg_03;
unsigned long flags;
printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries);
@@ -1291,51 +1292,70 @@
for (apic = 0; apic < nr_ioapics; apic++) {
spin_lock_irqsave(&ioapic_lock, flags);
- *(int *)®_00 = io_apic_read(apic, 0);
- *(int *)®_01 = io_apic_read(apic, 1);
- if (reg_01.version >= 0x10)
- *(int *)®_02 = io_apic_read(apic, 2);
+ reg_00.raw = io_apic_read(apic, 0);
+ reg_01.raw = io_apic_read(apic, 1);
+ if (reg_01.bits.version >= 0x10)
+ reg_02.raw = io_apic_read(apic, 2);
+ if (reg_01.bits.version >= 0x20)
+ reg_03.raw = io_apic_read(apic, 3);
spin_unlock_irqrestore(&ioapic_lock, flags);
- printk("\n");
printk(KERN_DEBUG "IO APIC #%d......\n", mp_ioapics[apic].mpc_apicid);
- printk(KERN_DEBUG ".... register #00: %08X\n", *(int *)®_00);
- printk(KERN_DEBUG "....... : physical APIC id: %02X\n", reg_00.ID);
- printk(KERN_DEBUG "....... : Delivery Type: %X\n", reg_00.delivery_type);
- printk(KERN_DEBUG "....... : LTS : %X\n", reg_00.LTS);
- if (reg_00.ID >= APIC_BROADCAST_ID)
+ printk(KERN_DEBUG ".... register #00: %08X\n", reg_00.raw);
+ printk(KERN_DEBUG "....... : physical APIC id: %02X\n", reg_00.bits.ID);
+ printk(KERN_DEBUG "....... : Delivery Type: %X\n", reg_00.bits.delivery_type);
+ printk(KERN_DEBUG "....... : LTS : %X\n", reg_00.bits.LTS);
+ if (reg_00.bits.ID >= APIC_BROADCAST_ID)
UNEXPECTED_IO_APIC();
- if (reg_00.__reserved_1 || reg_00.__reserved_2)
+ if (reg_00.bits.__reserved_1 || reg_00.bits.__reserved_2)
UNEXPECTED_IO_APIC();
- printk(KERN_DEBUG ".... register #01: %08X\n", *(int *)®_01);
- printk(KERN_DEBUG "....... : max redirection entries: %04X\n", reg_01.entries);
- if ( (reg_01.entries != 0x0f) && /* older (Neptune) boards */
- (reg_01.entries != 0x17) && /* typical ISA+PCI boards */
- (reg_01.entries != 0x1b) && /* Compaq Proliant boards */
- (reg_01.entries != 0x1f) && /* dual Xeon boards */
- (reg_01.entries != 0x22) && /* bigger Xeon boards */
- (reg_01.entries != 0x2E) &&
- (reg_01.entries != 0x3F)
+ printk(KERN_DEBUG ".... register #01: %08X\n", reg_01.raw);
+ printk(KERN_DEBUG "....... : max redirection entries: %04X\n", reg_01.bits.entries);
+ if ( (reg_01.bits.entries != 0x0f) && /* older (Neptune) boards */
+ (reg_01.bits.entries != 0x17) && /* typical ISA+PCI boards */
+ (reg_01.bits.entries != 0x1b) && /* Compaq Proliant boards */
+ (reg_01.bits.entries != 0x1f) && /* dual Xeon boards */
+ (reg_01.bits.entries != 0x22) && /* bigger Xeon boards */
+ (reg_01.bits.entries != 0x2E) &&
+ (reg_01.bits.entries != 0x3F)
)
UNEXPECTED_IO_APIC();
- printk(KERN_DEBUG "....... : PRQ implemented: %X\n", reg_01.PRQ);
- printk(KERN_DEBUG "....... : IO APIC version: %04X\n", reg_01.version);
- if ( (reg_01.version != 0x01) && /* 82489DX IO-APICs */
- (reg_01.version != 0x10) && /* oldest IO-APICs */
- (reg_01.version != 0x11) && /* Pentium/Pro IO-APICs */
- (reg_01.version != 0x13) && /* Xeon IO-APICs */
- (reg_01.version != 0x20) /* Intel P64H (82806 AA) */
+ printk(KERN_DEBUG "....... : PRQ implemented: %X\n", reg_01.bits.PRQ);
+ printk(KERN_DEBUG "....... : IO APIC version: %04X\n", reg_01.bits.version);
+ if ( (reg_01.bits.version != 0x01) && /* 82489DX IO-APICs */
+ (reg_01.bits.version != 0x10) && /* oldest IO-APICs */
+ (reg_01.bits.version != 0x11) && /* Pentium/Pro IO-APICs */
+ (reg_01.bits.version != 0x13) && /* Xeon IO-APICs */
+ (reg_01.bits.version != 0x20) /* Intel P64H (82806 AA) */
)
UNEXPECTED_IO_APIC();
- if (reg_01.__reserved_1 || reg_01.__reserved_2)
+ if (reg_01.bits.__reserved_1 || reg_01.bits.__reserved_2)
UNEXPECTED_IO_APIC();
- if (reg_01.version >= 0x10) {
- printk(KERN_DEBUG ".... register #02: %08X\n", *(int *)®_02);
- printk(KERN_DEBUG "....... : arbitration: %02X\n", reg_02.arbitration);
- if (reg_02.__reserved_1 || reg_02.__reserved_2)
+ /*
+ * Some Intel chipsets with IO APIC VERSION of 0x1? don't have reg_02,
+ * but the value of reg_02 is read as the previous read register
+ * value, so ignore it if reg_02 == reg_01.
+ */
+ if (reg_01.bits.version >= 0x10 && reg_02.raw != reg_01.raw) {
+ printk(KERN_DEBUG ".... register #02: %08X\n", reg_02.raw);
+ printk(KERN_DEBUG "....... : arbitration: %02X\n", reg_02.bits.arbitration);
+ if (reg_02.bits.__reserved_1 || reg_02.bits.__reserved_2)
+ UNEXPECTED_IO_APIC();
+ }
+
+ /*
+ * Some Intel chipsets with IO APIC VERSION of 0x2? don't have reg_02
+ * or reg_03, but the value of reg_0[23] is read as the previous read
+ * register value, so ignore it if reg_03 == reg_0[12].
+ */
+ if (reg_01.bits.version >= 0x20 && reg_03.raw != reg_02.raw &&
+ reg_03.raw != reg_01.raw) {
+ printk(KERN_DEBUG ".... register #03: %08X\n", reg_03.raw);
+ printk(KERN_DEBUG "....... : Boot DT : %X\n", reg_03.bits.boot_DT);
+ if (reg_03.bits.__reserved_1)
UNEXPECTED_IO_APIC();
}
@@ -1344,7 +1364,7 @@
printk(KERN_DEBUG " NR Log Phy Mask Trig IRR Pol"
" Stat Dest Deli Vect: \n");
- for (i = 0; i <= reg_01.entries; i++) {
+ for (i = 0; i <= reg_01.bits.entries; i++) {
struct IO_APIC_route_entry entry;
spin_lock_irqsave(&ioapic_lock, flags);
@@ -1525,7 +1545,7 @@
static void __init enable_IO_APIC(void)
{
- struct IO_APIC_reg_01 reg_01;
+ union IO_APIC_reg_01 reg_01;
int i;
unsigned long flags;
@@ -1542,9 +1562,9 @@
*/
for (i = 0; i < nr_ioapics; i++) {
spin_lock_irqsave(&ioapic_lock, flags);
- *(int *)®_01 = io_apic_read(i, 1);
+ reg_01.raw = io_apic_read(i, 1);
spin_unlock_irqrestore(&ioapic_lock, flags);
- nr_ioapic_registers[i] = reg_01.entries+1;
+ nr_ioapic_registers[i] = reg_01.bits.entries+1;
}
/*
@@ -1576,7 +1596,7 @@
#ifndef CONFIG_X86_NUMAQ
static void __init setup_ioapic_ids_from_mpc(void)
{
- struct IO_APIC_reg_00 reg_00;
+ union IO_APIC_reg_00 reg_00;
unsigned long phys_id_present_map;
int apic;
int i;
@@ -1596,7 +1616,7 @@
/* Read the register 0 value */
spin_lock_irqsave(&ioapic_lock, flags);
- *(int *)®_00 = io_apic_read(apic, 0);
+ reg_00.raw = io_apic_read(apic, 0);
spin_unlock_irqrestore(&ioapic_lock, flags);
old_id = mp_ioapics[apic].mpc_apicid;
@@ -1605,8 +1625,8 @@
printk(KERN_ERR "BIOS bug, IO-APIC#%d ID is %d in the MPC table!...\n",
apic, mp_ioapics[apic].mpc_apicid);
printk(KERN_ERR "... fixing up to %d. (tell your hw vendor)\n",
- reg_00.ID);
- mp_ioapics[apic].mpc_apicid = reg_00.ID;
+ reg_00.bits.ID);
+ mp_ioapics[apic].mpc_apicid = reg_00.bits.ID;
}
/*
@@ -1650,18 +1670,18 @@
printk(KERN_INFO "...changing IO-APIC physical APIC ID to %d ...",
mp_ioapics[apic].mpc_apicid);
- reg_00.ID = mp_ioapics[apic].mpc_apicid;
+ reg_00.bits.ID = mp_ioapics[apic].mpc_apicid;
spin_lock_irqsave(&ioapic_lock, flags);
- io_apic_write(apic, 0, *(int *)®_00);
+ io_apic_write(apic, 0, reg_00.raw);
spin_unlock_irqrestore(&ioapic_lock, flags);
/*
* Sanity check
*/
spin_lock_irqsave(&ioapic_lock, flags);
- *(int *)®_00 = io_apic_read(apic, 0);
+ reg_00.raw = io_apic_read(apic, 0);
spin_unlock_irqrestore(&ioapic_lock, flags);
- if (reg_00.ID != mp_ioapics[apic].mpc_apicid)
+ if (reg_00.bits.ID != mp_ioapics[apic].mpc_apicid)
panic("could not set ID!\n");
else
printk(" ok.\n");
@@ -2199,7 +2219,7 @@
int __init io_apic_get_unique_id (int ioapic, int apic_id)
{
- struct IO_APIC_reg_00 reg_00;
+ union IO_APIC_reg_00 reg_00;
static unsigned long apic_id_map = 0;
unsigned long flags;
int i = 0;
@@ -2217,13 +2237,13 @@
apic_id_map = phys_cpu_present_map;
spin_lock_irqsave(&ioapic_lock, flags);
- *(int *)®_00 = io_apic_read(ioapic, 0);
+ reg_00.raw = io_apic_read(ioapic, 0);
spin_unlock_irqrestore(&ioapic_lock, flags);
if (apic_id >= IO_APIC_MAX_ID) {
printk(KERN_WARNING "IOAPIC[%d]: Invalid apic_id %d, trying "
- "%d\n", ioapic, apic_id, reg_00.ID);
- apic_id = reg_00.ID;
+ "%d\n", ioapic, apic_id, reg_00.bits.ID);
+ apic_id = reg_00.bits.ID;
}
/*
@@ -2248,16 +2268,16 @@
apic_id_map |= apicid_to_cpu_present(apic_id);
- if (reg_00.ID != apic_id) {
- reg_00.ID = apic_id;
+ if (reg_00.bits.ID != apic_id) {
+ reg_00.bits.ID = apic_id;
spin_lock_irqsave(&ioapic_lock, flags);
- io_apic_write(ioapic, 0, *(int *)®_00);
- *(int *)®_00 = io_apic_read(ioapic, 0);
+ io_apic_write(ioapic, 0, reg_00.raw);
+ reg_00.raw = io_apic_read(ioapic, 0);
spin_unlock_irqrestore(&ioapic_lock, flags);
/* Sanity check */
- if (reg_00.ID != apic_id)
+ if (reg_00.bits.ID != apic_id)
panic("IOAPIC[%d]: Unable change apic_id!\n", ioapic);
}
@@ -2269,27 +2289,27 @@
int __init io_apic_get_version (int ioapic)
{
- struct IO_APIC_reg_01 reg_01;
+ union IO_APIC_reg_01 reg_01;
unsigned long flags;
spin_lock_irqsave(&ioapic_lock, flags);
- *(int *)®_01 = io_apic_read(ioapic, 1);
+ reg_01.raw = io_apic_read(ioapic, 1);
spin_unlock_irqrestore(&ioapic_lock, flags);
- return reg_01.version;
+ return reg_01.bits.version;
}
int __init io_apic_get_redir_entries (int ioapic)
{
- struct IO_APIC_reg_01 reg_01;
+ union IO_APIC_reg_01 reg_01;
unsigned long flags;
spin_lock_irqsave(&ioapic_lock, flags);
- *(int *)®_01 = io_apic_read(ioapic, 1);
+ reg_01.raw = io_apic_read(ioapic, 1);
spin_unlock_irqrestore(&ioapic_lock, flags);
- return reg_01.entries;
+ return reg_01.bits.entries;
}
diff -Nru a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
--- a/arch/i386/kernel/traps.c Wed Jul 2 13:59:54 2003
+++ b/arch/i386/kernel/traps.c Wed Jul 2 13:59:54 2003
@@ -123,19 +123,20 @@
show_trace(tsk, (unsigned long *)esp);
}
-void show_stack(struct task_struct *task, unsigned long * esp)
+void show_stack(struct task_struct *task, unsigned long *esp)
{
unsigned long *stack;
int i;
- // debugging aid: "show_stack(NULL);" prints the
- // back trace for this cpu.
-
- if(esp==NULL)
- esp=(unsigned long*)&esp;
+ if (esp == NULL) {
+ if (task)
+ esp = (unsigned long*)task->thread.esp;
+ else
+ esp = (unsigned long *)&esp;
+ }
stack = esp;
- for(i=0; i < kstack_depth_to_print; i++) {
+ for(i = 0; i < kstack_depth_to_print; i++) {
if (((long) stack & (THREAD_SIZE-1)) == 0)
break;
if (i && ((i % 8) == 0))
diff -Nru a/arch/i386/mach-voyager/voyager_basic.c b/arch/i386/mach-voyager/voyager_basic.c
--- a/arch/i386/mach-voyager/voyager_basic.c Wed Jul 2 13:59:57 2003
+++ b/arch/i386/mach-voyager/voyager_basic.c Wed Jul 2 13:59:57 2003
@@ -284,7 +284,6 @@
{
__u8 dumpval __attribute__((unused)) = inb(0xf823);
__u8 swnmi __attribute__((unused)) = inb(0xf813);
- extern void show_stack(unsigned long *);
/* FIXME: assume dump switch pressed */
/* check to see if the dump switch was pressed */
@@ -302,7 +301,7 @@
}
}
printk(KERN_ERR "VOYAGER: Dump switch pressed, printing CPU%d tracebacks\n", smp_processor_id());
- show_stack(NULL);
+ show_stack(NULL, NULL);
show_state();
}
diff -Nru a/arch/i386/pci/Makefile b/arch/i386/pci/Makefile
--- a/arch/i386/pci/Makefile Wed Jul 2 14:00:08 2003
+++ b/arch/i386/pci/Makefile Wed Jul 2 14:00:08 2003
@@ -1,27 +1,13 @@
-obj-y := i386.o
+obj-y := i386.o
obj-$(CONFIG_PCI_BIOS) += pcbios.o
obj-$(CONFIG_PCI_DIRECT) += direct.o
-obj-$(CONFIG_X86_VISWS) += visws.o
+pci-y := fixup.o
+pci-$(CONFIG_ACPI_PCI) += acpi.o
+pci-y += legacy.o irq.o
-ifdef CONFIG_X86_NUMAQ
-obj-y += numa.o
-else
-obj-y += fixup.o
+pci-$(CONFIG_X86_VISWS) := visws.o fixup.o
+pci-$(CONFIG_X86_NUMAQ) := numa.o irq.o
-ifdef CONFIG_ACPI_PCI
-obj-y += acpi.o
-endif
-
-ifndef CONFIG_X86_VISWS
-obj-y += legacy.o
-endif
-
-endif # CONFIG_X86_NUMAQ
-
-ifndef CONFIG_X86_VISWS
-obj-y += irq.o
-endif
-
-obj-y += common.o
+obj-y += $(pci-y) common.o
diff -Nru a/arch/i386/pci/acpi.c b/arch/i386/pci/acpi.c
--- a/arch/i386/pci/acpi.c Wed Jul 2 14:00:11 2003
+++ b/arch/i386/pci/acpi.c Wed Jul 2 14:00:11 2003
@@ -3,6 +3,16 @@
#include
#include "pci.h"
+struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int domain, int busnum)
+{
+ if (domain != 0) {
+ printk(KERN_WARNING "PCI: Multiple domains not supported\n");
+ return NULL;
+ }
+
+ return pcibios_scan_root(busnum);
+}
+
static int __init pci_acpi_init(void)
{
if (pcibios_scanned)
diff -Nru a/arch/i386/pci/common.c b/arch/i386/pci/common.c
--- a/arch/i386/pci/common.c Wed Jul 2 14:00:00 2003
+++ b/arch/i386/pci/common.c Wed Jul 2 14:00:00 2003
@@ -27,14 +27,12 @@
static int pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *value)
{
- return raw_pci_ops->read(0, bus->number, PCI_SLOT(devfn),
- PCI_FUNC(devfn), where, size, value);
+ return raw_pci_ops->read(0, bus->number, devfn, where, size, value);
}
static int pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 value)
{
- return raw_pci_ops->write(0, bus->number, PCI_SLOT(devfn),
- PCI_FUNC(devfn), where, size, value);
+ return raw_pci_ops->write(0, bus->number, devfn, where, size, value);
}
struct pci_ops pci_root_ops = {
diff -Nru a/arch/i386/pci/direct.c b/arch/i386/pci/direct.c
--- a/arch/i386/pci/direct.c Wed Jul 2 13:59:56 2003
+++ b/arch/i386/pci/direct.c Wed Jul 2 13:59:56 2003
@@ -10,19 +10,19 @@
* Functions for accessing PCI configuration space with type 1 accesses
*/
-#define PCI_CONF1_ADDRESS(bus, dev, fn, reg) \
- (0x80000000 | (bus << 16) | (dev << 11) | (fn << 8) | (reg & ~3))
+#define PCI_CONF1_ADDRESS(bus, devfn, reg) \
+ (0x80000000 | (bus << 16) | (devfn << 8) | (reg & ~3))
-static int pci_conf1_read (int seg, int bus, int dev, int fn, int reg, int len, u32 *value)
+static int pci_conf1_read (int seg, int bus, int devfn, int reg, int len, u32 *value)
{
unsigned long flags;
- if (!value || (bus > 255) || (dev > 31) || (fn > 7) || (reg > 255))
+ if (!value || (bus > 255) || (devfn > 255) || (reg > 255))
return -EINVAL;
spin_lock_irqsave(&pci_config_lock, flags);
- outl(PCI_CONF1_ADDRESS(bus, dev, fn, reg), 0xCF8);
+ outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8);
switch (len) {
case 1:
@@ -41,16 +41,16 @@
return 0;
}
-static int pci_conf1_write (int seg, int bus, int dev, int fn, int reg, int len, u32 value)
+static int pci_conf1_write (int seg, int bus, int devfn, int reg, int len, u32 value)
{
unsigned long flags;
- if ((bus > 255) || (dev > 31) || (fn > 7) || (reg > 255))
+ if ((bus > 255) || (devfn > 255) || (reg > 255))
return -EINVAL;
spin_lock_irqsave(&pci_config_lock, flags);
- outl(PCI_CONF1_ADDRESS(bus, dev, fn, reg), 0xCF8);
+ outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8);
switch (len) {
case 1:
@@ -83,13 +83,17 @@
#define PCI_CONF2_ADDRESS(dev, reg) (u16)(0xC000 | (dev << 8) | reg)
-static int pci_conf2_read (int seg, int bus, int dev, int fn, int reg, int len, u32 *value)
+static int pci_conf2_read(int seg, int bus, int devfn, int reg, int len, u32 *value)
{
unsigned long flags;
+ int dev, fn;
- if (!value || (bus > 255) || (dev > 31) || (fn > 7) || (reg > 255))
+ if (!value || (bus > 255) || (devfn > 255) || (reg > 255))
return -EINVAL;
+ dev = PCI_SLOT(devfn);
+ fn = PCI_FUNC(devfn);
+
if (dev & 0x10)
return PCIBIOS_DEVICE_NOT_FOUND;
@@ -110,20 +114,24 @@
break;
}
- outb (0, 0xCF8);
+ outb(0, 0xCF8);
spin_unlock_irqrestore(&pci_config_lock, flags);
return 0;
}
-static int pci_conf2_write (int seg, int bus, int dev, int fn, int reg, int len, u32 value)
+static int pci_conf2_write (int seg, int bus, int devfn, int reg, int len, u32 value)
{
unsigned long flags;
+ int dev, fn;
- if ((bus > 255) || (dev > 31) || (fn > 7) || (reg > 255))
+ if ((bus > 255) || (devfn > 255) || (reg > 255))
return -EINVAL;
+ dev = PCI_SLOT(devfn);
+ fn = PCI_FUNC(devfn);
+
if (dev & 0x10)
return PCIBIOS_DEVICE_NOT_FOUND;
@@ -134,17 +142,17 @@
switch (len) {
case 1:
- outb ((u8)value, PCI_CONF2_ADDRESS(dev, reg));
+ outb((u8)value, PCI_CONF2_ADDRESS(dev, reg));
break;
case 2:
- outw ((u16)value, PCI_CONF2_ADDRESS(dev, reg));
+ outw((u16)value, PCI_CONF2_ADDRESS(dev, reg));
break;
case 4:
- outl ((u32)value, PCI_CONF2_ADDRESS(dev, reg));
+ outl((u32)value, PCI_CONF2_ADDRESS(dev, reg));
break;
}
- outb (0, 0xCF8);
+ outb(0, 0xCF8);
spin_unlock_irqrestore(&pci_config_lock, flags);
@@ -178,14 +186,12 @@
return 1;
for (devfn = 0; devfn < 0x100; devfn++) {
- if (o->read(0, 0, PCI_SLOT(devfn), PCI_FUNC(devfn),
- PCI_CLASS_DEVICE, 2, &x))
+ if (o->read(0, 0, devfn, PCI_CLASS_DEVICE, 2, &x))
continue;
if (x == PCI_CLASS_BRIDGE_HOST || x == PCI_CLASS_DISPLAY_VGA)
return 1;
- if (o->read(0, 0, PCI_SLOT(devfn), PCI_FUNC(devfn),
- PCI_VENDOR_ID, 2, &x))
+ if (o->read(0, 0, devfn, PCI_VENDOR_ID, 2, &x))
continue;
if (x == PCI_VENDOR_ID_INTEL || x == PCI_VENDOR_ID_COMPAQ)
return 1;
@@ -195,54 +201,84 @@
return 0;
}
-static int __init pci_direct_init(void)
+static int __init pci_check_type1(void)
{
+ unsigned long flags;
unsigned int tmp;
+ int works = 0;
+
+ local_irq_save(flags);
+
+ outb(0x01, 0xCFB);
+ tmp = inl(0xCF8);
+ outl(0x80000000, 0xCF8);
+ if (inl(0xCF8) == 0x80000000 && pci_sanity_check(&pci_direct_conf1)) {
+ works = 1;
+ }
+ outl(tmp, 0xCF8);
+ local_irq_restore(flags);
+
+ return works;
+}
+
+static int __init pci_check_type2(void)
+{
unsigned long flags;
+ int works = 0;
local_irq_save(flags);
- /*
- * Check if configuration type 1 works.
- */
- if (pci_probe & PCI_PROBE_CONF1) {
- outb (0x01, 0xCFB);
- tmp = inl (0xCF8);
- outl (0x80000000, 0xCF8);
- if (inl (0xCF8) == 0x80000000 &&
- pci_sanity_check(&pci_direct_conf1)) {
- outl (tmp, 0xCF8);
- local_irq_restore(flags);
- printk(KERN_INFO "PCI: Using configuration type 1\n");
- if (!request_region(0xCF8, 8, "PCI conf1"))
- raw_pci_ops = NULL;
- else
- raw_pci_ops = &pci_direct_conf1;
- return 0;
- }
- outl (tmp, 0xCF8);
- }
-
- /*
- * Check if configuration type 2 works.
- */
- if (pci_probe & PCI_PROBE_CONF2) {
- outb (0x00, 0xCFB);
- outb (0x00, 0xCF8);
- outb (0x00, 0xCFA);
- if (inb (0xCF8) == 0x00 && inb (0xCFA) == 0x00 &&
- pci_sanity_check(&pci_direct_conf2)) {
- local_irq_restore(flags);
- printk(KERN_INFO "PCI: Using configuration type 2\n");
- if (!request_region(0xCF8, 4, "PCI conf2"))
- raw_pci_ops = NULL;
- else
- raw_pci_ops = &pci_direct_conf2;
- return 0;
- }
+ outb(0x00, 0xCFB);
+ outb(0x00, 0xCF8);
+ outb(0x00, 0xCFA);
+ if (inb(0xCF8) == 0x00 && inb(0xCFA) == 0x00 &&
+ pci_sanity_check(&pci_direct_conf2)) {
+ works = 1;
}
local_irq_restore(flags);
+
+ return works;
+}
+
+static int __init pci_direct_init(void)
+{
+ struct resource *region, *region2;
+
+ if ((pci_probe & PCI_PROBE_CONF1) == 0)
+ goto type2;
+ region = request_region(0xCF8, 8, "PCI conf1");
+ if (!region)
+ goto type2;
+
+ if (pci_check_type1()) {
+ printk(KERN_INFO "PCI: Using configuration type 1\n");
+ raw_pci_ops = &pci_direct_conf1;
+ return 0;
+ }
+ release_resource(region);
+
+ type2:
+ if ((!pci_probe & PCI_PROBE_CONF2) == 0)
+ goto out;
+ region = request_region(0xCF8, 4, "PCI conf2");
+ if (!region)
+ goto out;
+ region2 = request_region(0xC000, 0x1000, "PCI conf2");
+ if (!region2)
+ goto fail2;
+
+ if (pci_check_type2()) {
+ printk(KERN_INFO "PCI: Using configuration type 2\n");
+ raw_pci_ops = &pci_direct_conf2;
+ return 0;
+ }
+
+ release_resource(region2);
+ fail2:
+ release_resource(region);
+
+ out:
return 0;
}
diff -Nru a/arch/i386/pci/numa.c b/arch/i386/pci/numa.c
--- a/arch/i386/pci/numa.c Wed Jul 2 13:59:55 2003
+++ b/arch/i386/pci/numa.c Wed Jul 2 13:59:55 2003
@@ -10,19 +10,19 @@
#define BUS2LOCAL(global) (mp_bus_id_to_local[global])
#define QUADLOCAL2BUS(quad,local) (quad_local_to_mp_bus_id[quad][local])
-#define PCI_CONF1_MQ_ADDRESS(bus, dev, fn, reg) \
- (0x80000000 | (BUS2LOCAL(bus) << 16) | (dev << 11) | (fn << 8) | (reg & ~3))
+#define PCI_CONF1_MQ_ADDRESS(bus, devfn, reg) \
+ (0x80000000 | (BUS2LOCAL(bus) << 16) | (devfn << 8) | (reg & ~3))
-static int pci_conf1_mq_read (int seg, int bus, int dev, int fn, int reg, int len, u32 *value)
+static int pci_conf1_mq_read (int seg, int bus, int devfn, int reg, int len, u32 *value)
{
unsigned long flags;
- if (!value || (bus > MAX_MP_BUSSES) || (dev > 31) || (fn > 7) || (reg > 255))
+ if (!value || (bus > MAX_MP_BUSSES) || (devfn > 255) || (reg > 255))
return -EINVAL;
spin_lock_irqsave(&pci_config_lock, flags);
- outl_quad(PCI_CONF1_MQ_ADDRESS(bus, dev, fn, reg), 0xCF8, BUS2QUAD(bus));
+ outl_quad(PCI_CONF1_MQ_ADDRESS(bus, devfn, reg), 0xCF8, BUS2QUAD(bus));
switch (len) {
case 1:
@@ -41,16 +41,16 @@
return 0;
}
-static int pci_conf1_mq_write (int seg, int bus, int dev, int fn, int reg, int len, u32 value)
+static int pci_conf1_mq_write (int seg, int bus, int devfn, int reg, int len, u32 value)
{
unsigned long flags;
- if ((bus > MAX_MP_BUSSES) || (dev > 31) || (fn > 7) || (reg > 255))
+ if ((bus > MAX_MP_BUSSES) || (devfn > 255) || (reg > 255))
return -EINVAL;
spin_lock_irqsave(&pci_config_lock, flags);
- outl_quad(PCI_CONF1_MQ_ADDRESS(bus, dev, fn, reg), 0xCF8, BUS2QUAD(bus));
+ outl_quad(PCI_CONF1_MQ_ADDRESS(bus, devfn, reg), 0xCF8, BUS2QUAD(bus));
switch (len) {
case 1:
diff -Nru a/arch/i386/pci/pcbios.c b/arch/i386/pci/pcbios.c
--- a/arch/i386/pci/pcbios.c Wed Jul 2 13:59:50 2003
+++ b/arch/i386/pci/pcbios.c Wed Jul 2 13:59:50 2003
@@ -172,13 +172,13 @@
return (int) (ret & 0xff00) >> 8;
}
-static int pci_bios_read (int seg, int bus, int dev, int fn, int reg, int len, u32 *value)
+static int pci_bios_read (int seg, int bus, int devfn, int reg, int len, u32 *value)
{
unsigned long result = 0;
unsigned long flags;
- unsigned long bx = ((bus << 8) | (dev << 3) | fn);
+ unsigned long bx = (bus << 8) | devfn;
- if (!value || (bus > 255) || (dev > 31) || (fn > 7) || (reg > 255))
+ if (!value || (bus > 255) || (devfn > 255) || (reg > 255))
return -EINVAL;
spin_lock_irqsave(&pci_config_lock, flags);
@@ -227,13 +227,13 @@
return (int)((result & 0xff00) >> 8);
}
-static int pci_bios_write (int seg, int bus, int dev, int fn, int reg, int len, u32 value)
+static int pci_bios_write (int seg, int bus, int devfn, int reg, int len, u32 value)
{
unsigned long result = 0;
unsigned long flags;
- unsigned long bx = ((bus << 8) | (dev << 3) | fn);
+ unsigned long bx = (bus << 8) | devfn;
- if ((bus > 255) || (dev > 31) || (fn > 7) || (reg > 255))
+ if ((bus > 255) || (devfn > 255) || (reg > 255))
return -EINVAL;
spin_lock_irqsave(&pci_config_lock, flags);
diff -Nru a/arch/ia64/Kconfig b/arch/ia64/Kconfig
--- a/arch/ia64/Kconfig Wed Jul 2 14:00:41 2003
+++ b/arch/ia64/Kconfig Wed Jul 2 14:00:41 2003
@@ -544,6 +544,8 @@
source "drivers/block/Kconfig"
+source "drivers/ide/Kconfig"
+
source "drivers/ieee1394/Kconfig"
source "drivers/message/i2o/Kconfig"
@@ -555,32 +557,8 @@
endif
-menu "SCSI support"
-
-config SCSI
- tristate "SCSI support"
- ---help---
- If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
- any other SCSI device under Linux, say Y and make sure that you know
- the name of your SCSI host adapter (the card inside your computer
- that "speaks" the SCSI protocol, also called SCSI controller),
- because you will be asked for it.
-
- You also need to say Y here if you want support for the parallel
- port version of the 100 MB IOMEGA ZIP drive.
-
- This driver is also available as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want).
- The module will be called scsi_mod. If you want to compile it as
- a module, say M here and read and
- . However, do not compile this as a
- module if your root file system (the one containing the directory /)
- is located on a SCSI device.
-
source "drivers/scsi/Kconfig"
-endmenu
-
source "net/Kconfig"
@@ -590,42 +568,8 @@
source "drivers/isdn/Kconfig"
-
-menu "CD-ROM drivers (not for SCSI or IDE/ATAPI drives)"
-
-config CD_NO_IDESCSI
- bool "Support non-SCSI/IDE/ATAPI CDROM drives"
- ---help---
- If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
- here, otherwise N. Read the CD-ROM-HOWTO, available from
- .
-
- Note that the answer to this question doesn't directly affect the
- kernel: saying N will just cause the configurator to skip all
- the questions about these CD-ROM drives. If you are unsure what you
- have, say Y and find out whether you have one of the following
- drives.
-
- For each of these drivers, a file Documentation/cdrom/{driver_name}
- exists. Especially in cases where you do not know exactly which kind
- of drive you have you should read there. Most of these drivers use a
- file drivers/cdrom/{driver_name}.h where you can define your
- interface parameters and switch some internal goodies.
-
- All these CD-ROM drivers are also usable as a module ( = code which
- can be inserted in and removed from the running kernel whenever you
- want). If you want to compile them as module, say M instead of Y and
- read .
-
- If you want to use any of these CD-ROM drivers, you also have to
- answer Y or M to "ISO 9660 CD-ROM file system support" below (this
- answer will get "defaulted" for you if you enable any of the Linux
- CD-ROM drivers).
-
source "drivers/cdrom/Kconfig"
-endmenu
-
#
# input before char - char/joystick depends on it. As does USB.
#
@@ -786,6 +730,10 @@
config IA64_EARLY_PRINTK_VGA
bool "Early printk on VGA"
depends on IA64_EARLY_PRINTK
+
+config IA64_EARLY_PRINTK_SGI_SN
+ bool "Early printk on SGI SN serial console"
+ depends on IA64_EARLY_PRINTK && (IA64_GENERIC || IA64_SGI_SN2)
config DEBUG_SLAB
bool "Debug memory allocations"
diff -Nru a/arch/ia64/Makefile b/arch/ia64/Makefile
--- a/arch/ia64/Makefile Wed Jul 2 13:59:48 2003
+++ b/arch/ia64/Makefile Wed Jul 2 13:59:48 2003
@@ -27,7 +27,7 @@
GAS_STATUS=$(shell arch/ia64/scripts/check-gas $(CC) $(OBJDUMP))
-arch-cppflags := $(shell arch/ia64/scripts/toolchain-flags $(CC) $(LD) $(OBJDUMP))
+arch-cppflags := $(shell arch/ia64/scripts/toolchain-flags $(CC) $(OBJDUMP))
cflags-y += $(arch-cppflags)
AFLAGS += $(arch-cppflags)
@@ -66,7 +66,8 @@
drivers-$(CONFIG_PCI) += arch/ia64/pci/
drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/
drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
-drivers-$(CONFIG_IA64_GENERIC) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/hp/sim/
+drivers-$(CONFIG_IA64_GENERIC) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/hp/sim/ \
+ arch/ia64/sn/
boot := arch/ia64/boot
diff -Nru a/arch/ia64/defconfig b/arch/ia64/defconfig
--- a/arch/ia64/defconfig Wed Jul 2 13:59:50 2003
+++ b/arch/ia64/defconfig Wed Jul 2 13:59:50 2003
@@ -10,30 +10,38 @@
#
# General setup
#
-CONFIG_NET=y
+CONFIG_SWAP=y
CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_BSD_PROCESS_ACCT=y
CONFIG_SYSCTL=y
+CONFIG_LOG_BUF_SHIFT=16
+# CONFIG_EMBEDDED is not set
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
#
# Loadable module support
#
CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
CONFIG_MODVERSIONS=y
-# CONFIG_KMOD is not set
+CONFIG_KMOD=y
#
# Processor type and features
#
CONFIG_IA64=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_ITANIUM=y
-# CONFIG_MCKINLEY is not set
+CONFIG_MMU=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_TIME_INTERPOLATION=y
+# CONFIG_ITANIUM is not set
+CONFIG_MCKINLEY=y
# CONFIG_IA64_GENERIC is not set
-CONFIG_IA64_DIG=y
+# CONFIG_IA64_DIG is not set
# CONFIG_IA64_HP_SIM is not set
-# CONFIG_IA64_HP_ZX1 is not set
-# CONFIG_IA64_SGI_SN1 is not set
+CONFIG_IA64_HP_ZX1=y
# CONFIG_IA64_SGI_SN2 is not set
# CONFIG_IA64_PAGE_SIZE_4KB is not set
# CONFIG_IA64_PAGE_SIZE_8KB is not set
@@ -43,41 +51,64 @@
CONFIG_ACPI_EFI=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_KERNEL_CONFIG=y
-CONFIG_IA64_BRL_EMU=y
-# CONFIG_ITANIUM_BSTEP_SPECIFIC is not set
-CONFIG_IA64_L1_CACHE_SHIFT=6
+CONFIG_IA64_L1_CACHE_SHIFT=7
+# CONFIG_MCKINLEY_ASTEP_SPECIFIC is not set
# CONFIG_NUMA is not set
+CONFIG_VIRTUAL_MEM_MAP=y
CONFIG_IA64_MCA=y
CONFIG_PM=y
CONFIG_IOSAPIC=y
CONFIG_KCORE_ELF=y
CONFIG_FORCE_MAX_ZONEORDER=18
-# CONFIG_HUGETLB_PAGE is not set
+CONFIG_HUGETLB_PAGE=y
+# CONFIG_HUGETLB_PAGE_SIZE_4GB is not set
+# CONFIG_HUGETLB_PAGE_SIZE_1GB is not set
+# CONFIG_HUGETLB_PAGE_SIZE_256MB is not set
+CONFIG_HUGETLB_PAGE_SIZE_64MB=y
+# CONFIG_HUGETLB_PAGE_SIZE_16MB is not set
+# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set
+# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
+# CONFIG_HUGETLB_PAGE_SIZE_256KB is not set
+CONFIG_IA64_PAL_IDLE=y
CONFIG_SMP=y
+# CONFIG_PREEMPT is not set
CONFIG_IA32_SUPPORT=y
+CONFIG_COMPAT=y
CONFIG_PERFMON=y
CONFIG_IA64_PALINFO=y
CONFIG_EFI_VARS=y
CONFIG_NR_CPUS=16
CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_MISC is not set
+CONFIG_BINFMT_MISC=y
#
# ACPI Support
#
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_BUTTON=y
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
+CONFIG_ACPI_FAN=y
+CONFIG_ACPI_PROCESSOR=y
+CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_BUS=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y
CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_LEGACY_PROC=y
CONFIG_PCI_NAMES=y
-# CONFIG_HOTPLUG is not set
+CONFIG_HOTPLUG=y
+
+#
+# PCI Hotplug Support
+#
+# CONFIG_HOTPLUG_PCI is not set
+
+#
+# PCMCIA/CardBus support
+#
+# CONFIG_PCMCIA is not set
#
# Parallel port support
@@ -85,12 +116,17 @@
# CONFIG_PARPORT is not set
#
+# Generic Driver Options
+#
+# CONFIG_FW_LOADER is not set
+
+#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set
#
-# Plug and Play configuration
+# Plug and Play support
#
# CONFIG_PNP is not set
@@ -104,7 +140,9 @@
# CONFIG_BLK_DEV_UMEM is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_RAM is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
#
# IEEE 1394 (FireWire) support (EXPERIMENTAL)
@@ -124,64 +162,11 @@
#
# Fusion MPT device support
#
-# CONFIG_FUSION is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-
-#
-# IDE, ATA and ATAPI Block devices
-#
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_HD is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-# CONFIG_IDEDISK_STROKE is not set
-CONFIG_BLK_DEV_IDECD=y
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=y
-# CONFIG_IDE_TASK_IOCTL is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_BLK_DEV_IDEPCI=y
-# CONFIG_BLK_DEV_GENERIC is not set
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDE_TCQ is not set
-# CONFIG_BLK_DEV_OFFBOARD is not set
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-# CONFIG_IDEDMA_PCI_AUTO is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_PCI_WIP is not set
-CONFIG_BLK_DEV_ADMA=y
-# CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_BLK_DEV_ALI15X3 is not set
-# CONFIG_BLK_DEV_AMD74XX is not set
-# CONFIG_BLK_DEV_CMD64X is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
-# CONFIG_BLK_DEV_HPT366 is not set
-# CONFIG_BLK_DEV_PIIX is not set
-# CONFIG_BLK_DEV_NFORCE is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-# CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_PDC202XX_OLD is not set
-# CONFIG_BLK_DEV_PDC202XX_NEW is not set
-# CONFIG_BLK_DEV_SVWKS is not set
-# CONFIG_BLK_DEV_SIIMAGE is not set
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-# CONFIG_BLK_DEV_VIA82CXXX is not set
-# CONFIG_IDEDMA_IVB is not set
+CONFIG_FUSION=y
+CONFIG_FUSION_BOOT=y
+CONFIG_FUSION_MAX_SGE=40
+# CONFIG_FUSION_ISENSE is not set
+# CONFIG_FUSION_CTL is not set
#
# SCSI support
@@ -192,16 +177,17 @@
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
-# CONFIG_CHR_DEV_ST is not set
-# CONFIG_CHR_DEV_OSST is not set
-# CONFIG_BLK_DEV_SR is not set
-# CONFIG_CHR_DEV_SG is not set
+CONFIG_CHR_DEV_ST=y
+CONFIG_CHR_DEV_OSST=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=y
#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
-# CONFIG_SCSI_MULTI_LUN is not set
-# CONFIG_SCSI_REPORT_LUNS is not set
+CONFIG_SCSI_MULTI_LUN=y
+CONFIG_SCSI_REPORT_LUNS=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
@@ -212,57 +198,76 @@
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
+CONFIG_SCSI_AIC7XXX_OLD=y
+# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_ADVANSYS is not set
-# CONFIG_SCSI_IN2000 is not set
-# CONFIG_SCSI_AM53C974 is not set
-# CONFIG_SCSI_MEGARAID is not set
+CONFIG_SCSI_MEGARAID=y
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_CPQFCTS is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_EATA_DMA is not set
# CONFIG_SCSI_EATA_PIO is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
-# CONFIG_SCSI_GENERIC_NCR5380 is not set
-# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_NCR53C7xx is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_NCR53C8XX is not set
-# CONFIG_SCSI_SYM53C8XX is not set
+CONFIG_SCSI_SYM53C8XX_2=y
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
# CONFIG_SCSI_PCI2000 is not set
# CONFIG_SCSI_PCI2220I is not set
# CONFIG_SCSI_QLOGIC_ISP is not set
# CONFIG_SCSI_QLOGIC_FC is not set
CONFIG_SCSI_QLOGIC_1280=y
+# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_U14_34F is not set
# CONFIG_SCSI_NSP32 is not set
# CONFIG_SCSI_DEBUG is not set
#
+# Networking support
+#
+CONFIG_NET=y
+
+#
# Networking options
#
CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
+# CONFIG_PACKET_MMAP is not set
# CONFIG_NETLINK_DEV is not set
-# CONFIG_NETFILTER is not set
-CONFIG_FILTER=y
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
+CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_CONNTRACK is not set
+# CONFIG_IP_NF_QUEUE is not set
+# CONFIG_IP_NF_IPTABLES is not set
+CONFIG_IP_NF_ARPTABLES=y
+# CONFIG_IP_NF_ARPFILTER is not set
+# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
+# CONFIG_IP_NF_COMPAT_IPFWADM is not set
# CONFIG_IPV6 is not set
+# CONFIG_XFRM_USER is not set
#
# SCTP Configuration (EXPERIMENTAL)
@@ -288,8 +293,9 @@
# CONFIG_NET_SCHED is not set
#
-# Network device support
+# Network testing
#
+# CONFIG_NET_PKTGEN is not set
CONFIG_NETDEVICES=y
#
@@ -297,7 +303,7 @@
#
# CONFIG_ARCNET is not set
CONFIG_DUMMY=y
-# CONFIG_BONDING is not set
+CONFIG_BONDING=y
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_ETHERTAP is not set
@@ -306,11 +312,10 @@
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
#
# Tulip family network device support
@@ -319,9 +324,12 @@
# CONFIG_HP100 is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
+# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_B44 is not set
# CONFIG_DGRS is not set
CONFIG_EEPRO100=y
+# CONFIG_EEPRO100_PIO is not set
# CONFIG_E100 is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
@@ -333,19 +341,25 @@
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
-# CONFIG_NET_POCKET is not set
#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
+CONFIG_E1000=y
+# CONFIG_E1000_NAPI is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
# CONFIG_SK98LIN is not set
-# CONFIG_TIGON3 is not set
+CONFIG_TIGON3=m
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
@@ -357,9 +371,8 @@
# CONFIG_NET_RADIO is not set
#
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
#
-# CONFIG_TR is not set
# CONFIG_NET_FC is not set
# CONFIG_RCPCI is not set
# CONFIG_SHAPER is not set
@@ -393,10 +406,10 @@
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_JOYDEV=y
# CONFIG_INPUT_TSDEV is not set
CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_EVBUG is not set
@@ -407,26 +420,19 @@
# CONFIG_GAMEPORT is not set
CONFIG_SOUND_GAMEPORT=y
CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_I8042 is not set
+# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PCIPS2 is not set
#
# Input Device Drivers
#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
-CONFIG_INPUT_MISC=y
-# CONFIG_INPUT_PCSPKR is not set
-# CONFIG_INPUT_UINPUT is not set
+# CONFIG_INPUT_MISC is not set
#
# Character devices
@@ -441,12 +447,9 @@
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_EXTENDED=y
-# CONFIG_SERIAL_8250_MANY_PORTS is not set
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-# CONFIG_SERIAL_8250_DETECT_IRQ is not set
-# CONFIG_SERIAL_8250_MULTIPORT is not set
-# CONFIG_SERIAL_8250_RSA is not set
+CONFIG_SERIAL_8250_ACPI=y
+CONFIG_SERIAL_8250_HCDP=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
#
# Non-8250 serial port support
@@ -459,14 +462,16 @@
#
# I2C support
#
-CONFIG_I2C=y
-CONFIG_I2C_ALGOBIT=y
-# CONFIG_I2C_ELV is not set
-# CONFIG_I2C_VELLEMAN is not set
-# CONFIG_SCx200_ACB is not set
-# CONFIG_I2C_ALGOPCF is not set
-CONFIG_I2C_CHARDEV=y
-CONFIG_I2C_PROC=y
+# CONFIG_I2C is not set
+
+#
+# I2C Hardware Sensors Mainboard support
+#
+
+#
+# I2C Hardware Sensors Chip support
+#
+# CONFIG_I2C_SENSOR is not set
#
# Mice
@@ -475,12 +480,16 @@
# CONFIG_QIC02_TAPE is not set
#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
+# CONFIG_HW_RANDOM is not set
# CONFIG_NVRAM is not set
-# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
CONFIG_EFI_RTC=y
# CONFIG_DTLK is not set
@@ -491,25 +500,17 @@
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
-CONFIG_AGP=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_I810=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_AMD=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_ALI=y
-CONFIG_AGP_SWORKS=y
-# CONFIG_AGP_AMD_8151 is not set
-CONFIG_AGP_I460=y
-CONFIG_AGP_HP_ZX1=y
+CONFIG_AGP=m
+CONFIG_AGP_I460=m
+CONFIG_AGP_HP_ZX1=m
CONFIG_DRM=y
-CONFIG_DRM_TDFX=y
-CONFIG_DRM_R128=y
-CONFIG_DRM_RADEON=y
-CONFIG_DRM_I810=y
-CONFIG_DRM_I830=y
-CONFIG_DRM_MGA=y
+# CONFIG_DRM_TDFX is not set
+# CONFIG_DRM_GAMMA is not set
+# CONFIG_DRM_R128 is not set
+CONFIG_DRM_RADEON=m
+# CONFIG_DRM_MGA is not set
# CONFIG_RAW_DRIVER is not set
+# CONFIG_HANGCHECK_TIMER is not set
#
# Multimedia devices
@@ -517,51 +518,79 @@
# CONFIG_VIDEO_DEV is not set
#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
# File systems
#
+CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS_XATTR=y
+# CONFIG_EXT2_FS_POSIX_ACL is not set
+# CONFIG_EXT2_FS_SECURITY is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
# CONFIG_QUOTA is not set
CONFIG_AUTOFS_FS=y
# CONFIG_AUTOFS4_FS is not set
-# CONFIG_REISERFS_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+CONFIG_UDF_FS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+# CONFIG_DEVFS_FS is not set
+CONFIG_DEVPTS_FS=y
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+CONFIG_HUGETLBFS=y
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
-CONFIG_EXT3_FS=y
-CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FAT_FS=y
-CONFIG_MSDOS_FS=y
-CONFIG_VFAT_FS=y
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
-# CONFIG_TMPFS is not set
-CONFIG_RAMFS=y
-CONFIG_ISO9660_FS=y
-# CONFIG_JOLIET is not set
-# CONFIG_ZISOFS is not set
-# CONFIG_JFS_FS is not set
-# CONFIG_MINIX_FS is not set
# CONFIG_VXFS_FS is not set
-# CONFIG_NTFS_FS is not set
# CONFIG_HPFS_FS is not set
-CONFIG_PROC_FS=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS=y
# CONFIG_QNX4FS_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
-# CONFIG_UDF_FS is not set
# CONFIG_UFS_FS is not set
-# CONFIG_XFS_FS is not set
#
# Network File Systems
#
-# CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V4=y
@@ -569,13 +598,16 @@
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V4 is not set
# CONFIG_NFSD_TCP is not set
-CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=y
-# CONFIG_CIFS is not set
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
# CONFIG_AFS_FS is not set
#
@@ -593,6 +625,7 @@
# CONFIG_SOLARIS_X86_PARTITION is not set
# CONFIG_UNIXWARE_DISKLABEL is not set
# CONFIG_LDM_PARTITION is not set
+# CONFIG_NEC98_PARTITION is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
@@ -603,53 +636,84 @@
# Native Language Support
#
CONFIG_NLS_DEFAULT="iso8859-1"
-# CONFIG_NLS_CODEPAGE_437 is not set
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=y
+CONFIG_NLS_CODEPAGE_775=y
+CONFIG_NLS_CODEPAGE_850=y
+CONFIG_NLS_CODEPAGE_852=y
+CONFIG_NLS_CODEPAGE_855=y
+CONFIG_NLS_CODEPAGE_857=y
+CONFIG_NLS_CODEPAGE_860=y
+CONFIG_NLS_CODEPAGE_861=y
+CONFIG_NLS_CODEPAGE_862=y
+CONFIG_NLS_CODEPAGE_863=y
+CONFIG_NLS_CODEPAGE_864=y
+CONFIG_NLS_CODEPAGE_865=y
+CONFIG_NLS_CODEPAGE_866=y
+CONFIG_NLS_CODEPAGE_869=y
+CONFIG_NLS_CODEPAGE_936=y
+CONFIG_NLS_CODEPAGE_950=y
+CONFIG_NLS_CODEPAGE_932=y
+CONFIG_NLS_CODEPAGE_949=y
+CONFIG_NLS_CODEPAGE_874=y
+CONFIG_NLS_ISO8859_8=y
# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ISO8859_1 is not set
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
+CONFIG_NLS_CODEPAGE_1251=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=y
+CONFIG_NLS_ISO8859_3=y
+CONFIG_NLS_ISO8859_4=y
+CONFIG_NLS_ISO8859_5=y
+CONFIG_NLS_ISO8859_6=y
+CONFIG_NLS_ISO8859_7=y
+CONFIG_NLS_ISO8859_9=y
+CONFIG_NLS_ISO8859_13=y
+CONFIG_NLS_ISO8859_14=y
+CONFIG_NLS_ISO8859_15=y
+CONFIG_NLS_KOI8_R=y
+CONFIG_NLS_KOI8_U=y
+CONFIG_NLS_UTF8=y
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_IMSTT is not set
+CONFIG_FB_RIVA=m
+# CONFIG_FB_MATROX is not set
+CONFIG_FB_RADEON=y
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_VIRTUAL is not set
#
-# Console drivers
+# Console display driver support
#
CONFIG_VGA_CONSOLE=y
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
#
-# Frame-buffer support
-#
-# CONFIG_FB is not set
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
#
# Sound
@@ -659,31 +723,62 @@
#
# Advanced Linux Sound Architecture
#
-# CONFIG_SND is not set
+CONFIG_SND=m
+CONFIG_SND_SEQUENCER=m
+# CONFIG_SND_SEQ_DUMMY is not set
+# CONFIG_SND_OSSEMUL is not set
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# PCI devices
+#
+# CONFIG_SND_ALI5451 is not set
+# CONFIG_SND_AZT3328 is not set
+# CONFIG_SND_CS46XX is not set
+# CONFIG_SND_CS4281 is not set
+# CONFIG_SND_EMU10K1 is not set
+# CONFIG_SND_KORG1212 is not set
+# CONFIG_SND_NM256 is not set
+# CONFIG_SND_RME32 is not set
+# CONFIG_SND_RME96 is not set
+# CONFIG_SND_RME9652 is not set
+# CONFIG_SND_HDSP is not set
+# CONFIG_SND_TRIDENT is not set
+# CONFIG_SND_YMFPCI is not set
+# CONFIG_SND_ALS4000 is not set
+# CONFIG_SND_CMIPCI is not set
+# CONFIG_SND_ENS1370 is not set
+# CONFIG_SND_ENS1371 is not set
+# CONFIG_SND_ES1938 is not set
+# CONFIG_SND_ES1968 is not set
+# CONFIG_SND_MAESTRO3 is not set
+CONFIG_SND_FM801=m
+# CONFIG_SND_ICE1712 is not set
+# CONFIG_SND_ICE1724 is not set
+# CONFIG_SND_INTEL8X0 is not set
+# CONFIG_SND_SONICVIBES is not set
+# CONFIG_SND_VIA82XX is not set
+# CONFIG_SND_VX222 is not set
+
+#
+# ALSA USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
#
# Open Sound System
#
-CONFIG_SOUND_PRIME=y
-# CONFIG_SOUND_BT878 is not set
-# CONFIG_SOUND_CMPCI is not set
-# CONFIG_SOUND_EMU10K1 is not set
-# CONFIG_SOUND_FUSION is not set
-CONFIG_SOUND_CS4281=y
-# CONFIG_SOUND_ES1370 is not set
-# CONFIG_SOUND_ES1371 is not set
-# CONFIG_SOUND_ESSSOLO1 is not set
-# CONFIG_SOUND_MAESTRO is not set
-# CONFIG_SOUND_MAESTRO3 is not set
-# CONFIG_SOUND_ICH is not set
-# CONFIG_SOUND_RME96XX is not set
-# CONFIG_SOUND_SONICVIBES is not set
-# CONFIG_SOUND_TRIDENT is not set
-# CONFIG_SOUND_MSNDCLAS is not set
-# CONFIG_SOUND_MSNDPIN is not set
-# CONFIG_SOUND_VIA82CXXX is not set
-# CONFIG_SOUND_OSS is not set
-# CONFIG_SOUND_TVMIXER is not set
+# CONFIG_SOUND_PRIME is not set
#
# USB support
@@ -694,17 +789,16 @@
#
# Miscellaneous USB options
#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_LONG_TIMEOUT is not set
-# CONFIG_USB_BANDWIDTH is not set
+# CONFIG_USB_DEVICEFS is not set
+CONFIG_USB_BANDWIDTH=y
# CONFIG_USB_DYNAMIC_MINORS is not set
#
# USB Host Controller Drivers
#
-# CONFIG_USB_EHCI_HCD is not set
-# CONFIG_USB_OHCI_HCD is not set
-CONFIG_USB_UHCI_HCD_ALT=y
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_UHCI_HCD=m
#
# USB Device Class drivers
@@ -725,6 +819,7 @@
CONFIG_USB_HIDDEV=y
# CONFIG_USB_AIPTEK is not set
# CONFIG_USB_WACOM is not set
+# CONFIG_USB_KBTAB is not set
# CONFIG_USB_POWERMATE is not set
# CONFIG_USB_XPAD is not set
@@ -748,8 +843,8 @@
#
# USB Network adaptors
#
+# CONFIG_USB_AX8817X is not set
# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
@@ -772,17 +867,17 @@
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_BRLVGER is not set
# CONFIG_USB_LCD is not set
-# CONFIG_USB_TEST is not set
+# CONFIG_USB_GADGET is not set
#
-# Library routines
+# Bluetooth support
#
-# CONFIG_CRC32 is not set
+# CONFIG_BT is not set
#
-# Bluetooth support
+# Library routines
#
-# CONFIG_BT is not set
+CONFIG_CRC32=y
#
# Kernel hacking
@@ -794,18 +889,17 @@
CONFIG_IA64_PRINT_HAZARDS=y
# CONFIG_DISABLE_VHPT is not set
CONFIG_MAGIC_SYSRQ=y
-CONFIG_IA64_EARLY_PRINTK=y
-# CONFIG_IA64_EARLY_PRINTK_UART is not set
-CONFIG_IA64_EARLY_PRINTK_VGA=y
+# CONFIG_IA64_EARLY_PRINTK is not set
# CONFIG_DEBUG_SLAB is not set
# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_IA64_DEBUG_CMPXCHG is not set
# CONFIG_IA64_DEBUG_IRQ is not set
#
# Security options
#
-CONFIG_SECURITY_CAPABILITIES=y
+# CONFIG_SECURITY is not set
#
# Cryptographic options
diff -Nru a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
--- a/arch/ia64/kernel/acpi.c Wed Jul 2 14:00:05 2003
+++ b/arch/ia64/kernel/acpi.c Wed Jul 2 14:00:05 2003
@@ -575,59 +575,6 @@
}
-#ifdef CONFIG_SERIAL_8250_ACPI
-
-#include
-
-static int __init
-acpi_parse_spcr (unsigned long phys_addr, unsigned long size)
-{
- acpi_ser_t *spcr;
- unsigned int gsi;
-
- if (!phys_addr || !size)
- return -EINVAL;
-
- if (!iosapic_register_intr)
- return -ENODEV;
-
- /*
- * ACPI is able to describe serial ports that live at non-standard
- * memory addresses and use non-standard interrupts, either via
- * direct SAPIC mappings or via PCI interrupts. We handle interrupt
- * routing for SAPIC-based (non-PCI) devices here. Interrupt routing
- * for PCI devices will be handled when processing the PCI Interrupt
- * Routing Table (PRT).
- */
-
- spcr = (acpi_ser_t *) __va(phys_addr);
-
- setup_serial_acpi(spcr);
-
- if (spcr->length < sizeof(acpi_ser_t))
- /* Table not long enough for full info, thus no interrupt */
- return -ENODEV;
-
- if ((spcr->base_addr.space_id != ACPI_SERIAL_PCICONF_SPACE) &&
- (spcr->int_type == ACPI_SERIAL_INT_SAPIC))
- {
- int vector;
-
- /* We have a UART in memory space with an SAPIC interrupt */
-
- gsi = ( (spcr->global_int[3] << 24) |
- (spcr->global_int[2] << 16) |
- (spcr->global_int[1] << 8) |
- (spcr->global_int[0]) );
-
- vector = iosapic_register_intr(gsi, IOSAPIC_POL_HIGH, IOSAPIC_EDGE);
- }
- return 0;
-}
-
-#endif /* CONFIG_SERIAL_8250_ACPI */
-
-
int __init
acpi_boot_init (void)
{
@@ -681,16 +628,6 @@
*/
if (acpi_table_parse(ACPI_FADT, acpi_parse_fadt) < 1)
printk(KERN_ERR PREFIX "Can't find FADT\n");
-
-#ifdef CONFIG_SERIAL_8250_ACPI
- /*
- * TBD: Need phased approach to table parsing (only do those absolutely
- * required during boot-up). Recommend expanding concept of fix-
- * feature devices (LDM) to include table-based devices such as
- * serial ports, EC, SMBus, etc.
- */
- acpi_table_parse(ACPI_SPCR, acpi_parse_spcr);
-#endif
#ifdef CONFIG_SMP
smp_boot_data.cpu_count = available_cpus;
diff -Nru a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
--- a/arch/ia64/kernel/efi.c Wed Jul 2 13:59:49 2003
+++ b/arch/ia64/kernel/efi.c Wed Jul 2 13:59:49 2003
@@ -46,7 +46,7 @@
* prior to creating their own entries under /proc/efi.
*/
#ifdef CONFIG_PROC_FS
-struct proc_dir_entry *efi_dir = NULL;
+struct proc_dir_entry *efi_dir;
#endif
static unsigned long mem_limit = ~0UL;
diff -Nru a/arch/ia64/kernel/efivars.c b/arch/ia64/kernel/efivars.c
--- a/arch/ia64/kernel/efivars.c Wed Jul 2 14:00:03 2003
+++ b/arch/ia64/kernel/efivars.c Wed Jul 2 14:00:03 2003
@@ -119,7 +119,7 @@
*/
static spinlock_t efivars_lock = SPIN_LOCK_UNLOCKED;
static LIST_HEAD(efivar_list);
-static struct proc_dir_entry *efi_vars_dir = NULL;
+static struct proc_dir_entry *efi_vars_dir;
#define efivar_entry(n) list_entry(n, efivar_entry_t, list)
diff -Nru a/arch/ia64/kernel/gate.S b/arch/ia64/kernel/gate.S
--- a/arch/ia64/kernel/gate.S Wed Jul 2 14:00:18 2003
+++ b/arch/ia64/kernel/gate.S Wed Jul 2 14:00:18 2003
@@ -199,7 +199,7 @@
cmp.ne p8,p0=r15,r0 // do we need to switch the rbs?
mov.m r9=ar.bsp // fetch ar.bsp
.spillsp.p p8, ar.rnat, RNAT_OFF+SIGCONTEXT_OFF
-(p8) br.cond.spnt setup_rbs // yup -> (clobbers r14, r15, and r16)
+(p8) br.cond.spnt setup_rbs // yup -> (clobbers p8, r14-r16, and r18-r20)
back_from_setup_rbs:
alloc r8=ar.pfs,0,0,3,0
ld8 out0=[base0],16 // load arg0 (signum)
@@ -268,26 +268,30 @@
setup_rbs:
mov ar.rsc=0 // put RSE into enforced lazy mode
;;
- .save ar.rnat, r16
- mov r16=ar.rnat // save RNaT before switching backing store area
+ .save ar.rnat, r19
+ mov r19=ar.rnat // save RNaT before switching backing store area
adds r14=(RNAT_OFF+SIGCONTEXT_OFF),sp
+ mov r18=ar.bspstore
mov ar.bspstore=r15 // switch over to new register backing store area
;;
+
.spillsp ar.rnat, RNAT_OFF+SIGCONTEXT_OFF
- st8 [r14]=r16 // save sc_ar_rnat
+ st8 [r14]=r19 // save sc_ar_rnat
.body
- adds r14=(LOADRS_OFF+SIGCONTEXT_OFF),sp
-
mov.m r16=ar.bsp // sc_loadrs <- (new bsp - new bspstore) << 16
+ adds r14=(LOADRS_OFF+SIGCONTEXT_OFF),sp
;;
invala
sub r15=r16,r15
+ extr.u r20=r18,3,6
;;
+ mov ar.rsc=0xf // set RSE into eager mode, pl 3
+ cmp.eq p8,p0=63,r20
shl r15=r15,16
;;
st8 [r14]=r15 // save sc_loadrs
- mov ar.rsc=0xf // set RSE into eager mode, pl 3
+(p8) st8 [r18]=r19 // if bspstore points at RNaT slot, store RNaT there now
.restore sp // pop .prologue
br.cond.sptk back_from_setup_rbs
diff -Nru a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S
--- a/arch/ia64/kernel/head.S Wed Jul 2 14:00:12 2003
+++ b/arch/ia64/kernel/head.S Wed Jul 2 14:00:12 2003
@@ -144,13 +144,13 @@
movl r3=task_for_booting_cpu
;;
ld8 r3=[r3]
- movl r2=init_thread_union
+ movl r2=init_task
;;
cmp.eq isBP,isAP=r3,r0
;;
(isAP) mov r2=r3
#else
- movl r2=init_thread_union
+ movl r2=init_task
cmp.eq isBP,isAP=r0,r0
#endif
;;
diff -Nru a/arch/ia64/kernel/init_task.c b/arch/ia64/kernel/init_task.c
--- a/arch/ia64/kernel/init_task.c Wed Jul 2 14:00:44 2003
+++ b/arch/ia64/kernel/init_task.c Wed Jul 2 14:00:44 2003
@@ -26,17 +26,17 @@
* We need to make sure that this is properly aligned due to the way process stacks are
* handled. This is done by having a special ".data.init_task" section...
*/
-#define init_thread_info init_thread_union.s.thread_info
+#define init_thread_info init_task_mem.s.thread_info
-union init_thread {
+static union {
struct {
struct task_struct task;
struct thread_info thread_info;
} s;
unsigned long stack[KERNEL_STACK_SIZE/sizeof (unsigned long)];
-} init_thread_union __attribute__((section(".data.init_task"))) = {{
- .task = INIT_TASK(init_thread_union.s.task),
- .thread_info = INIT_THREAD_INFO(init_thread_union.s.task)
+} init_task_mem __attribute__((section(".data.init_task"))) = {{
+ .task = INIT_TASK(init_task_mem.s.task),
+ .thread_info = INIT_THREAD_INFO(init_task_mem.s.task)
}};
-asm (".global init_task; init_task = init_thread_union");
+asm (".global init_task; init_task = init_task_mem");
diff -Nru a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
--- a/arch/ia64/kernel/iosapic.c Wed Jul 2 14:00:04 2003
+++ b/arch/ia64/kernel/iosapic.c Wed Jul 2 14:00:04 2003
@@ -382,7 +382,7 @@
static void
iosapic_ack_edge_irq (unsigned int irq)
{
- irq_desc_t *idesc = irq_desc(irq);
+ irq_desc_t *idesc = irq_descp(irq);
/*
* Once we have recorded IRQ_PENDING already, we can mask the
* interrupt for real. This prevents IRQ storms from unhandled
@@ -478,7 +478,7 @@
else
irq_type = &irq_type_iosapic_level;
- idesc = irq_desc(vector);
+ idesc = irq_descp(vector);
if (idesc->handler != irq_type) {
if (idesc->handler != &no_irq_type)
printk(KERN_WARNING "%s: changing vector %d from %s to %s\n",
@@ -724,7 +724,7 @@
* If vector was previously initialized to a different
* handler, re-initialize.
*/
- idesc = irq_desc(vector);
+ idesc = irq_descp(vector);
if (idesc->handler != irq_type)
register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, IOSAPIC_POL_LOW,
IOSAPIC_LEVEL);
diff -Nru a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
--- a/arch/ia64/kernel/irq.c Wed Jul 2 14:00:38 2003
+++ b/arch/ia64/kernel/irq.c Wed Jul 2 14:00:38 2003
@@ -74,7 +74,7 @@
};
#ifdef CONFIG_IA64_GENERIC
-struct irq_desc * __ia64_irq_desc (unsigned int irq)
+irq_desc_t * __ia64_irq_desc (unsigned int irq)
{
return _irq_desc + irq;
}
@@ -171,7 +171,7 @@
seq_putc(p, '\n');
for (i = 0 ; i < NR_IRQS ; i++) {
- idesc = irq_desc(i);
+ idesc = irq_descp(i);
spin_lock_irqsave(&idesc->lock, flags);
action = idesc->action;
if (!action)
@@ -218,7 +218,7 @@
#ifdef CONFIG_SMP
inline void synchronize_irq(unsigned int irq)
{
- while (irq_desc(irq)->status & IRQ_INPROGRESS)
+ while (irq_descp(irq)->status & IRQ_INPROGRESS)
cpu_relax();
}
#endif
@@ -352,7 +352,7 @@
inline void disable_irq_nosync(unsigned int irq)
{
- irq_desc_t *desc = irq_desc(irq);
+ irq_desc_t *desc = irq_descp(irq);
unsigned long flags;
spin_lock_irqsave(&desc->lock, flags);
@@ -395,7 +395,7 @@
void enable_irq(unsigned int irq)
{
- irq_desc_t *desc = irq_desc(irq);
+ irq_desc_t *desc = irq_descp(irq);
unsigned long flags;
spin_lock_irqsave(&desc->lock, flags);
@@ -437,7 +437,7 @@
* 0 return value means that this irq is already being
* handled by some other CPU. (or is disabled)
*/
- irq_desc_t *desc = irq_desc(irq);
+ irq_desc_t *desc = irq_descp(irq);
struct irqaction * action;
irqreturn_t action_ret;
unsigned int status;
@@ -620,7 +620,7 @@
if (irq >= NR_IRQS)
return;
- desc = irq_desc(irq);
+ desc = irq_descp(irq);
spin_lock_irqsave(&desc->lock,flags);
p = &desc->action;
for (;;) {
@@ -682,7 +682,7 @@
* flush such a longstanding irq before considering it as spurious.
*/
for (i = NR_IRQS-1; i > 0; i--) {
- desc = irq_desc(i);
+ desc = irq_descp(i);
spin_lock_irq(&desc->lock);
if (!desc->action)
@@ -700,7 +700,7 @@
* happened in the previous stage, it may have masked itself)
*/
for (i = NR_IRQS-1; i > 0; i--) {
- desc = irq_desc(i);
+ desc = irq_descp(i);
spin_lock_irq(&desc->lock);
if (!desc->action) {
@@ -722,7 +722,7 @@
*/
val = 0;
for (i = 0; i < NR_IRQS; i++) {
- irq_desc_t *desc = irq_desc(i);
+ irq_desc_t *desc = irq_descp(i);
unsigned int status;
spin_lock_irq(&desc->lock);
@@ -762,7 +762,7 @@
mask = 0;
for (i = 0; i < 16; i++) {
- irq_desc_t *desc = irq_desc(i);
+ irq_desc_t *desc = irq_descp(i);
unsigned int status;
spin_lock_irq(&desc->lock);
@@ -807,7 +807,7 @@
nr_irqs = 0;
irq_found = 0;
for (i = 0; i < NR_IRQS; i++) {
- irq_desc_t *desc = irq_desc(i);
+ irq_desc_t *desc = irq_descp(i);
unsigned int status;
spin_lock_irq(&desc->lock);
@@ -836,7 +836,7 @@
int shared = 0;
unsigned long flags;
struct irqaction *old, **p;
- irq_desc_t *desc = irq_desc(irq);
+ irq_desc_t *desc = irq_descp(irq);
if (desc->handler == &no_irq_type)
return -ENOSYS;
@@ -963,15 +963,16 @@
}
static int irq_affinity_write_proc (struct file *file, const char *buffer,
- unsigned long count, void *data)
+ unsigned long count, void *data)
{
unsigned int irq = (unsigned long) data;
int full_count = count, err;
unsigned long new_value;
const char *buf = buffer;
+ irq_desc_t *desc = irq_descp(irq);
int redir;
- if (!irq_desc(irq)->handler->set_affinity)
+ if (!desc->handler->set_affinity)
return -EIO;
if (buf[0] == 'r' || buf[0] == 'R') {
@@ -993,8 +994,7 @@
if (!(new_value & cpu_online_map))
return -EINVAL;
- irq_desc(irq)->handler->set_affinity(irq | (redir? IA64_IRQ_REDIRECTED : 0), new_value);
-
+ desc->handler->set_affinity(irq | (redir? IA64_IRQ_REDIRECTED : 0), new_value);
return full_count;
}
@@ -1030,7 +1030,7 @@
{
char name [MAX_NAMELEN];
- if (!root_irq_dir || (irq_desc(irq)->handler == &no_irq_type) || irq_dir[irq])
+ if (!root_irq_dir || (irq_descp(irq)->handler == &no_irq_type) || irq_dir[irq])
return;
memset(name, 0, MAX_NAMELEN);
@@ -1083,7 +1083,7 @@
* Create entries for all existing IRQs.
*/
for (i = 0; i < NR_IRQS; i++) {
- if (irq_desc(i)->handler == &no_irq_type)
+ if (irq_descp(i)->handler == &no_irq_type)
continue;
register_irq_proc(i);
}
diff -Nru a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
--- a/arch/ia64/kernel/irq_ia64.c Wed Jul 2 14:00:00 2003
+++ b/arch/ia64/kernel/irq_ia64.c Wed Jul 2 14:00:00 2003
@@ -162,7 +162,7 @@
for (irq = 0; irq < NR_IRQS; ++irq)
if (irq_to_vector(irq) == vec) {
- desc = irq_desc(irq);
+ desc = irq_descp(irq);
desc->status |= IRQ_PER_CPU;
desc->handler = &irq_type_ia64_lsapic;
if (action)
diff -Nru a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
--- a/arch/ia64/kernel/mca.c Wed Jul 2 14:00:03 2003
+++ b/arch/ia64/kernel/mca.c Wed Jul 2 14:00:03 2003
@@ -734,7 +734,7 @@
if (cpev >= 0) {
for (irq = 0; irq < NR_IRQS; ++irq)
if (irq_to_vector(irq) == cpev) {
- desc = irq_desc(irq);
+ desc = irq_descp(irq);
desc->status |= IRQ_PER_CPU;
desc->handler = &irq_type_iosapic_level;
setup_irq(irq, &mca_cpe_irqaction);
diff -Nru a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
--- a/arch/ia64/kernel/perfmon.c Wed Jul 2 14:00:40 2003
+++ b/arch/ia64/kernel/perfmon.c Wed Jul 2 14:00:40 2003
@@ -115,6 +115,8 @@
#define PMD_IS_COUNTING(i) ((pmu_conf.pmd_desc[i].type & PFM_REG_COUNTING) == PFM_REG_COUNTING)
#define PMC_IS_COUNTING(i) ((pmu_conf.pmc_desc[i].type & PFM_REG_COUNTING) == PFM_REG_COUNTING)
#define PMC_IS_MONITOR(i) ((pmu_conf.pmc_desc[i].type & PFM_REG_MONITOR) == PFM_REG_MONITOR)
+#define PMC_IS_CONTROL(i) ((pmu_conf.pmc_desc[i].type & PFM_REG_CONTROL) == PFM_REG_CONTROL)
+
#define PMC_DFL_VAL(i) pmu_conf.pmc_desc[i].default_value
#define PMC_RSVD_MASK(i) pmu_conf.pmc_desc[i].reserved_mask
#define PMD_PMD_DEP(i) pmu_conf.pmd_desc[i].dep_pmd[0]
@@ -232,6 +234,8 @@
*/
#define PMC0_HAS_OVFL(cmp0) (cmp0 & ~0x1UL)
+#define PFMFS_MAGIC 0xa0b4d889
+
/*
* debugging
*/
@@ -328,7 +332,7 @@
pfm_counter_t ctx_pmds[IA64_NUM_PMD_REGS]; /* software state for PMDS */
- u64 ctx_saved_psr; /* copy of psr used for ctxsw */
+ u64 ctx_saved_psr_up; /* only contains psr.up value */
unsigned long ctx_last_activation; /* context last activation number for last_cpu */
unsigned int ctx_last_cpu; /* CPU id of current or last CPU used (SMP only) */
@@ -560,100 +564,6 @@
close: pfm_vm_close
};
-/*
- * Linux 2.5 vs. 2.4 helper macros and definitions
- *
- * if not at least 2.5.69, then assume 2.4.x.
- */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69)
-
-#define PFM_COMPILED_FOR_2_4 1
-
-#include
-
-#define pfm_get_cpu_var(v) local_cpu_data->v
-#define pfm_get_cpu_data(a,b) cpu_data((b))->a
-typedef void pfm_irq_handler_t;
-#define PFM_IRQ_HANDLER_RET(v)
-
-#define DEFINE_PER_CPU(a,b)
-
-static inline int
-pfm_wait_task_inactive(struct task_struct *task)
-{
-#ifdef CONFIG_SMP
- /* Make sure the child gets off its CPU.. */
- for (;;) {
- task_lock(task);
- if (!task_has_cpu(task)) break;
- task_unlock(task);
- do {
- if (task->state != TASK_STOPPED)
- return -ESRCH;
- barrier();
- cpu_relax();
- } while (task_has_cpu(task));
- }
- task_unlock(task);
-#endif
- return 0;
-}
-
-static inline void
-pfm_put_task(struct task_struct *task)
-{
- if (task != current) free_task_struct(task);
-}
-
-static inline void
-pfm_set_task_notify(struct task_struct *task)
-{
-}
-
-static inline void
-pfm_clear_task_notify(void)
-{
-}
-
-static inline void
-pfm_reserve_page(unsigned long a)
-{
- unsigned long page;
-
- page = ia64_tpa(a);
- mem_map_reserve(virt_to_page(__va(page)));
-}
-
-static inline void
-pfm_unreserve_page(unsigned long a)
-{
- unsigned long page;
-
- page = ia64_tpa(a);
- mem_map_unreserve(virt_to_page(__va(page)));
-}
-
-static inline int
-pfm_remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long phys_addr, unsigned long size, pgprot_t prot)
-{
- return remap_page_range(from, phys_addr, size, prot);
-}
-
-static inline unsigned long
-pfm_protect_ctx_ctxsw(pfm_context_t *x)
-{
- unsigned long f;
- spin_lock(&(x)->ctx_lock);
- return f;
-}
-
-static inline unsigned long
-pfm_unprotect_ctx_ctxsw(pfm_context_t *x, unsigned long f)
-{
- spin_unlock(&(x)->ctx_lock);
-}
-
-#else /* 2.5.69 or higher */
#define pfm_wait_task_inactive(t) wait_task_inactive(t)
#define pfm_get_cpu_var(v) __get_cpu_var(v)
@@ -705,7 +615,7 @@
static inline unsigned long
pfm_protect_ctx_ctxsw(pfm_context_t *x)
{
- spin_lock_irq(&(x)->ctx_lock);
+ spin_lock(&(x)->ctx_lock);
return 0UL;
}
@@ -715,7 +625,30 @@
spin_unlock(&(x)->ctx_lock);
}
-#endif /* 2.5 vs. 2.4 */
+static inline unsigned int
+pfm_do_munmap(struct mm_struct *mm, unsigned long addr, size_t len, int acct)
+{
+ return do_munmap(mm, addr, len);
+}
+
+static inline unsigned long
+pfm_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags, unsigned long exec)
+{
+ return get_unmapped_area(file, addr, len, pgoff, flags);
+}
+
+
+static struct super_block *
+pfmfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data)
+{
+ return get_sb_pseudo(fs_type, "pfm:", NULL, PFMFS_MAGIC);
+}
+
+static struct file_system_type pfm_fs_type = {
+ .name = "pfmfs",
+ .get_sb = pfmfs_get_sb,
+ .kill_sb = kill_anon_super,
+};
DEFINE_PER_CPU(unsigned long, pfm_syst_info);
DEFINE_PER_CPU(struct task_struct *, pmu_owner);
@@ -758,13 +691,13 @@
static inline void
pfm_clear_psr_up(void)
{
- __asm__ __volatile__ ("rum psr.up;; srlz.i;;"::: "memory");
+ __asm__ __volatile__ ("rsm psr.up;; srlz.i;;"::: "memory");
}
static inline void
pfm_set_psr_up(void)
{
- __asm__ __volatile__ ("sum psr.up;; srlz.i;;"::: "memory");
+ __asm__ __volatile__ ("ssm psr.up;; srlz.i;;"::: "memory");
}
static inline unsigned long
@@ -1502,7 +1435,7 @@
DPRINT(("down_write done smpl_vaddr=%p size=%lu\n", vaddr, size));
- r = do_munmap(task->mm, (unsigned long)vaddr, size);
+ r = pfm_do_munmap(task->mm, (unsigned long)vaddr, size, 0);
up_write(&task->mm->mmap_sem);
if (r !=0) {
@@ -1569,68 +1502,6 @@
* d_name - pfm: will go nicely and kill the special-casing in procfs.
*/
static struct vfsmount *pfmfs_mnt;
-#define PFMFS_MAGIC 0xa0b4d889
-
-#ifdef PFM_COMPILED_FOR_2_4
-
-static int
-pfmfs_statfs(struct super_block *sb, struct statfs *buf)
-{
- buf->f_type = PFMFS_MAGIC;
- buf->f_bsize = 1024;
- buf->f_namelen = 255;
- return 0;
-}
-
-static struct super_operations pfmfs_ops = {
- statfs: pfmfs_statfs,
-};
-
-static struct super_block *
-pfmfs_read_super(struct super_block *sb, void *data, int silent)
-{
- struct inode *root = new_inode(sb);
- if (!root)
- return NULL;
- root->i_mode = S_IFDIR | S_IRUSR | S_IWUSR;
- root->i_uid = root->i_gid = 0;
- root->i_atime = root->i_mtime = root->i_ctime = CURRENT_TIME;
- sb->s_blocksize = 1024;
- sb->s_blocksize_bits = 10;
- sb->s_magic = PFMFS_MAGIC;
- sb->s_op = &pfmfs_ops;
- sb->s_root = d_alloc(NULL, &(const struct qstr) { "pfm:", 4, 0 });
- if (!sb->s_root) {
- iput(root);
- return NULL;
- }
- sb->s_root->d_sb = sb;
- sb->s_root->d_parent = sb->s_root;
- d_instantiate(sb->s_root, root);
- return sb;
-}
-
-//static DECLARE_FSTYPE(pfm_fs_type, "pfmfs", pfmfs_read_super, FS_NOMOUNT);
-static struct file_system_type pfm_fs_type = {
- name: "pfmfs",
- read_super: pfmfs_read_super,
- fs_flags: FS_NOMOUNT,
-};
-
-#else /* ! COMPILED_FOR_2_4 */
-
-static struct super_block *
-pfmfs_get_sb(struct file_system_type *fs_type, int flags, char *dev_name, void *data)
-{
- return get_sb_pseudo(fs_type, "pfm:", NULL, PFMFS_MAGIC);
-}
-
-static struct file_system_type pfm_fs_type = {
- .name = "pfmfs",
- .get_sb = pfmfs_get_sb,
- .kill_sb = kill_anon_super,
-};
-#endif /* COMPILED_FOR_2_4 */
static int __init
init_pfm_fs(void)
@@ -2453,7 +2324,7 @@
down_write(&task->mm->mmap_sem);
/* find some free area in address space, must have mmap sem held */
- vma->vm_start = get_unmapped_area(NULL, 0, size, 0, MAP_PRIVATE|MAP_ANONYMOUS);
+ vma->vm_start = pfm_get_unmapped_area(NULL, 0, size, 0, MAP_PRIVATE|MAP_ANONYMOUS, 0);
if (vma->vm_start == 0UL) {
DPRINT(("Cannot find unmapped area for size %ld\n", size));
up_write(&task->mm->mmap_sem);
@@ -3020,7 +2891,7 @@
* as attempts to modify PMC[0-3] which are used
* as status registers by the PMU
*/
- if (!PMC_IS_IMPL(cnum) || cnum < 4) {
+ if (PMC_IS_IMPL(cnum) == 0 || PMC_IS_CONTROL(cnum)) {
DPRINT(("pmc%u is unimplemented or invalid\n", cnum));
goto error;
}
@@ -4124,7 +3995,7 @@
/*
* monitoring disabled in kernel at next reschedule
*/
- ctx->ctx_saved_psr &= ~IA64_PSR_UP;
+ ctx->ctx_saved_psr_up = 0;
printk("pfm_stop: current [%d] task=[%d]\n", current->pid, ctx->ctx_task->pid);
}
return 0;
@@ -4198,7 +4069,7 @@
* start monitoring at the kernel level the next
* time the task is scheduled
*/
- ctx->ctx_saved_psr |= IA64_PSR_UP;
+ ctx->ctx_saved_psr_up = IA64_PSR_UP;
/*
* activate monitoring at user level
@@ -4429,7 +4300,7 @@
SET_LAST_CPU(ctx, -1);
/* initial saved psr (stopped) */
- ctx->ctx_saved_psr = pfm_get_psr() & ~(IA64_PSR_PP|IA64_PSR_UP);
+ ctx->ctx_saved_psr_up = 0UL;
ia64_psr(regs)->up = ia64_psr(regs)->pp = 0;
if (ctx->ctx_fl_unsecure) {
@@ -5640,6 +5511,7 @@
unsigned long flags;
u64 psr;
+
ctx = PFM_GET_CTX(task);
if (ctx == NULL) goto save_error;
t = &task->thread;
@@ -5672,9 +5544,9 @@
* sanity check
*/
if (ctx->ctx_last_activation != GET_ACTIVATION()) {
- DPRINT(("ctx_activation=%lu activation=%lu state=%d: no save\n",
+ printk("ctx_activation=%lu activation=%lu state=%d: no save\n",
ctx->ctx_last_activation,
- GET_ACTIVATION(), ctx->ctx_state));
+ GET_ACTIVATION(), ctx->ctx_state);
pfm_unprotect_ctx_ctxsw(ctx, flags);
@@ -5684,8 +5556,11 @@
/*
* save current PSR: needed because we modify it
*/
+ ia64_srlz_d();
psr = pfm_get_psr();
+ BUG_ON(psr & (IA64_PSR_I));
+
/*
* stop monitoring:
* This is the last instruction which may generate an overflow
@@ -5696,9 +5571,13 @@
pfm_clear_psr_up();
/*
- * keep a copy of the saved psr (for reload)
+ * keep a copy of psr.up (for reload)
*/
- ctx->ctx_saved_psr = psr;
+ ctx->ctx_saved_psr_up = psr & IA64_PSR_UP;
+
+ { u64 foo = pfm_get_psr();
+ BUG_ON(foo & ((IA64_PSR_UP|IA64_PSR_PP)));
+ }
/*
* release ownership of this PMU.
@@ -5772,18 +5651,16 @@
pfm_clear_psr_up();
/*
- * keep a copy of the saved psr (for reload)
+ * keep a copy of psr.up (for reload)
*/
- ctx->ctx_saved_psr = psr;
+ ctx->ctx_saved_psr_up = psr & IA64_PSR_UP;
- psr = pfm_get_psr();
- if (psr & IA64_PSR_UP) {
- printk(KERN_ERR " perfmon: pfm_save_regs: psr.up set current [%d] owner [%d] psr=0x%lx\n", current->pid, GET_PMU_OWNER()->pid, psr);
- }
- if (psr & IA64_PSR_I) {
- printk(KERN_ERR " perfmon: pfm_save_regs: psr.i set current [%d] owner [%d] psr=0x%lx\n", current->pid, GET_PMU_OWNER()->pid, psr);
+#if 1
+ { u64 foo = pfm_get_psr();
+ BUG_ON(foo & (IA64_PSR_I));
+ BUG_ON(foo & ((IA64_PSR_UP|IA64_PSR_PP)));
}
-
+#endif
return;
save_error:
printk(KERN_ERR "perfmon: pfm_save_regs CPU%d [%d] NULL context PM_VALID=%ld\n",
@@ -5797,13 +5674,10 @@
pfm_context_t *ctx;
struct thread_struct *t;
unsigned long flags;
- unsigned long psr;
#if 1
- psr = pfm_get_psr();
- if (psr & IA64_PSR_UP) {
- printk(KERN_ERR " perfmon: pfm_lazy_save_regs: psr.up set current [%d] owner [%d] psr=0x%lx\n", current->pid, task->pid, psr);
- pfm_clear_psr_up();
+ { u64 foo = pfm_get_psr();
+ BUG_ON(foo & IA64_PSR_UP);
}
#endif
@@ -5864,10 +5738,9 @@
{
pfm_context_t *ctx;
struct thread_struct *t;
- struct task_struct *owner;
unsigned long pmc_mask = 0UL, pmd_mask = 0UL;
unsigned long flags;
- u64 psr;
+ u64 psr, psr_up;
ctx = PFM_GET_CTX(task);
if (unlikely(ctx == NULL)) {
@@ -5875,22 +5748,21 @@
return;
}
- owner = GET_PMU_OWNER();
+ BUG_ON(GET_PMU_OWNER());
+
t = &task->thread;
+ psr = pfm_get_psr();
#if 1
- psr = pfm_get_psr();
- BUG_ON(psr & IA64_PSR_UP);
- psr = pfm_get_psr();
+ BUG_ON(psr & (IA64_PSR_UP|IA64_PSR_PP));
BUG_ON(psr & IA64_PSR_I);
#endif
-
/*
* possible on unload
*/
if (unlikely((t->flags & IA64_THREAD_PM_VALID) == 0)) {
- DPRINT(("[%d] PM_VALID=0, nothing to do\n", task->pid));
+ printk("[%d] PM_VALID=0, nothing to do\n", task->pid);
return;
}
@@ -5923,19 +5795,15 @@
/*
* we restore ALL the debug registers to avoid picking up
* stale state.
- *
- * This must be done even when the task is still the owner
- * as the registers may have been modified via ptrace()
- * (not perfmon) by the previous task.
*/
if (ctx->ctx_fl_using_dbreg) {
pfm_restore_ibrs(ctx->ctx_ibrs, pmu_conf.num_ibrs);
pfm_restore_dbrs(ctx->ctx_dbrs, pmu_conf.num_dbrs);
}
/*
- * retrieve saved psr
+ * retrieve saved psr.up
*/
- psr = ctx->ctx_saved_psr;
+ psr_up = ctx->ctx_saved_psr_up;
/*
* if we were the last user of the PMU on that CPU,
@@ -5968,8 +5836,8 @@
*/
pmc_mask = ctx->ctx_all_pmcs[0];
- DPRINT(("full reload for [%d] owner=%d activation=%lu last_activation=%lu last_cpu=%d pmd_mask=0x%lx pmc_mask=0x%lx\n",
- task->pid, owner ? owner->pid : -1,
+ DPRINT(("full reload for [%d] activation=%lu last_activation=%lu last_cpu=%d pmd_mask=0x%lx pmc_mask=0x%lx\n",
+ task->pid,
GET_ACTIVATION(), ctx->ctx_last_activation,
GET_LAST_CPU(ctx), pmd_mask, pmc_mask));
@@ -6026,9 +5894,9 @@
SET_PMU_OWNER(task, ctx);
/*
- * restore the psr we changed
+ * restore the psr.up bit
*/
- pfm_set_psr_l(psr);
+ if (likely(psr_up)) pfm_set_psr_up();
/*
* allow concurrent access to context
@@ -6047,21 +5915,16 @@
pfm_context_t *ctx;
struct task_struct *owner;
unsigned long pmd_mask, pmc_mask;
- u64 psr;
+ u64 psr, psr_up;
- owner = GET_PMU_OWNER();
- ctx = PFM_GET_CTX(task);
- t = &task->thread;
+ owner = GET_PMU_OWNER();
+ ctx = PFM_GET_CTX(task);
+ t = &task->thread;
+ psr = pfm_get_psr();
#if 1
- psr = pfm_get_psr();
- if (psr & IA64_PSR_UP) {
- printk(KERN_ERR " perfmon: pfm_load_regs: psr.up set current [%d] owner [%d] psr=0x%lx\n", current->pid, owner->pid, psr);
- }
- psr = pfm_get_psr();
- if (psr & IA64_PSR_I) {
- printk(KERN_ERR " perfmon: pfm_load_regs: psr.i set current [%d] owner [%d] psr=0x%lx\n", current->pid, owner->pid, psr);
- }
+ BUG_ON(psr & (IA64_PSR_UP|IA64_PSR_PP));
+ BUG_ON(psr & IA64_PSR_I);
#endif
/*
@@ -6078,9 +5941,9 @@
}
/*
- * retrieved save psr
+ * retrieved saved psr.up
*/
- psr = ctx->ctx_saved_psr;
+ psr_up = ctx->ctx_saved_psr_up;
/*
* short path, our state is still there, just
@@ -6091,7 +5954,7 @@
* concurrency even without interrupt masking.
*/
if (likely(owner == task)) {
- pfm_set_psr_l(psr);
+ if (likely(psr_up)) pfm_set_psr_up();
return;
}
@@ -6163,8 +6026,7 @@
* restore the psr. This is the point at which
* new overflow interrupts can be generated again.
*/
- pfm_set_psr_l(psr);
-
+ if (likely(psr_up)) pfm_set_psr_up();
}
#endif /* CONFIG_SMP */
@@ -6469,13 +6331,13 @@
printk("pmd[%d]=0x%lx tpmd=0x%lx\n", i, ia64_get_pmd(i), t->pmds[i]);
}
if (ctx) {
- printk("ctx_state=%d vaddr=%p addr=%p fd=%d ctx_task=[%d] saved_psr=0x%lx\n",
+ printk("ctx_state=%d vaddr=%p addr=%p fd=%d ctx_task=[%d] saved_psr_up=0x%lx\n",
ctx->ctx_state,
ctx->ctx_smpl_vaddr,
ctx->ctx_smpl_hdr,
ctx->ctx_msgq_head,
ctx->ctx_msgq_tail,
- ctx->ctx_saved_psr);
+ ctx->ctx_saved_psr_up);
}
}
diff -Nru a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
--- a/arch/ia64/kernel/smpboot.c Wed Jul 2 13:59:56 2003
+++ b/arch/ia64/kernel/smpboot.c Wed Jul 2 13:59:56 2003
@@ -452,7 +452,7 @@
sapicid = smp_boot_data.cpu_phys_id[i];
if (sapicid == boot_cpu_id)
continue;
- phys_cpu_present_map |= (1 << cpu);
+ phys_cpu_present_map |= (1UL << cpu);
ia64_cpu_to_sapicid[cpu] = sapicid;
cpu++;
}
diff -Nru a/arch/ia64/lib/Makefile b/arch/ia64/lib/Makefile
--- a/arch/ia64/lib/Makefile Wed Jul 2 14:00:41 2003
+++ b/arch/ia64/lib/Makefile Wed Jul 2 14:00:41 2003
@@ -12,12 +12,7 @@
lib-$(CONFIG_ITANIUM) += copy_page.o copy_user.o memcpy.o
lib-$(CONFIG_MCKINLEY) += copy_page_mck.o memcpy_mck.o
lib-$(CONFIG_PERFMON) += carta_random.o
-
-ifeq ($(CONFIG_MD_RAID5),m)
- lib-y += xor.o
-else
- lib-$(CONFIG_MD_RAID5) += xor.o
-endif
+lib-$(CONFIG_MD_RAID5) += xor.o
IGNORE_FLAGS_OBJS = __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \
__divdi3.o __udivdi3.o __moddi3.o __umoddi3.o
diff -Nru a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
--- a/arch/ia64/pci/pci.c Wed Jul 2 14:00:02 2003
+++ b/arch/ia64/pci/pci.c Wed Jul 2 14:00:02 2003
@@ -53,21 +53,21 @@
* synchronization mechanism here.
*/
-#define PCI_SAL_ADDRESS(seg, bus, dev, fn, reg) \
+#define PCI_SAL_ADDRESS(seg, bus, devfn, reg) \
((u64)(seg << 24) | (u64)(bus << 16) | \
- (u64)(dev << 11) | (u64)(fn << 8) | (u64)(reg))
+ (u64)(devfn << 8) | (u64)(reg))
static int
-pci_sal_read (int seg, int bus, int dev, int fn, int reg, int len, u32 *value)
+pci_sal_read (int seg, int bus, int devfn, int reg, int len, u32 *value)
{
int result = 0;
u64 data = 0;
- if (!value || (seg > 255) || (bus > 255) || (dev > 31) || (fn > 7) || (reg > 255))
+ if (!value || (seg > 255) || (bus > 255) || (devfn > 255) || (reg > 255))
return -EINVAL;
- result = ia64_sal_pci_config_read(PCI_SAL_ADDRESS(seg, bus, dev, fn, reg), len, &data);
+ result = ia64_sal_pci_config_read(PCI_SAL_ADDRESS(seg, bus, devfn, reg), len, &data);
*value = (u32) data;
@@ -75,12 +75,12 @@
}
static int
-pci_sal_write (int seg, int bus, int dev, int fn, int reg, int len, u32 value)
+pci_sal_write (int seg, int bus, int devfn, int reg, int len, u32 value)
{
- if ((seg > 255) || (bus > 255) || (dev > 31) || (fn > 7) || (reg > 255))
+ if ((seg > 255) || (bus > 255) || (devfn > 255) || (reg > 255))
return -EINVAL;
- return ia64_sal_pci_config_write(PCI_SAL_ADDRESS(seg, bus, dev, fn, reg), len, value);
+ return ia64_sal_pci_config_write(PCI_SAL_ADDRESS(seg, bus, devfn, reg), len, value);
}
struct pci_raw_ops pci_sal_ops = {
@@ -95,14 +95,14 @@
pci_read (struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *value)
{
return raw_pci_ops->read(pci_domain_nr(bus), bus->number,
- PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, value);
+ devfn, where, size, value);
}
static int
pci_write (struct pci_bus *bus, unsigned int devfn, int where, int size, u32 value)
{
return raw_pci_ops->write(pci_domain_nr(bus), bus->number,
- PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, value);
+ devfn, where, size, value);
}
static struct pci_ops pci_root_ops = {
@@ -284,21 +284,21 @@
}
struct pci_bus *
-pcibios_scan_root (void *handle, int seg, int bus)
+pci_acpi_scan_root (struct acpi_device *device, int domain, int bus)
{
struct pci_root_info info;
struct pci_controller *controller;
unsigned int windows = 0;
char *name;
- printk("PCI: Probing PCI hardware on bus (%02x:%02x)\n", seg, bus);
- controller = alloc_pci_controller(seg);
+ printk("PCI: Probing PCI hardware on bus (%04x:%02x)\n", domain, bus);
+ controller = alloc_pci_controller(domain);
if (!controller)
goto out1;
- controller->acpi_handle = handle;
+ controller->acpi_handle = device->handle;
- acpi_walk_resources(handle, METHOD_NAME__CRS, count_window, &windows);
+ acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window, &windows);
controller->window = kmalloc(sizeof(*controller->window) * windows, GFP_KERNEL);
if (!controller->window)
goto out2;
@@ -307,10 +307,10 @@
if (!name)
goto out3;
- sprintf(name, "PCI Bus %02x:%02x", seg, bus);
+ sprintf(name, "PCI Bus %04x:%02x", domain, bus);
info.controller = controller;
info.name = name;
- acpi_walk_resources(handle, METHOD_NAME__CRS, add_window, &info);
+ acpi_walk_resources(device->handle, METHOD_NAME__CRS, add_window, &info);
return scan_root_bus(bus, &pci_root_ops, controller);
@@ -363,8 +363,6 @@
return;
}
-
-#warning pcibios_update_resource() is now a generic implementation - please check
void __devinit
pcibios_update_irq (struct pci_dev *dev, int irq)
diff -Nru a/arch/ia64/scripts/toolchain-flags b/arch/ia64/scripts/toolchain-flags
--- a/arch/ia64/scripts/toolchain-flags Wed Jul 2 14:00:42 2003
+++ b/arch/ia64/scripts/toolchain-flags Wed Jul 2 14:00:42 2003
@@ -3,15 +3,13 @@
# Check whether linker can handle cross-segment @segrel():
#
CC=$1
-LD=$2
-OBJDUMP=$3
+OBJDUMP=$2
dir=$(dirname $0)
tmp=${TMPDIR:-/tmp}
out=$tmp/out$$
-$CC -c $dir/check-segrel.S -o $out.o
-$LD -static -T$dir/check-segrel.lds $out.o -o $out
+$CC -nostdlib -static -Wl,-T$dir/check-segrel.lds $dir/check-segrel.S -o $out
res=$($OBJDUMP --full --section .rodata $out | fgrep 000 | cut -f3 -d' ')
-rm -f $out $out.o
+rm -f $out
if [ $res != 00000a00 ]; then
echo " -DHAVE_BUGGY_SEGREL"
cat >&2 <
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#define SGI_IFCONFIG_NET "SGI-PERSISTENT NETWORK DEVICE NAME DRIVER"
-#define SGI_IFCONFIG_NET_VERSION "1.0"
-
-/*
- * Some Global definitions.
- */
-static devfs_handle_t ifconfig_net_handle;
-static unsigned long ifconfig_net_debug;
-
-/*
- * ifconfig_net_open - Opens the special device node "/devhw/.ifconfig_net".
- */
-static int ifconfig_net_open(struct inode * inode, struct file * filp)
-{
- if (ifconfig_net_debug) {
- printk("ifconfig_net_open called.\n");
- }
-
- return(0);
-
-}
-
-/*
- * ifconfig_net_close - Closes the special device node "/devhw/.ifconfig_net".
- */
-static int ifconfig_net_close(struct inode * inode, struct file * filp)
-{
-
- if (ifconfig_net_debug) {
- printk("ifconfig_net_close called.\n");
- }
-
- return(0);
-}
-
-/*
- * assign_ifname - Assign the next available interface name from the persistent list.
- */
-void
-assign_ifname(struct net_device *dev,
- struct ifname_num *ifname_num)
-
-{
-
- /*
- * Handle eth devices.
- */
- if ( (memcmp(dev->name, "eth", 3) == 0) ) {
- if (ifname_num->next_eth != -1) {
- /*
- * Assign it the next available eth interface number.
- */
- memset(dev->name, 0, strlen(dev->name));
- sprintf(dev->name, "eth%d", (int)ifname_num->next_eth);
- ifname_num->next_eth++;
- }
-
- return;
- }
-
- /*
- * Handle fddi devices.
- */
- if ( (memcmp(dev->name, "fddi", 4) == 0) ) {
- if (ifname_num->next_fddi != -1) {
- /*
- * Assign it the next available fddi interface number.
- */
- memset(dev->name, 0, strlen(dev->name));
- sprintf(dev->name, "fddi%d", (int)ifname_num->next_fddi);
- ifname_num->next_fddi++;
- }
-
- return;
- }
-
- /*
- * Handle hip devices.
- */
- if ( (memcmp(dev->name, "hip", 3) == 0) ) {
- if (ifname_num->next_hip != -1) {
- /*
- * Assign it the next available hip interface number.
- */
- memset(dev->name, 0, strlen(dev->name));
- sprintf(dev->name, "hip%d", (int)ifname_num->next_hip);
- ifname_num->next_hip++;
- }
-
- return;
- }
-
- /*
- * Handle tr devices.
- */
- if ( (memcmp(dev->name, "tr", 2) == 0) ) {
- if (ifname_num->next_tr != -1) {
- /*
- * Assign it the next available tr interface number.
- */
- memset(dev->name, 0, strlen(dev->name));
- sprintf(dev->name, "tr%d", (int)ifname_num->next_tr);
- ifname_num->next_tr++;
- }
-
- return;
- }
-
- /*
- * Handle fc devices.
- */
- if ( (memcmp(dev->name, "fc", 2) == 0) ) {
- if (ifname_num->next_fc != -1) {
- /*
- * Assign it the next available fc interface number.
- */
- memset(dev->name, 0, strlen(dev->name));
- sprintf(dev->name, "fc%d", (int)ifname_num->next_fc);
- ifname_num->next_fc++;
- }
-
- return;
- }
-}
-
-/*
- * find_persistent_ifname: Returns the entry that was seen in previous boot.
- */
-struct ifname_MAC *
-find_persistent_ifname(struct net_device *dev,
- struct ifname_MAC *ifname_MAC)
-
-{
-
- while (ifname_MAC->addr_len) {
- if (memcmp(dev->dev_addr, ifname_MAC->dev_addr, dev->addr_len) == 0)
- return(ifname_MAC);
-
- ifname_MAC++;
- }
-
- return(NULL);
-}
-
-/*
- * ifconfig_net_ioctl: ifconfig_net driver ioctl interface.
- */
-static int ifconfig_net_ioctl(struct inode * inode, struct file * file,
- unsigned int cmd, unsigned long arg)
-{
-
- extern struct net_device *__dev_get_by_name(const char *);
-#ifdef CONFIG_NET
- struct net_device *dev;
- struct ifname_MAC *found;
- char temp[64];
-#endif
- struct ifname_MAC *ifname_MAC;
- struct ifname_MAC *new_devices, *temp_new_devices;
- struct ifname_num *ifname_num;
- unsigned long size;
-
-
- if (ifconfig_net_debug) {
- printk("HCL: hcl_ioctl called.\n");
- }
-
- /*
- * Read in the header and see how big of a buffer we really need to
- * allocate.
- */
- ifname_num = (struct ifname_num *) kmalloc(sizeof(struct ifname_num),
- GFP_KERNEL);
- copy_from_user( ifname_num, (char *) arg, sizeof(struct ifname_num));
- size = ifname_num->size;
- kfree(ifname_num);
- ifname_num = (struct ifname_num *) kmalloc(size, GFP_KERNEL);
- ifname_MAC = (struct ifname_MAC *) ((char *)ifname_num + (sizeof(struct ifname_num)) );
-
- copy_from_user( ifname_num, (char *) arg, size);
- new_devices = kmalloc(size - sizeof(struct ifname_num), GFP_KERNEL);
- temp_new_devices = new_devices;
-
- memset(new_devices, 0, size - sizeof(struct ifname_num));
-
-#ifdef CONFIG_NET
- /*
- * Go through the net device entries and make them persistent!
- */
- for (dev = dev_base; dev != NULL; dev = dev->next) {
- /*
- * Skip NULL entries or "lo"
- */
- if ( (dev->addr_len == 0) || ( !strncmp(dev->name, "lo", strlen(dev->name))) ){
- continue;
- }
-
- /*
- * See if we have a persistent interface name for this device.
- */
- found = NULL;
- found = find_persistent_ifname(dev, ifname_MAC);
- if (found) {
- strcpy(dev->name, found->name);
- } else {
- /* Never seen this before .. */
- assign_ifname(dev, ifname_num);
-
- /*
- * Save the information for the next boot.
- */
- sprintf(temp,"%s %02x:%02x:%02x:%02x:%02x:%02x\n", dev->name,
- dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
- dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
- strcpy(temp_new_devices->name, dev->name);
- temp_new_devices->addr_len = dev->addr_len;
- memcpy(temp_new_devices->dev_addr, dev->dev_addr, dev->addr_len);
- temp_new_devices++;
- }
-
- }
-#endif
-
- /*
- * Copy back to the User Buffer area any new devices encountered.
- */
- copy_to_user((char *)arg + (sizeof(struct ifname_num)), new_devices,
- size - sizeof(struct ifname_num));
-
- return(0);
-
-}
-
-struct file_operations ifconfig_net_fops = {
- ioctl:ifconfig_net_ioctl, /* ioctl */
- open:ifconfig_net_open, /* open */
- release:ifconfig_net_close /* release */
-};
-
-
-/*
- * init_ifconfig_net() - Boot time initialization. Ensure that it is called
- * after devfs has been initialized.
- *
- */
-#ifdef MODULE
-int init_module (void)
-#else
-int __init init_ifconfig_net(void)
-#endif
-{
- ifconfig_net_handle = NULL;
- ifconfig_net_handle = hwgraph_register(hwgraph_root, ".ifconfig_net",
- 0, 0,
- 0, 0,
- S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP, 0, 0,
- &ifconfig_net_fops, NULL);
-
- if (ifconfig_net_handle == NULL) {
- panic("Unable to create SGI PERSISTENT NETWORK DEVICE Name Driver.\n");
- }
-
- return(0);
-
-}
diff -Nru a/arch/ia64/sn/io/hwgfs/hcl.c b/arch/ia64/sn/io/hwgfs/hcl.c
--- a/arch/ia64/sn/io/hwgfs/hcl.c Wed Jul 2 14:00:07 2003
+++ b/arch/ia64/sn/io/hwgfs/hcl.c Wed Jul 2 14:00:07 2003
@@ -113,22 +113,10 @@
}
struct file_operations hcl_fops = {
- (struct module *)0,
- NULL, /* lseek - default */
- NULL, /* read - general block-dev read */
- NULL, /* write - general block-dev write */
- NULL, /* readdir - bad */
- NULL, /* poll */
- hcl_ioctl, /* ioctl */
- NULL, /* mmap */
- hcl_open, /* open */
- NULL, /* flush */
- hcl_close, /* release */
- NULL, /* fsync */
- NULL, /* fasync */
- NULL, /* lock */
- NULL, /* readv */
- NULL, /* writev */
+ .owner = (struct module *)0,
+ .ioctl = hcl_ioctl,
+ .open = hcl_open,
+ .release = hcl_close,
};
@@ -140,7 +128,6 @@
{
extern void string_table_init(struct string_table *);
extern struct string_table label_string_table;
- extern int init_ifconfig_net(void);
extern int init_ioconfig_bus(void);
extern int init_hwgfs_fs(void);
int rv = 0;
@@ -195,7 +182,6 @@
* Initialize the ifconfgi_net driver that does network devices
* Persistent Naming.
*/
- init_ifconfig_net();
init_ioconfig_bus();
return(0);
@@ -258,6 +244,7 @@
if (!de) {
printk(KERN_WARNING "HCL: hwgraph_fastinfo_get handle given is NULL.\n");
+ dump_stack();
return(-1);
}
@@ -568,7 +555,7 @@
* In this case the vertex was previous created with a REAL pathname.
*/
rv = hwgfs_mk_symlink (from, (const char *)name,
- DEVFS_FL_DEFAULT, link,
+ 0, link,
&handle, NULL);
kfree(path);
kfree(link);
diff -Nru a/arch/ia64/sn/io/machvec/pci.c b/arch/ia64/sn/io/machvec/pci.c
--- a/arch/ia64/sn/io/machvec/pci.c Wed Jul 2 13:59:57 2003
+++ b/arch/ia64/sn/io/machvec/pci.c Wed Jul 2 13:59:57 2003
@@ -49,6 +49,8 @@
vertex_hdl_t device_vertex;
device_vertex = devfn_to_vertex(bus->number, devfn);
+ if (!device_vertex)
+ return PCIBIOS_DEVICE_NOT_FOUND;
res = pciio_config_get(device_vertex, (unsigned) where, size);
*val = (unsigned int) res;
return PCIBIOS_SUCCESSFUL;
@@ -59,6 +61,8 @@
vertex_hdl_t device_vertex;
device_vertex = devfn_to_vertex(bus->number, devfn);
+ if (!device_vertex)
+ return PCIBIOS_DEVICE_NOT_FOUND;
pciio_config_set( device_vertex, (unsigned)where, size, (uint64_t) val);
return PCIBIOS_SUCCESSFUL;
}
diff -Nru a/arch/ia64/sn/io/machvec/pci_dma.c b/arch/ia64/sn/io/machvec/pci_dma.c
--- a/arch/ia64/sn/io/machvec/pci_dma.c Wed Jul 2 13:59:58 2003
+++ b/arch/ia64/sn/io/machvec/pci_dma.c Wed Jul 2 13:59:58 2003
@@ -280,7 +280,7 @@
*/
for (i = 0; i < nents; i++, sg++) {
phys_addr = __pa(sg->dma_address ? sg->dma_address :
- page_address(sg->page) + sg->offset);
+ (unsigned long)page_address(sg->page) + sg->offset);
/*
* Handle the most common case: 64 bit cards. This
@@ -578,7 +578,7 @@
{
BUG_ON(dev->bus != &pci_bus_type);
- return pci_dma_supported(to_pci_dev(dev), mask);
+ return sn_pci_dma_supported(to_pci_dev(dev), mask);
}
EXPORT_SYMBOL(sn_dma_supported);
@@ -587,7 +587,11 @@
{
BUG_ON(dev->bus != &pci_bus_type);
- return pci_set_dma_mask(to_pci_dev(dev), dma_mask);
+ if (!sn_dma_supported(dev, dma_mask))
+ return 0;
+
+ dev->dma_mask = dma_mask;
+ return 1;
}
EXPORT_SYMBOL(sn_dma_set_mask);
@@ -597,7 +601,7 @@
{
BUG_ON(dev->bus != &pci_bus_type);
- return pci_alloc_consistent(to_pci_dev(dev), size, dma_handle);
+ return sn_pci_alloc_consistent(to_pci_dev(dev), size, dma_handle);
}
EXPORT_SYMBOL(sn_dma_alloc_coherent);
@@ -607,7 +611,7 @@
{
BUG_ON(dev->bus != &pci_bus_type);
- pci_free_consistent(to_pci_dev(dev), size, cpu_addr, dma_handle);
+ sn_pci_free_consistent(to_pci_dev(dev), size, cpu_addr, dma_handle);
}
EXPORT_SYMBOL(sn_dma_free_coherent);
@@ -617,7 +621,7 @@
{
BUG_ON(dev->bus != &pci_bus_type);
- return pci_map_single(to_pci_dev(dev), cpu_addr, size, (int)direction);
+ return sn_pci_map_single(to_pci_dev(dev), cpu_addr, size, (int)direction);
}
EXPORT_SYMBOL(sn_dma_map_single);
@@ -627,7 +631,7 @@
{
BUG_ON(dev->bus != &pci_bus_type);
- pci_unmap_single(to_pci_dev(dev), dma_addr, size, (int)direction);
+ sn_pci_unmap_single(to_pci_dev(dev), dma_addr, size, (int)direction);
}
EXPORT_SYMBOL(sn_dma_unmap_single);
@@ -658,7 +662,7 @@
{
BUG_ON(dev->bus != &pci_bus_type);
- return pci_map_sg(to_pci_dev(dev), sg, nents, (int)direction);
+ return sn_pci_map_sg(to_pci_dev(dev), sg, nents, (int)direction);
}
EXPORT_SYMBOL(sn_dma_map_sg);
@@ -668,7 +672,7 @@
{
BUG_ON(dev->bus != &pci_bus_type);
- pci_unmap_sg(to_pci_dev(dev), sg, nhwentries, (int)direction);
+ sn_pci_unmap_sg(to_pci_dev(dev), sg, nhwentries, (int)direction);
}
EXPORT_SYMBOL(sn_dma_unmap_sg);
@@ -678,7 +682,7 @@
{
BUG_ON(dev->bus != &pci_bus_type);
- pci_dma_sync_single(to_pci_dev(dev), dma_handle, size, (int)direction);
+ sn_pci_dma_sync_single(to_pci_dev(dev), dma_handle, size, (int)direction);
}
EXPORT_SYMBOL(sn_dma_sync_single);
@@ -688,7 +692,7 @@
{
BUG_ON(dev->bus != &pci_bus_type);
- pci_dma_sync_sg(to_pci_dev(dev), sg, nelems, (int)direction);
+ sn_pci_dma_sync_sg(to_pci_dev(dev), sg, nelems, (int)direction);
}
EXPORT_SYMBOL(sn_dma_sync_sg);
diff -Nru a/arch/ia64/sn/kernel/Makefile b/arch/ia64/sn/kernel/Makefile
--- a/arch/ia64/sn/kernel/Makefile Wed Jul 2 13:59:53 2003
+++ b/arch/ia64/sn/kernel/Makefile Wed Jul 2 13:59:53 2003
@@ -9,7 +9,8 @@
EXTRA_CFLAGS := -DLITTLE_ENDIAN
-obj-y := probe.o setup.o sv.o bte.o irq.o mca.o sn2/
+obj-y := probe.o setup.o sv.o bte.o irq.o mca.o \
+ idle.o sn2/
obj-$(CONFIG_IA64_GENERIC) += machvec.o
obj-$(CONFIG_MODULES) += sn_ksyms.o
diff -Nru a/arch/ia64/sn/kernel/idle.c b/arch/ia64/sn/kernel/idle.c
--- a/arch/ia64/sn/kernel/idle.c Wed Jul 2 14:00:44 2003
+++ b/arch/ia64/sn/kernel/idle.c Wed Jul 2 14:00:44 2003
@@ -12,7 +12,7 @@
void snidle(int state) {
if (state) {
- if (pda.idle_flag == 0) {
+ if (pda->idle_flag == 0) {
/*
* Turn the activity LED off.
*/
@@ -24,13 +24,13 @@
SIMULATOR_SLEEP();
#endif
- pda.idle_flag = 1;
+ pda->idle_flag = 1;
} else {
/*
* Turn the activity LED on.
*/
set_led_bits(LED_CPU_ACTIVITY, LED_CPU_ACTIVITY);
- pda.idle_flag = 0;
+ pda->idle_flag = 0;
}
}
diff -Nru a/arch/ia64/sn/kernel/machvec.c b/arch/ia64/sn/kernel/machvec.c
--- a/arch/ia64/sn/kernel/machvec.c Wed Jul 2 14:00:07 2003
+++ b/arch/ia64/sn/kernel/machvec.c Wed Jul 2 14:00:07 2003
@@ -31,4 +31,5 @@
*/
#define MACHVEC_PLATFORM_NAME sn2
+#define MACHVEC_PLATFORM_HEADER
#include
diff -Nru a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
--- a/arch/ia64/sn/kernel/setup.c Wed Jul 2 13:59:57 2003
+++ b/arch/ia64/sn/kernel/setup.c Wed Jul 2 13:59:57 2003
@@ -75,11 +75,13 @@
#define pxm_to_nasid(pxm) ((pxm)<<1)
+#define MAX_PHYS_MEMORY (1UL << 49) /* 1 TB */
+
extern void bte_init_node (nodepda_t *, cnodeid_t);
extern void bte_init_cpu (void);
-extern void sn_timer_init (void);
+extern void sn_timer_init(void);
extern void (*ia64_mark_idle)(int);
-void snidle(int);
+extern void snidle(int);
unsigned long sn_rtc_cycles_per_second;
@@ -296,21 +298,20 @@
*/
sn_check_for_wars();
+ ia64_mark_idle = &snidle;
+
/*
* For the bootcpu, we do this here. All other cpus will make the
* call as part of cpu_init in slave cpu initialization.
*/
sn_cpu_init();
-
#ifdef CONFIG_SMP
init_smp_config();
#endif
screen_info = sn_screen_info;
sn_timer_init();
-
- ia64_mark_idle = &snidle;
}
/**
@@ -437,20 +438,4 @@
}
bte_init_cpu();
-}
-
-void snidle(int idleness)
-{
- if (!idleness) {
- if (pda->idle_flag == 0) {
- set_led_bits(0, LED_CPU_ACTIVITY);
- }
-
- pda->idle_flag = 1;
- }
- else {
- set_led_bits(LED_CPU_ACTIVITY, LED_CPU_ACTIVITY);
-
- pda->idle_flag = 0;
- }
}
diff -Nru a/arch/m68k/Kconfig b/arch/m68k/Kconfig
--- a/arch/m68k/Kconfig Wed Jul 2 14:00:09 2003
+++ b/arch/m68k/Kconfig Wed Jul 2 14:00:09 2003
@@ -585,32 +585,7 @@
source "drivers/ide/Kconfig"
-
-menu "SCSI device support"
-
-config SCSI
- tristate "SCSI device support"
- ---help---
- If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
- any other SCSI device under Linux, say Y and make sure that you know
- the name of your SCSI host adapter (the card inside your computer
- that "speaks" the SCSI protocol, also called SCSI controller),
- because you will be asked for it.
-
- You also need to say Y here if you want support for the parallel
- port version of the 100 MB IOMEGA ZIP drive.
-
- This driver is also available as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want).
- The module will be called scsi_mod. If you want to compile it as
- a module, say M here and read and
- . However, do not compile this as a
- module if your root file system (the one containing the directory /)
- is located on a SCSI device.
-
source "drivers/scsi/Kconfig"
-
-endmenu
source "net/Kconfig"
diff -Nru a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
--- a/arch/m68knommu/Kconfig Wed Jul 2 14:00:13 2003
+++ b/arch/m68knommu/Kconfig Wed Jul 2 14:00:13 2003
@@ -499,6 +499,7 @@
default y
config KCORE_ELF
+ bool
default y
source "fs/Kconfig.binfmt"
@@ -527,59 +528,9 @@
source "drivers/ide/Kconfig"
-
-menu "SCSI device support"
-
-config SCSI
- tristate "SCSI device support"
- help
- If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
- any other SCSI device under Linux, say Y and make sure that you know
- the name of your SCSI host adapter (the card inside your computer
- that "speaks" the SCSI protocol, also called SCSI controller),
- because you will be asked for it.
-
source "drivers/scsi/Kconfig"
-endmenu
-
-
-menu "Old CD-ROM drivers (not SCSI, not IDE)"
- depends on ISA
-
-config CD_NO_IDESCSI
- bool "Support non-SCSI/IDE/ATAPI CDROM drives"
- ---help---
- If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
- here, otherwise N. Read the CD-ROM-HOWTO, available from
- .
-
- Note that the answer to this question doesn't directly affect the
- kernel: saying N will just cause the configurator to skip all
- the questions about these CD-ROM drives. If you are unsure what you
- have, say Y and find out whether you have one of the following
- drives.
-
- For each of these drivers, a file Documentation/cdrom/{driver_name}
- exists. Especially in cases where you do not know exactly which kind
- of drive you have you should read there. Most of these drivers use a
- file drivers/cdrom/{driver_name}.h where you can define your
- interface parameters and switch some internal goodies.
-
- All these CD-ROM drivers are also usable as a module ( = code which
- can be inserted in and removed from the running kernel whenever you
- want). If you want to compile them as module, say M instead of Y and
- read .
-
- If you want to use any of these CD-ROM drivers, you also have to
- answer Y or M to "ISO 9660 CD-ROM file system support" below (this
- answer will get "defaulted" for you if you enable any of the Linux
- CD-ROM drivers).
-
source "drivers/cdrom/Kconfig"
-
-endmenu
-
source "drivers/md/Kconfig"
diff -Nru a/arch/m68knommu/kernel/time.c b/arch/m68knommu/kernel/time.c
--- a/arch/m68knommu/kernel/time.c Wed Jul 2 14:00:11 2003
+++ b/arch/m68knommu/kernel/time.c Wed Jul 2 14:00:11 2003
@@ -162,28 +162,33 @@
tv->tv_usec = usec;
}
-void do_settimeofday(struct timeval *tv)
+int do_settimeofday(struct timespec *tv)
{
+ if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
+ return -EINVAL;
+
write_seqlock_irq(&xtime_lock);
- /* This is revolting. We need to set the xtime.tv_usec
+ /*
+ * This is revolting. We need to set the xtime.tv_usec
* correctly. However, the value in this location is
* is value at the last tick.
* Discover what correction gettimeofday
* would have done, and then undo it!
*/
if (mach_gettimeoffset)
- tv->tv_usec -= mach_gettimeoffset();
+ tv->tv_nsec -= (mach_gettimeoffset() * 1000);
- while (tv->tv_usec < 0) {
- tv->tv_usec += 1000000;
+ while (tv->tv_nsec < 0) {
+ tv->tv_nsec += NSEC_PER_SEC;
tv->tv_sec--;
}
xtime.tv_sec = tv->tv_sec;
- xtime.tv_nsec = (tv->tv_usec * 1000);
+ xtime.tv_nsec = tv->tv_nsec;
time_adjust = 0; /* stop active adjtime() */
time_status |= STA_UNSYNC;
time_maxerror = NTP_PHASE_LIMIT;
time_esterror = NTP_PHASE_LIMIT;
write_sequnlock_irq(&xtime_lock);
+ return 0;
}
diff -Nru a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c
--- a/arch/m68knommu/kernel/traps.c Wed Jul 2 14:00:01 2003
+++ b/arch/m68knommu/kernel/traps.c Wed Jul 2 14:00:01 2003
@@ -82,7 +82,7 @@
printk("Process %s (pid: %d, stackpage=%08lx)\n",
current->comm, current->pid, PAGE_SIZE+(unsigned long)current);
- show_stack((unsigned long *)fp);
+ show_stack(NULL, (unsigned long *)fp);
do_exit(SIGSEGV);
}
@@ -106,7 +106,7 @@
int kstack_depth_to_print = 48;
-void show_stack(unsigned long *esp)
+void show_stack(struct task_struct *task, unsigned long *esp)
{
unsigned long *stack, *endstack, addr;
extern char _start, _etext;
diff -Nru a/arch/m68knommu/platform/5206e/MOTOROLA/crt0_ram.S b/arch/m68knommu/platform/5206e/MOTOROLA/crt0_ram.S
--- a/arch/m68knommu/platform/5206e/MOTOROLA/crt0_ram.S Wed Jul 2 13:59:56 2003
+++ b/arch/m68knommu/platform/5206e/MOTOROLA/crt0_ram.S Wed Jul 2 13:59:56 2003
@@ -96,6 +96,7 @@
movec %d0, %CACR /* Enable cache */
+#ifdef CONFIG_ROMFS_FS
/*
* Move ROM filesystem above bss :-)
*/
@@ -116,6 +117,12 @@
move.l %d0, -(%a1)
cmp.l %a0, %a2 /* Check if at end */
bne _copy_romfs
+
+#else /* CONFIG_ROMFS_FS */
+ lea.l _ebss, %a1
+ move.l %a1, _ramstart
+#endif /* CONFIG_ROMFS_FS */
+
/*
* Zero out the bss region.
diff -Nru a/arch/m68knommu/platform/5272/NETtel/crt0_ram.S b/arch/m68knommu/platform/5272/NETtel/crt0_ram.S
--- a/arch/m68knommu/platform/5272/NETtel/crt0_ram.S Wed Jul 2 14:00:18 2003
+++ b/arch/m68knommu/platform/5272/NETtel/crt0_ram.S Wed Jul 2 14:00:18 2003
@@ -116,6 +116,8 @@
movec %d0, %CACR /* Enable cache */
nop
+
+#ifdef CONFIG_ROMFS_FS
#ifdef CONFIG_ROMFS_FROM_ROM
/*
* check for an in RAM romfs
@@ -159,6 +161,12 @@
move.l %a1, _ramstart /* Set start of ram */
done_romfs:
#endif
+
+#else /* CONFIG_ROMFS_FS */
+ lea.l _ebss, %a1
+ move.l %a1, _ramstart
+#endif /* CONFIG_ROMFS_FS */
+
/*
* Zero out the bss region.
diff -Nru a/arch/m68knommu/platform/5282/MOTOROLA/crt0_ram.S b/arch/m68knommu/platform/5282/MOTOROLA/crt0_ram.S
--- a/arch/m68knommu/platform/5282/MOTOROLA/crt0_ram.S Wed Jul 2 14:00:15 2003
+++ b/arch/m68knommu/platform/5282/MOTOROLA/crt0_ram.S Wed Jul 2 14:00:15 2003
@@ -115,6 +115,8 @@
nop
#endif
+
+#ifdef CONFIG_ROMFS_FS
/*
* Move ROM filesystem above bss :-)
*/
@@ -135,6 +137,11 @@
move.l %d0, -(%a1)
cmp.l %a0, %a2 /* Check if at end */
bne _copy_romfs
+#else /* CONFIG_ROMFS_FS */
+ lea.l _ebss, %a1
+ move.l %a1, _ramstart
+#endif /* CONFIG_ROMFS_FS */
+
/*
* Zero out the bss region.
diff -Nru a/arch/m68knommu/platform/5282/pit.c b/arch/m68knommu/platform/5282/pit.c
--- a/arch/m68knommu/platform/5282/pit.c Wed Jul 2 14:00:18 2003
+++ b/arch/m68knommu/platform/5282/pit.c Wed Jul 2 14:00:18 2003
@@ -17,6 +17,7 @@
#include
#include
#include
+#include
#include
#include
#include
diff -Nru a/arch/m68knommu/platform/5307/ARNEWSH/crt0_ram.S b/arch/m68knommu/platform/5307/ARNEWSH/crt0_ram.S
--- a/arch/m68knommu/platform/5307/ARNEWSH/crt0_ram.S Wed Jul 2 13:59:59 2003
+++ b/arch/m68knommu/platform/5307/ARNEWSH/crt0_ram.S Wed Jul 2 13:59:59 2003
@@ -110,6 +110,8 @@
movc %d0,%CACR
nop
+
+#ifdef CONFIG_ROMFS_FS
/*
* Move ROM filesystem above bss :-)
*/
@@ -130,6 +132,12 @@
move.l %d0, -(%a1)
cmp.l %a0, %a2 /* Check if at end */
bne _copy_romfs
+
+#else /* CONFIG_ROMFS_FS */
+ lea.l _ebss, %a1
+ move.l %a1, _ramstart
+#endif /* CONFIG_ROMFS_FS */
+
/*
* Zero out the bss region.
diff -Nru a/arch/m68knommu/platform/5307/config.c b/arch/m68knommu/platform/5307/config.c
--- a/arch/m68knommu/platform/5307/config.c Wed Jul 2 13:59:52 2003
+++ b/arch/m68knommu/platform/5307/config.c Wed Jul 2 13:59:52 2003
@@ -102,9 +102,12 @@
{
mcf_setimr(MCFSIM_IMR_MASKALL);
-#if defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
- defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \
- defined(CONFIG_CLEOPATRA)
+#if defined(CONFIG_BOOTPARAM)
+ strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
+ commandp[size-1] = 0;
+#elif defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
+ defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \
+ defined(CONFIG_CLEOPATRA)
/* Copy command line from FLASH to local buffer... */
memcpy(commandp, (char *) 0xf0004000, size);
commandp[size-1] = 0;
diff -Nru a/arch/m68knommu/platform/68360/ints.c b/arch/m68knommu/platform/68360/ints.c
--- a/arch/m68knommu/platform/68360/ints.c Wed Jul 2 13:59:45 2003
+++ b/arch/m68knommu/platform/68360/ints.c Wed Jul 2 13:59:45 2003
@@ -40,23 +40,21 @@
extern void *_ramvec[];
+/* The number of spurious interrupts */
+volatile unsigned int num_spurious;
+unsigned int local_irq_count[NR_CPUS];
+
/* irq node variables for the 32 (potential) on chip sources */
-static irq_node_t *int_irq_list[INTERNAL_IRQS];
+static irq_node_t int_irq_list[INTERNAL_IRQS];
-static int int_irq_count[INTERNAL_IRQS];
static short int_irq_ablecount[INTERNAL_IRQS];
-static void int_badint(int irq, void *dev_id, struct pt_regs *fp)
-{
- num_spurious += 1;
-}
-
/*
* This function should be called during kernel startup to initialize
* IRQ handling routines.
*/
-void M68360_init_IRQ(void)
+void init_IRQ(void)
{
int i;
int vba = (CPM_VECTOR_BASE<<4);
@@ -128,13 +126,14 @@
/* initialize handlers */
for (i = 0; i < INTERNAL_IRQS; i++) {
- int_irq_list[i] = NULL;
-
- int_irq_ablecount[i] = 0;
- int_irq_count[i] = 0;
+ int_irq_list[i].handler = NULL;
+ int_irq_list[i].flags = IRQ_FLG_STD;
+ int_irq_list[i].dev_id = NULL;
+ int_irq_list[i].devname = NULL;
}
}
+#if 0
void M68360_insert_irq(irq_node_t **list, irq_node_t *node)
{
unsigned long flags;
@@ -178,9 +177,10 @@
local_irq_restore(flags);
printk ("%s: tried to remove invalid irq\n", __FUNCTION__);
}
+#endif
-int M68360_request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *),
- unsigned long flags, const char *devname, void *dev_id)
+int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *),
+ unsigned long flags, const char *devname, void *dev_id)
{
int mask = (1<flags = IRQ_FLG_STD;
- }
-
- if (!(int_irq_list[irq]->flags & IRQ_FLG_STD)) {
- if (int_irq_list[irq]->flags & IRQ_FLG_LOCK) {
+ if (!(int_irq_list[irq].flags & IRQ_FLG_STD)) {
+ if (int_irq_list[irq].flags & IRQ_FLG_LOCK) {
printk("%s: IRQ %d from %s is not replaceable\n",
- __FUNCTION__, irq, int_irq_list[irq]->devname);
+ __FUNCTION__, irq, int_irq_list[irq].devname);
return -EBUSY;
}
if (flags & IRQ_FLG_REPLACE) {
printk("%s: %s can't replace IRQ %d from %s\n",
- __FUNCTION__, devname, irq, int_irq_list[irq]->devname);
+ __FUNCTION__, devname, irq, int_irq_list[irq].devname);
return -EBUSY;
}
}
- int_irq_list[irq]->handler = handler;
- int_irq_list[irq]->flags = flags;
- int_irq_list[irq]->dev_id = dev_id;
- int_irq_list[irq]->devname = devname;
+ int_irq_list[irq].handler = handler;
+ int_irq_list[irq].flags = flags;
+ int_irq_list[irq].dev_id = dev_id;
+ int_irq_list[irq].devname = devname;
/* enable in the CIMR */
if (!int_irq_ablecount[irq])
@@ -221,24 +216,25 @@
return 0;
}
-void M68360_free_irq(unsigned int irq, void *dev_id)
+void free_irq(unsigned int irq, void *dev_id)
{
if (irq >= INTERNAL_IRQS) {
printk ("%s: Unknown IRQ %d\n", __FUNCTION__, irq);
return;
}
- if (int_irq_list[irq]->dev_id != dev_id)
+ if (int_irq_list[irq].dev_id != dev_id)
printk("%s: removing probably wrong IRQ %d from %s\n",
- __FUNCTION__, irq, int_irq_list[irq]->devname);
- int_irq_list[irq]->handler = int_badint;
- int_irq_list[irq]->flags = IRQ_FLG_STD;
- int_irq_list[irq]->dev_id = NULL;
- int_irq_list[irq]->devname = NULL;
+ __FUNCTION__, irq, int_irq_list[irq].devname);
+ int_irq_list[irq].handler = NULL;
+ int_irq_list[irq].flags = IRQ_FLG_STD;
+ int_irq_list[irq].dev_id = NULL;
+ int_irq_list[irq].devname = NULL;
*(volatile unsigned long *)0xfffff304 |= 1<handler) {
- int_irq_list[irq]->handler(irq , int_irq_list[irq]->dev_id, fp);
- int_irq_count[irq]++;
+ if (int_irq_list[irq].handler) {
+ int_irq_list[irq].handler(irq , int_irq_list[irq].dev_id, fp);
+ kstat_cpu(0).irqs[irq]++;
pquicc->intr_cisr = (1 << vec); /* indicate that irq has been serviced */
} else {
printk("unregistered interrupt %d!\nTurning it off in the CIMR...\n", irq);
/* *(volatile unsigned long *)0xfffff304 |= mask; */
pquicc->intr_cimr &= ~(1 << vec);
+ num_spurious += 1;
}
}
-
-void config_M68360_irq(void)
-{
- mach_default_handler = NULL;
- mach_init_IRQ = M68360_init_IRQ;
- mach_request_irq = M68360_request_irq;
- mach_free_irq = M68360_free_irq;
- mach_enable_irq = M68360_enable_irq;
- mach_disable_irq = M68360_disable_irq;
- mach_process_int = M68360_do_irq;
-}
-
diff -Nru a/arch/mips/Kconfig b/arch/mips/Kconfig
--- a/arch/mips/Kconfig Wed Jul 2 14:00:04 2003
+++ b/arch/mips/Kconfig Wed Jul 2 14:00:04 2003
@@ -6,1113 +6,12 @@
bool
default y
-config MMU
+config MIPS32
bool
default y
-config SMP
+config MIPS64
bool
- ---help---
- This enables support for systems with more than one CPU. If you have
- a system with only one CPU, like most personal computers, say N. If
- you have a system with more than one CPU, say Y.
-
- If you say N here, the kernel will run on single and multiprocessor
- machines, but will use only one CPU of a multiprocessor machine. If
- you say Y here, the kernel will run on many, but not all,
- singleprocessor machines. On a singleprocessor machine, the kernel
- will run faster if you say N here.
-
- Note that if you say Y here and choose architecture "586" or
- "Pentium" under "Processor family", the kernel will not work on 486
- architectures. Similarly, multiprocessor kernels for the "PPro"
- architecture may not work on all Pentium based boards.
-
- People using multiprocessor machines who say Y here should also say
- Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
- Management" code will be disabled if you say Y here.
-
- See also the ,
- , ,
- and the SMP-HOWTO available at
- .
-
- If you don't know what to do here, say N.
-
-config GENERIC_ISA_DMA
- bool
- default y
-
-
-mainmenu "Linux Kernel Configuration"
-
-source "init/Kconfig"
-
-
-menu "Machine selection"
-
-config ACER_PICA_61
- bool "Support for Acer PICA 1 chipset (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- help
- This is a machine with a R4400 133/150 MHz CPU. To compile a Linux
- kernel that runs on these, say Y here. For details about Linux on
- the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at
- .
-
-config ALGOR_P4032
- bool "Support for Algorithmics P4032 (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- help
- This is an evaluation board of the British company Algorithmics.
- The board uses the R4300 and a R5230 CPUs. For more information
- about this board see .
-
-config BAGET_MIPS
- bool "Support for BAGET MIPS series (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- help
- This enables support for the Baget, a Russian embedded system. For
- more details about the Baget see the Linux/MIPS FAQ on
- .
-
-config DECSTATION
- bool "Support for DECstations (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- ---help---
- This enables support for DEC's MIPS based workstations. For details
- see the Linux/MIPS FAQ on and the
- DECstation porting pages on .
-
- If you have one of the following DECstation Models you definitely
- want to choose R4xx0 for the CPU Type:
-
- DECstation 5000/50
- DECstation 5000/150
- DECstation 5000/260
- DECsystem 5900/260
-
- otherwise choose R3000.
-
-config DDB5074
- bool "Support for NEC DDB Vrc-5074 (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- help
- This enables support for the VR5000-based NEC DDB Vrc-5074
- evaluation board.
-
-config MIPS_EV96100
- bool "Support for Galileo EV96100 Evaluation board (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- help
- This is an evaluation board based on the Galielo GT-96100 LAN/WAN
- communications controllers containing a MIPS R5000 compatible core
- running at 83MHz. Their website is . Say Y
- here if you wish to build a kernel for this platform.
-
-config MIPS_EV64120
- bool "Support for Galileo EV64120 Evaluation board (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- help
- This is an evaluation board based on the Galileo GT-64120
- single-chip system controller that contains a MIPS R5000 compatible
- core running at 75/100MHz. Their website is located at
- . Say Y here if you wish to build a
- kernel for this platform.
-
-config EVB_PCI1
- bool "Enable Second PCI (PCI1)"
- depends on MIPS_EV64120
-
-choice
- prompt "Galileo Chip Clock"
- depends on MIPS_EV64120
-
-config SYSCLK_75
- bool "75"
-
-config SYSCLK_83
- bool "83.3"
-
-config SYSCLK_100_1
- bool "100"
-
-endchoice
-
-config MIPS_ATLAS
- bool "Support for MIPS Atlas board (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- help
- This enables support for the QED R5231-based MIPS Atlas evaluation
- board.
-
-config MIPS_MALTA
- bool "Support for MIPS Malta board (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- help
- This enables support for the VR5000-based MIPS Malta evaluation
- board.
-
-config NINO
- bool "Support for Philips Nino (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- help
- Say Y here to select a kernel for the Philips Nino Palm PC. The
- website at
- will have more information.
-
-choice
- prompt "Nino Model Number"
- depends on NINO
-
-config NINO_4MB
- bool "Model-300/301/302/319"
- help
- Say Y here to build a kernel specifically for Nino Palm PCs with
- 4MB of memory. These include models 300/301/302/319.
-
-config NINO_8MB
- bool "Model-200/210/312/320/325/350/390"
- help
- Say Y here to build a kernel specifically for Nino Palm PCs with
- 8MB of memory. These include models 200/210/312/320/325/350/390.
-
-config NINO_16MB
- bool "Model-500/510"
- help
- Say Y here to build a kernel specifically for Nino 500/501 color
- Palm PCs from Philips (INCOMPLETE).
-
-endchoice
-
-config MIPS_MAGNUM_4000
- bool "Support for Mips Magnum 4000"
- help
- This is a machine with a R4000 100 MHz CPU. To compile a Linux
- kernel that runs on these, say Y here. For details about Linux on
- the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at
- .
-
-config MOMENCO_OCELOT
- bool "Support for Momentum Ocelot board"
- help
- The Ocelot is a MIPS-based Single Board Computer (SBC) made by
- Momentum Computer .
-
-config DDB5476
- bool "Support for NEC DDB Vrc-5476"
- help
- This enables support for the R5432-based NEC DDB Vrc-5476
- evaluation board.
-
- Features : kernel debugging, serial terminal, NFS root fs, on-board
- ether port (Need an additional patch at ),
- USB, AC97, PCI, PCI VGA card & framebuffer console, IDE controller,
- PS2 keyboard, PS2 mouse, etc.
-
-config DDB5477
- bool "Support for NEC DDB Vrc-5477"
- help
- This enables support for the R5432-based NEC DDB Vrc-5477
- evaluation board.
-
- Features : kernel debugging, serial terminal, NFS root fs, on-board
- ether port (Need an additional patch at ),
- USB, AC97, PCI, etc.
-
-config OLIVETTI_M700
- bool "Support for Olivetti M700-10"
- help
- This is a machine with a R4000 100 MHz CPU. To compile a Linux
- kernel that runs on these, say Y here. For details about Linux on
- the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at
- .
-
-config SGI_IP22
- bool "Support for SGI IP22"
- help
- This are the SGI Indy, Challenge S and Indigo2, as well as certain
- OEM variants like the Tandem CMN B006S. To compile a Linux kernel
- that runs on these, say Y here.
-
-config SNI_RM200_PCI
- bool "Support for SNI RM200 PCI"
- help
- The SNI RM200 PCI was a MIPS-based platform manufactured by Siemens
- Nixdorf Informationssysteme (SNI), parent company of Pyramid
- Technology and now in turn merged with Fujitsu. Say Y here to
- support this machine type.
-
-config MIPS_ITE8172
- bool "Support for ITE 8172G board"
- help
- Ths is an evaluation board made by ITE
- with ATX form factor that utilizes a MIPS R5000 to work with its
- ITE8172G companion internet appliance chip. The MIPS core can be
- either a NEC Vr5432 or QED RM5231. Say Y here if you wish to build
- a kernel for this platform.
-
-config IT8172_REVC
- bool "Support for older IT8172 (Rev C)"
- depends on MIPS_ITE8172
- help
- Say Y here to support the older, Revision C version of the Integrated
- Technology Express, Inc. ITE8172 SBC. Vendor page at
- ; picture of the
- board at .
-
-config QTRONIX_KEYBOARD
- bool "Enable Qtronix 990P Keyboard Support"
- depends on MIPS_IVR || MIPS_ITE8172
- help
- Images of Qtronix keyboards are at
- .
-
-config IT8172_CIR
- bool
- depends on QTRONIX_KEYBOARD && (MIPS_IVR || MIPS_ITE8172)
- default y
-
-config PC_KEYB
- bool "Enable PS2 Keyboard Support" if MIPS_ITE8172 && !QTRONIX_KEYBOARD
- default y if NINO || MIPS_ITE8172 || DDB5476 || DDB5074 || SNI_RM200_PCI || SGI_IP22 || ACER_PICA_61 || MIPS_MAGNUM_4000 || OLIVETTI_M700
-
-config IT8172_SCR0
- bool "Enable Smart Card Reader 0 Support "
- depends on MIPS_IVR || MIPS_ITE8172
- help
- Say Y here to support smart-card reader 0 (SCR0) on the Integrated
- Technology Express, Inc. ITE8172 SBC. Vendor page at
- ; picture of the
- board at .
-
-config IT8172_SCR1
- bool "Enable Smart Card Reader 1 Support "
- depends on MIPS_ITE8172
- help
- Say Y here to support smart-card reader 1 (SCR1) on the Integrated
- Technology Express, Inc. ITE8172 SBC. Vendor page at
- ; picture of the
- board at .
-
-config MIPS_IVR
- bool "Support for Globespan IVR board"
- help
- This is an evaluation board built by Globespan to showcase thir
- iVR (Internet Video Recorder) design. It utilizes a QED RM5231
- R5000 MIPS core. More information can be found out their website
- located at P. Say Y
- here if you wish to build a kernel for this platform.
-
-config MIPS_PB1000
- bool "Support for Alchemy Semi PB1000 board"
- help
- This is an evaluation board built by Alchemy Semiconducttor to
- showcase their Au1000 Internet Edge Processor. It is SOC design
- containing a MIPS32 core running at 266/400/500MHz with many
- integrated peripherals. Further information can be found at their
- website, . Say Y here if you wish to
- build a kernel for this platform.
-
-config RWSEM_GENERIC_SPINLOCK
- bool
- default y
-
-config RWSEM_XCHGADD_ALGORITHM
- bool
-
-#
-# Select some configuration options automatically for certain systems.
-#
-config ISA
- bool
- depends on DDB5476 || DDB5074 || SNI_RM200_PCI || ACER_PICA_61 || MIPS_MAGNUM_4000 || OLIVETTI_M700
- default y
- help
- Find out whether you have ISA slots on your motherboard. ISA is the
- name of a bus system, i.e. the way the CPU talks to the other stuff
- inside your box. Other bus systems are PCI, EISA, MicroChannel
- (MCA) or VESA. ISA is an older system, now being displaced by PCI;
- newer boards don't support it. If you have ISA, say Y, otherwise N.
-
-config EISA
- bool
- depends on ISA
- default y
- ---help---
- The Extended Industry Standard Architecture (EISA) bus was
- developed as an open alternative to the IBM MicroChannel bus.
-
- The EISA bus provided some of the features of the IBM MicroChannel
- bus while maintaining backward compatibility with cards made for
- the older ISA bus. The EISA bus saw limited use between 1988 and
- 1995 when it was made obsolete by the PCI bus.
-
- Say Y here if you are building a kernel for an EISA-based machine.
-
- Otherwise, say N.
-
-config PCI
- bool
- depends on MIPS_IVR || MIPS_ITE8172 || DDB5477 || DDB5476 || DDB5074 || SNI_RM200_PCI || MOMENCO_OCELOT || MIPS_MALTA || MIPS_ATLAS || ALGOR_P4032 || MIPS_EV64120 || MIPS_EV96100
- default y
- help
- Find out whether you have a PCI motherboard. PCI is the name of a
- bus system, i.e. the way the CPU talks to the other stuff inside
- your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
- VESA. If you have PCI, say Y, otherwise N.
-
- The PCI-HOWTO, available from
- , contains valuable
- information about which PCI hardware does work under Linux and which
- doesn't.
-
-config MCA
- bool
- help
- MicroChannel Architecture is found in some IBM PS/2 machines and
- laptops. It is a bus system similar to PCI or ISA. See
- (and especially the web page given
- there) before attempting to build an MCA bus kernel.
-
-config SBUS
- bool
-
-config I8259
- bool
- depends on DDB5074 || SNI_RM200_PCI || MIPS_MALTA || ACER_PICA_61 || MIPS_MAGNUM_4000 || OLIVETTI_M700
- default y
-
-config MIPS_GT96100
- bool
- depends on MIPS_EV96100
- default y
- help
- Say Y here to support the Galileo Technology GT96100 communications
- controller card. There is a web page at .
-
-config SWAP_IO_SPACE
- bool
- depends on MOMENCO_OCELOT || MIPS_MALTA || MIPS_ATLAS || MIPS_EV96100
- default y
-
-config NEW_PCI
- bool
- depends on MIPS_ITE8172 || MIPS_EV96100
- default y
-
-config PCI_AUTO
- bool
- depends on MIPS_ITE8172 || MIPS_EV96100
- default y
-
-config MIPS_GT64120
- bool
- depends on MIPS_EV64120
- default y
-
-config OLD_TIME_C
- bool
- depends on DDB5074 || SNI_RM200_PCI || SGI_IP22 || MOMENCO_OCELOT || ACER_PICA_61 || MIPS_MAGNUM_4000 || OLIVETTI_M700 || ALGOR_P4032 || MIPS_EV64120
- default y
-
-config ARC32
- bool
- depends on SNI_RM200_PCI || SGI_IP22 || ACER_PICA_61 || MIPS_MAGNUM_4000 || OLIVETTI_M700
- default y
-
-config FB
- bool
- depends on MIPS_MAGNUM_4000 || OLIVETTI_M700
- default y
- ---help---
- The frame buffer device provides an abstraction for the graphics
- hardware. It represents the frame buffer of some video hardware and
- allows application software to access the graphics hardware through
- a well-defined interface, so the software doesn't need to know
- anything about the low-level (hardware register) stuff.
-
- Frame buffer devices work identically across the different
- architectures supported by Linux and make the implementation of
- application programs easier and more portable; at this point, an X
- server exists which uses the frame buffer device exclusively.
- On several non-X86 architectures, the frame buffer device is the
- only way to use the graphics hardware.
-
- The device is accessed through special device nodes, usually located
- in the /dev directory, i.e. /dev/fb*.
-
- You need an utility program called fbset to make full use of frame
- buffer devices. Please read
- and the Framebuffer-HOWTO at
- for more
- information.
-
- Say Y here and to the driver for your graphics board below if you
- are compiling a kernel for a non-x86 architecture.
-
- If you are compiling for the x86 architecture, you can say Y if you
- want to play with it, but it is not essential. Please note that
- running graphical applications that directly touch the hardware
- (e.g. an accelerated X server) and that are not frame buffer
- device-aware may cause unexpected results. If unsure, say N.
-
-config FB_G364
- bool
- depends on MIPS_MAGNUM_4000 || OLIVETTI_M700
- default y
-
-config MIPS_JAZZ
- bool
- depends on ACER_PICA_61 || MIPS_MAGNUM_4000 || OLIVETTI_M700
- default y
-
-config ROTTEN_IRQ
- bool
- depends on DDB5476 || DDB5074 || SNI_RM200_PCI || ACER_PICA_61
- default y
-
-config HAVE_STD_PC_SERIAL_PORT
- bool
- depends on DDB5476 || DDB5074 || MIPS_MALTA
- default y
-
-config NEW_IRQ
- bool
- depends on MIPS_PB1000 || DDB5477 || SGI_IP22 || MOMENCO_OCELOT || MIPS_MALTA
- default y
-
-config SYSCLK_100_2
- bool
- depends on MOMENCO_OCELOT
- default y
-
-config BOARD_SCACHE
- bool
- depends on SGI_IP22
- default y
-
-config SGI
- bool
- depends on SGI_IP22
- default y
-
-config NEW_TIME_C
- bool
- depends on DDB5477 || DDB5476
- default y
-
-config CPU_LITTLE_ENDIAN
- bool
- depends on DDB5477
- default y
- help
- Some MIPS machines can be configured for either little or big endian
- byte order. These modes require different kernels. Say Y if your
- machine is little endian, N if it's a big endian machine.
-
-config IT8712
- bool
- depends on MIPS_ITE8172
- default y
-
-config MIPS_AU1000
- bool
- depends on MIPS_PB1000
- default y
-
-config SYSCLK_100
- bool
- depends on SYSCLK_100_1 || SYSCLK_100_2
- default y
-
-endmenu
-
-
-menu "CPU selection"
-
-choice
- prompt "CPU type"
- default CPU_R4X00
-
-config CPU_R3000
- bool "R3000"
- ---help---
- Please make sure to pick the right CPU type. Linux/MIPS is not
- designed to be generic, i.e. Kernels compiled for R3000 CPUs will
- *not* work on R4000 machines and vice versa. However, since most
- of the supported machines have an R4000 (or similar) CPU, R4x00
- might be a safe bet. If the resulting kernel does not work,
- try to recompile with R3000.
-
- R3000 MIPS Technologies R3000-series processors,
- including the 3041, 3051, and 3081.
-
- R6000 MIPS Technologies R6000-series processors,
- including the 64474, 64475, 64574 and 64575.
-
- R4300 MIPS Technologies R4300-series processors.
-
- R4x00 MIPS Technologies R4000-series processors other than 4300,
- including the 4640, 4650, and 4700.
-
- R5000 MIPS Technologies R5000-series processors other than the
- Nevada.
-
- R52xx MIPS Technologies R52xx-series ("Nevada") processors.
-
- R10000 MIPS Technologies R10000-series processors.
-
-config CPU_R6000
- bool "R6000"
- help
- MIPS Technologies R6000-series processors, including the 64474,
- 64475, 64574 and 64575.
-
-config CPU_VR41XX
- bool "R41xx"
- help
- The options selects support for the NEC VR41xx series of processors.
- Only choose this option if you have one of these processors as a
- kernel built with this option will not run on any other type of
- processor or vice versa.
-
-config CPU_R4300
- bool "R4300"
- help
- MIPS Technologies R4300-series processors.
-
-config CPU_R4X00
- bool "R4x00"
- help
- MIPS Technologies R4000-series processors other than 4300, including
- the 4640, 4650, and 4700.
-
-config CPU_R5000
- bool "R5000"
- help
- MIPS Technologies R5000-series processors other than the Nevada.
-
-config CPU_R5432
- bool "R5432"
-
-config CPU_RM7000
- bool "RM7000"
-
-config CPU_NEVADA
- bool "R52xx"
- help
- MIPS Technologies R52x0-series ("Nevada") processors.
-
-config CPU_R10000
- bool "R10000"
- help
- MIPS Technologies R10000-series processors.
-
-config CPU_SB1
- bool "SB1"
-
-config CPU_MIPS32
- bool "MIPS32"
-
-config CPU_MIPS64
- bool "MIPS64"
-
-endchoice
-
-config CPU_ADVANCED
- bool "Override CPU Options"
- help
- Saying yes here allows you to select support for various features
- your CPU may or may not have. Most people should say N here.
-
-config CPU_HAS_LLSC
- bool "ll/sc Instructions available" if CPU_ADVANCED
- default y if !CPU_ADVANCED && !CPU_R3000 && !CPU_VR41XX
- help
- MIPS R4000 series and later provide the Load Linked (ll)
- and Store Conditional (sc) instructions. More information is
- available at .
-
- Say Y here if your CPU has the ll and sc instructions. Say Y here
- for better performance, N if you don't know. You must say Y here
- for multiprocessor machines.
-
-config CPU_HAS_LLDSCD
- bool "lld/scd Instructions available" if CPU_ADVANCED
- default y if !CPU_ADVANCED && !CPU_R3000 && !CPU_VR41XX && !CPU_MIPS32
- help
- Say Y here if your CPU has the lld and scd instructions, the 64-bit
- equivalents of ll and sc. Say Y here for better performance, N if
- you don't know. You must say Y here for multiprocessor machines.
-
-config CPU_HAS_WB
- bool "Writeback Buffer available" if CPU_ADVANCED
- default y if !CPU_ADVANCED && (CPU_R3000 || CPU_VR41XX) && CONFIG_DECSTATION=y
- help
- Say N here for slightly better performance. You must say Y here for
- machines which require flushing of write buffers in software. Saying
- Y is the safe option; N may result in kernel malfunction and crashes.
-
-endmenu
-
-
-menu "General setup"
-
-config CPU_LITTLE_ENDIAN
- bool "Generate little endian code" if !DECSTATION && !DDB5074 && !DDB5476 && !NINO
- default y if DECSTATION || DDB5074 || DDB5476 || NINO
-
-config KCORE_ELF
- bool
- depends on PROC_FS
- default y
- ---help---
- If you enabled support for /proc file system then the file
- /proc/kcore will contain the kernel core image. This can be used
- in gdb:
-
- $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
- You have two choices here: ELF and A.OUT. Selecting ELF will make
- /proc/kcore appear in ELF core format as defined by the Executable
- and Linking Format specification. Selecting A.OUT will choose the
- old "a.out" format which may be necessary for some old versions
- of binutils or on some architectures.
-
- This is especially useful if you have compiled the kernel with the
- "-g" option to preserve debugging information. It is mainly used
- for examining kernel data structures on the live kernel so if you
- don't understand what this means or are not a kernel hacker, just
- leave it at its default value ELF.
-
-config ELF_KERNEL
- bool
- default y
-
-config BINFMT_IRIX
- bool "Include IRIX binary compatibility"
- depends on !CPU_LITTLE_ENDIAN
-
-config FORWARD_KEYBOARD
- bool "Include forward keyboard"
- depends on !CPU_LITTLE_ENDIAN
-
-config ARC_CONSOLE
- bool "ARC console support"
- depends on ARC32
-
-source "fs/Kconfig.binfmt"
-
-source "drivers/pci/Kconfig"
-
-config HOTPLUG
- bool "Support for hot-pluggable devices"
- ---help---
- Say Y here if you want to plug devices into your computer while
- the system is running, and be able to use them quickly. In many
- cases, the devices can likewise be unplugged at any time too.
-
- One well known example of this is PCMCIA- or PC-cards, credit-card
- size devices such as network cards, modems or hard drives which are
- plugged into slots found on all modern laptop computers. Another
- example, used on modern desktops as well as laptops, is USB.
-
- Enable HOTPLUG and KMOD, and build a modular kernel. Get agent
- software (at ) and install it.
- Then your kernel will automatically call out to a user mode "policy
- agent" (/sbin/hotplug) to load modules and set up software needed
- to use devices as you hotplug them.
-
-source "drivers/pcmcia/Kconfig"
-
-config TC
- bool "TURBOchannel support"
- depends on DECSTATION
- help
- TurboChannel is a DEC (now Compaq) bus for Alpha and MIPS processors.
- Documentation on writing device drivers for TurboChannel is available at:
- .
-
-# if [ "$CONFIG_TC" = "y" ]; then
-# bool ' Access.Bus support' CONFIG_ACCESSBUS
-# fi
-endmenu
-
-
-if ISA
-source "drivers/pnp/Kconfig"
-endif
-
-source "drivers/base/Kconfig"
-
-source "drivers/mtd/Kconfig"
-
-source "drivers/parport/Kconfig"
-
-source "drivers/block/Kconfig"
-
-source "drivers/md/Kconfig"
-
-if !SGI_IP22 && !DECSTATION
-source "drivers/ide/Kconfig"
-endif
-
-
-menu "SCSI support"
-
-config SCSI
- tristate "SCSI support"
- ---help---
- If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
- any other SCSI device under Linux, say Y and make sure that you know
- the name of your SCSI host adapter (the card inside your computer
- that "speaks" the SCSI protocol, also called SCSI controller),
- because you will be asked for it.
-
- You also need to say Y here if you want support for the parallel
- port version of the 100 MB IOMEGA ZIP drive.
-
- This driver is also available as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want).
- The module will be called scsi_mod. If you want to compile it as
- a module, say M here and read and
- . However, do not compile this as a
- module if your root file system (the one containing the directory /)
- is located on a SCSI device.
-
-source "drivers/scsi/Kconfig"
-
-endmenu
-
-
-if !DECSTATION && !SGI_IP22
-source "drivers/message/i2o/Kconfig"
-endif
-
-source "net/Kconfig"
-
-source "net/ax25/Kconfig"
-
-source "net/irda/Kconfig"
-
-source "drivers/isdn/Kconfig"
-
-source "drivers/telephony/Kconfig"
-
-
-menu "Old CD-ROM drivers (not SCSI, not IDE)"
-
-config CD_NO_IDESCSI
- bool "Support non-SCSI/IDE/ATAPI CDROM drives"
- ---help---
- If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
- here, otherwise N. Read the CD-ROM-HOWTO, available from
- .
-
- Note that the answer to this question doesn't directly affect the
- kernel: saying N will just cause the configurator to skip all
- the questions about these CD-ROM drives. If you are unsure what you
- have, say Y and find out whether you have one of the following
- drives.
-
- For each of these drivers, a file Documentation/cdrom/{driver_name}
- exists. Especially in cases where you do not know exactly which kind
- of drive you have you should read there. Most of these drivers use a
- file drivers/cdrom/{driver_name}.h where you can define your
- interface parameters and switch some internal goodies.
-
- All these CD-ROM drivers are also usable as a module ( = code which
- can be inserted in and removed from the running kernel whenever you
- want). If you want to compile them as module, say M instead of Y and
- read .
-
- If you want to use any of these CD-ROM drivers, you also have to
- answer Y or M to "ISO 9660 CD-ROM file system support" below (this
- answer will get "defaulted" for you if you enable any of the Linux
- CD-ROM drivers).
-
-source "drivers/cdrom/Kconfig"
-
-endmenu
-
-source "drivers/input/Kconfig"
-
-source "drivers/char/Kconfig"
-
-source "drivers/media/Kconfig"
-
-
-menu "DECStation Character devices"
- depends on DECSTATION
-
-config VT
- bool "Virtual terminal"
-
-config VT_CONSOLE
- bool "Support for console on virtual terminal"
- depends on VT
-
-config SERIAL
- tristate "Standard/generic (dumb) serial support"
- ---help---
- This selects whether you want to include the driver for the standard
- serial ports. The standard answer is Y. People who might say N
- here are those that are setting up dedicated Ethernet WWW/FTP
- servers, or users that have one of the various bus mice instead of a
- serial mouse and don't intend to use their machine's standard serial
- port for anything. (Note that the Cyclades and Stallion multi
- serial port drivers do not need this driver built in for them to
- work.)
-
- If you want to compile this driver as a module, say M here and read
- . The module will be called
- serial.
- [WARNING: Do not compile this driver as a module if you are using
- non-standard serial ports, since the configuration information will
- be lost when the driver is unloaded. This limitation may be lifted
- in the future.]
-
- BTW1: If you have a mouseman serial mouse which is not recognized by
- the X window system, try running gpm first.
-
- BTW2: If you intend to use a software modem (also called Winmodem)
- under Linux, forget it. These modems are crippled and require
- proprietary drivers which are only available under Windows.
-
- Most people will say Y or M here, so that they can use serial mice,
- modems and similar devices connecting to the standard serial ports.
-
-config DZ
- bool "DZ11 Serial Support"
- depends on SERIAL=y
- help
- DZ11-family serial controllers for VAXstations, including the
- DC7085, M7814, and M7819.
-
-config ZS
- bool "Z85C30 Serial Support"
- depends on SERIAL=y && TC
- help
- Documentation on the Zilog 85C350 serial communications controller
- is downloadable at .
-
-config SERIAL_CONSOLE
- bool "Support for console on serial port"
- depends on SERIAL=y
- ---help---
- If you say Y here, it will be possible to use a serial port as the
- system console (the system console is the device which receives all
- kernel messages and warnings and which allows logins in single user
- mode). This could be useful if some terminal or printer is connected
- to that serial port.
-
- Even if you say Y here, the currently visible virtual console
- (/dev/tty0) will still be used as the system console by default, but
- you can alter that using a kernel command line option such as
- "console=ttyS1". (Try "man bootparam" or see the documentation of
- your boot loader (lilo or loadlin) about how to pass options to the
- kernel at boot time.)
-
- If you don't have a VGA card installed and you say Y here, the
- kernel will automatically use the first serial line, /dev/ttyS0, as
- system console.
-
- If unsure, say N.
-
-config UNIX98_PTYS
- bool "Unix98 PTY support"
-
-config UNIX98_PTY_COUNT
- int "Maximum number of Unix98 PTYs in use (0-2048)"
- depends on UNIX98_PTYS
- default "256"
-
-# if [ "$CONFIG_ACCESSBUS" = "y" ]; then
-# bool 'MAXINE Access.Bus mouse (VSXXX-BB/GB) support' CONFIG_DTOP_MOUSE
-# fi
-config RTC
- tristate "Enhanced Real Time Clock Support"
-
-endmenu
-
-
-menu "SGI Character devices"
- depends on SGI_IP22
-
-config VT
- bool "Virtual terminal"
-
-config VT_CONSOLE
- bool "Support for console on virtual terminal"
- depends on VT
-
-config PSMOUSE
- bool "PS/2 mouse support (aka \"auxiliary device\")"
- ---help---
- The PS/2 mouse connects to a special mouse port that looks much like
- the keyboard port (small circular connector with 6 pins). This way,
- the mouse does not use any serial ports. This port can also be used
- for other input devices like light pens, tablets, keypads. Compaq,
- AST and IBM all use this as their mouse port on currently shipping
- machines. The trackballs of some laptops are PS/2 mice also. In
- particular, the C&T 82C710 mouse on TI Travelmates is a PS/2 mouse.
-
- Although PS/2 mice are not technically bus mice, they are explained
- in detail in the Busmouse-HOWTO, available from
- .
-
- When using a PS/2 mouse, you can get problems if you want to use the
- mouse both on the Linux console and under X. Using the "-R" option
- of the Linux mouse managing program gpm (available from
- ) solves this problem, or you can get
- the "mconv2" utility from .
-
-config MOUSE
- bool
- depends on PSMOUSE
- default y
- ---help---
- This is for machines with a mouse which is neither a serial nor a
- bus mouse. Examples are PS/2 mice (such as the track balls on some
- laptops) and some digitizer pads. Most people have a regular serial
- MouseSystem or Microsoft mouse (made by Logitech) that plugs into a
- COM port (rectangular with 9 or 25 pins). These people say N here.
- If you have something else, read the Busmouse-HOWTO, available from
- . This HOWTO contains
- information about all non-serial mice, not just bus mice.
-
- If you have a laptop, you either have to check the documentation or
- experiment a bit to find out whether the trackball is a serial mouse
- or not; it's best to say Y here for you.
-
- Note that the answer to this question won't directly affect the
- kernel: saying N will just cause the configurator to skip all
- the questions about non-serial mice. If unsure, say Y.
-
-config UNIX98_PTYS
- bool "Unix98 PTY support"
-
-config UNIX98_PTY_COUNT
- int "Maximum number of Unix98 PTYs in use (0-2048)"
- depends on UNIX98_PTYS
- default "256"
-
-endmenu
-
-source "fs/Kconfig"
-
-source "drivers/video/Kconfig"
-
-menu "Sound"
- depends on !DECSTATION
-
-config SOUND
- tristate "Sound card support"
- ---help---
- If you have a sound card in your computer, i.e. if it can say more
- than an occasional beep, say Y. Be sure to have all the information
- about your sound card and its configuration down (I/O port,
- interrupt and DMA channel), because you will be asked for it.
-
- You want to read the Sound-HOWTO, available from
- . General information about
- the modular sound system is contained in the files
- . The file
- contains some slightly
- outdated but still useful information as well.
-
- If you have a PnP sound card and you want to configure it at boot
- time using the ISA PnP tools (read
- ), then you need to
- compile the sound card support as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want)
- and load that module after the PnP configuration is finished. To do
- this, say M here and read as well
- as ; the module will be
- called soundcore.
-
- I'm told that even without a sound card, you can make your computer
- say more than an occasional beep, by programming the PC speaker.
- Kernel patches and supporting utilities to do that are in the pcsp
- package, available at .
-
-source "sound/Kconfig"
-
-endmenu
-
-source "drivers/sgi/Kconfig"
-
-source "drivers/usb/Kconfig"
-
-
-menu "Kernel hacking"
-
-config CROSSCOMPILE
- bool "Are you using a crosscompiler"
- help
- Say Y here if you are compiling the kernel on a different
- architecture than the one it is intended to run on.
-
-config REMOTE_DEBUG
- bool "Remote GDB kernel debugging"
- depends on SERIAL=y || AU1000_UART
- help
- If you say Y here, it will be possible to remotely debug the MIPS
- kernel using gdb. This enlarges your kernel image disk size by
- several megabytes and requires a machine with more than 16 MB,
- better 32 MB RAM to avoid excessive linking time. This is only
- useful for kernel hackers. If unsure, say N.
-
-config GDB_CONSOLE
- bool "Console output to GDB"
- depends on REMOTE_DEBUG
- help
- If you are using GDB for remote debugging over a serial port and
- would like kernel messages to be formatted into GDB $O packets so
- that GDB prints them as program output, say 'Y'.
-
-config LL_DEBUG
- bool "Low-level debugging"
- depends on SERIAL=y
- help
- Enable low-level debugging assertion macros in the kernel code.
- Currently used only by the time services code in the MIPS port.
- Don't turn this on unless you know what you are doing.
-
-config MAGIC_SYSRQ
- bool "Magic SysRq key"
- help
- If you say Y here, you will have some control over the system even
- if the system crashes for example during kernel debugging (e.g., you
- will be able to flush the buffer cache to disk, reboot the system
- immediately or dump some status information). This is accomplished
- by pressing various keys while holding SysRq (Alt+PrintScreen). It
- also works on a serial console (on PC hardware at least), if you
- send a BREAK and then within 5 seconds a command keypress. The
- keys are documented in . Don't say Y
- unless you really know what this hack does.
-
-config MIPS_UNCACHED
- bool "Run uncached"
- depends on !SMP
- help
- If you say Y here there kernel will disable all CPU caches. This will
- reduce the system's performance dramatically but can help finding
- otherwise hard to track bugs. It can also useful if you're doing
- hardware debugging with a logic analyzer and need to see all traffic
- on the bus.
-
-config NR_CPUS
- int "Maximum number of CPUs (2-32)"
- depends on SMP
- default "32"
-
-endmenu
-
-source "security/Kconfig"
-
-source "crypto/Kconfig"
-
-source "lib/Kconfig"
+ default n
+source "arch/mips/Kconfig-shared"
diff -Nru a/arch/mips/Kconfig-shared b/arch/mips/Kconfig-shared
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/arch/mips/Kconfig-shared Wed Jul 2 14:00:45 2003
@@ -0,0 +1,1371 @@
+mainmenu "Linux/MIPS Kernel Configuration"
+
+source "init/Kconfig"
+
+menu "Machine selection"
+
+config ACER_PICA_61
+ bool "Support for Acer PICA 1 chipset (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ help
+ This is a machine with a R4400 133/150 MHz CPU. To compile a Linux
+ kernel that runs on these, say Y here. For details about Linux on
+ the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at
+ .
+
+config BAGET_MIPS
+ bool "Support for BAGET MIPS series (EXPERIMENTAL)"
+ depends on MIPS32 && EXPERIMENTAL
+ help
+ This enables support for the Baget, a Russian embedded system. For
+ more details about the Baget see the Linux/MIPS FAQ on
+ .
+
+config CASIO_E55
+ bool "Support for CASIO CASSIOPEIA E-10/15/55/65"
+
+config MIPS_COBALT
+ bool "Support for Cobalt Server (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+
+config DECSTATION
+ bool "Support for DECstations"
+ depends on MIPS32 || EXPERIMENTAL
+ ---help---
+ This enables support for DEC's MIPS based workstations. For details
+ see the Linux/MIPS FAQ on and the
+ DECstation porting pages on .
+
+ If you have one of the following DECstation Models you definitely
+ want to choose R4xx0 for the CPU Type:
+
+ DECstation 5000/50
+ DECstation 5000/150
+ DECstation 5000/260
+ DECsystem 5900/260
+
+ otherwise choose R3000.
+
+config MIPS_EV64120
+ bool "Support for Galileo EV64120 Evaluation board (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ help
+ This is an evaluation board based on the Galileo GT-64120
+ single-chip system controller that contains a MIPS R5000 compatible
+ core running at 75/100MHz. Their website is located at
+ . Say Y here if you wish to build a
+ kernel for this platform.
+
+config EVB_PCI1
+ bool "Enable Second PCI (PCI1)"
+ depends on MIPS_EV64120
+
+if MOMENCO_OCELOT_G || MOMENCO_OCELOT
+
+config SYSCLK_100
+ bool
+ default y
+
+endif
+if MIPS_EV64120
+
+choice
+ prompt "Galileo Chip Clock"
+ default SYSCLK_83
+
+config SYSCLK_75
+ bool "75"
+
+config SYSCLK_83
+ bool "83.3"
+
+config SYSCLK_100
+ bool "100" if MIPS_EV64120
+
+endchoice
+
+endif
+
+config MIPS_EV96100
+ bool "Support for Galileo EV96100 Evaluation board (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ help
+ This is an evaluation board based on the Galielo GT-96100 LAN/WAN
+ communications controllers containing a MIPS R5000 compatible core
+ running at 83MHz. Their website is . Say Y
+ here if you wish to build a kernel for this platform.
+
+config MIPS_IVR
+ bool "Support for Globespan IVR board"
+ help
+ This is an evaluation board built by Globespan to showcase thir
+ iVR (Internet Video Recorder) design. It utilizes a QED RM5231
+ R5000 MIPS core. More information can be found out their website
+ located at P. Say Y
+ here if you wish to build a kernel for this platform.
+
+config LASAT
+ bool "Support for LASAT Networks platforms"
+
+config LASAT_100
+ bool "Support for LASAT Networks 100 series"
+ depends on LASAT
+
+config LASAT_200
+ bool "Support for LASAT Networks 200 series"
+ depends on LASAT
+
+config PICVUE
+ tristate "PICVUE LCD display driver"
+ depends on LASAT
+
+config PICVUE_PROC
+ tristate "PICVUE LCD display driver /proc interface"
+ depends on PICVUE
+
+config DS1603
+ bool "DS1603 RTC driver"
+ depends on LASAT
+
+config LASAT_SYSCTL
+ bool "LASAT sysctl interface"
+ depends on LASAT
+
+config HP_LASERJET
+ bool "Support for Hewlett Packard LaserJet board"
+
+config IBM_WORKPAD
+ bool "Support for IBM WorkPad z50"
+
+config MIPS_ITE8172
+ bool "Support for ITE 8172G board"
+ help
+ Ths is an evaluation board made by ITE
+ with ATX form factor that utilizes a MIPS R5000 to work with its
+ ITE8172G companion internet appliance chip. The MIPS core can be
+ either a NEC Vr5432 or QED RM5231. Say Y here if you wish to build
+ a kernel for this platform.
+
+config IT8172_REVC
+ bool "Support for older IT8172 (Rev C)"
+ depends on MIPS_ITE8172
+ help
+ Say Y here to support the older, Revision C version of the Integrated
+ Technology Express, Inc. ITE8172 SBC. Vendor page at
+ ; picture of the
+ board at .
+
+config MIPS_ATLAS
+ bool "Support for MIPS Atlas board"
+ help
+ This enables support for the QED R5231-based MIPS Atlas evaluation
+ board.
+
+config MIPS_MAGNUM_4000
+ bool "Support for MIPS Magnum 4000"
+ help
+ This is a machine with a R4000 100 MHz CPU. To compile a Linux
+ kernel that runs on these, say Y here. For details about Linux on
+ the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at
+ .
+
+config MIPS_MALTA
+ bool "Support for MIPS Malta board"
+ help
+ This enables support for the VR5000-based MIPS Malta evaluation
+ board.
+
+config MIPS_SEAD
+ bool "Support for MIPS SEAD board (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+
+config MOMENCO_OCELOT
+ bool "Support for Momentum Ocelot board"
+ help
+ The Ocelot is a MIPS-based Single Board Computer (SBC) made by
+ Momentum Computer .
+
+config MOMENCO_OCELOT_G
+ bool "Support for Momentum Ocelot-G board"
+ help
+ The Ocelot is a MIPS-based Single Board Computer (SBC) made by
+ Momentum Computer .
+
+config MOMENCO_OCELOT_C
+ bool "Support for Momentum Ocelot-C board"
+ help
+ The Ocelot is a MIPS-based Single Board Computer (SBC) made by
+ Momentum Computer .
+
+config DDB5074
+ bool "Support for NEC DDB Vrc-5074 (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ help
+ This enables support for the VR5000-based NEC DDB Vrc-5074
+ evaluation board.
+
+config DDB5476
+ bool "Support for NEC DDB Vrc-5476"
+ help
+ This enables support for the R5432-based NEC DDB Vrc-5476
+ evaluation board.
+
+ Features : kernel debugging, serial terminal, NFS root fs, on-board
+ ether port USB, AC97, PCI, PCI VGA card & framebuffer console,
+ IDE controller, PS2 keyboard, PS2 mouse, etc.
+
+config DDB5477
+ bool "Support for NEC DDB Vrc-5477"
+ help
+ This enables support for the R5432-based NEC DDB Vrc-5477,
+ or Rockhopper/SolutionGear boards with R5432/R5500 CPUs.
+
+ Features : kernel debugging, serial terminal, NFS root fs, on-board
+ ether port USB, AC97, PCI, etc.
+
+config DDB5477_BUS_FREQUENCY
+ int "bus frequency (in kHZ, 0 for auto-detect)"
+ depends on DDB5477
+ default 0
+
+config NEC_OSPREY
+ bool "Support for NEC Osprey board"
+
+config NEC_EAGLE
+ bool "Support for NEC Eagle/Hawk board"
+
+config OLIVETTI_M700
+ bool "Support for Olivetti M700-10"
+ help
+ This is a machine with a R4000 100 MHz CPU. To compile a Linux
+ kernel that runs on these, say Y here. For details about Linux on
+ the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at
+ .
+
+config SGI_IP22
+ bool "Support for SGI IP22 (Indy/Indigo2)"
+ help
+ This are the SGI Indy, Challenge S and Indigo2, as well as certain
+ OEM variants like the Tandem CMN B006S. To compile a Linux kernel
+ that runs on these, say Y here.
+
+config SGI_IP27
+ bool "Support for SGI IP27 (Origin200/2000)"
+ depends on MIPS64
+ help
+ This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics
+ workstations. To compile a Linux kernel that runs on these, say Y
+ here.
+
+#config SGI_SN0_XXL
+# bool "IP27 XXL"
+# depends on SGI_IP27
+# This options adds support for userspace processes upto 16TB size.
+# Normally the limit is just .5TB.
+
+config SGI_SN0_N_MODE
+ bool "IP27 N-Mode"
+ depends on SGI_IP27
+ help
+ The nodes of Origin 200, Origin 2000 and Onyx 2 systems can be
+ configured in either N-Modes which allows for more nodes or M-Mode
+ which allows for more memory. Your system is most probably
+ running in M-Mode, so you should say N here.
+
+config DISCONTIGMEM
+ bool "Discontiguous Memory Support"
+ depends on SGI_IP27
+ help
+ Say Y to upport efficient handling of discontiguous physical memory,
+ for architectures which are either NUMA (Non-Uniform Memory Access)
+ or have huge holes in the physical address space for other reasons.
+ See for more.
+
+config NUMA
+ bool "NUMA Support"
+ depends on SGI_IP27
+ help
+ Say Y to compile the kernel to support NUMA (Non-Uniform Memory
+ Access). This option is for configuring high-end multiprocessor
+ server machines. If in doubt, say N.
+
+config MAPPED_KERNEL
+ bool "Mapped kernel support"
+ depends on SGI_IP27
+ help
+ Change the way a Linux kernel is loaded unto memory on a MIPS64
+ machine. This is required in order to support text replication and
+ NUMA. If you need to undersatand it, read the source code.
+
+config REPLICATE_KTEXT
+ bool "Kernel text replication support"
+ depends on SGI_IP27
+ help
+ Say Y here to enable replicating the kernel text across multiple
+ nodes in a NUMA cluster. This trades memory for speed.
+
+config REPLICATE_EXHANDLERS
+ bool "Exception handler replication support"
+ depends on SGI_IP27
+ help
+ Say Y here to enable replicating the kernel exception handlers
+ across multiple nodes in a NUMA cluster. This trades memory for
+ speed.
+
+config SGI_IP32
+ bool "Support for SGI IP32 (O2) (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ help
+ If you want this kernel to run on SGI O2 workstation, say Y here.
+
+config SOC_AU1X00
+ depends on MIPS32
+ bool "Support for AMD/Alchemy Au1X00 SOCs"
+
+choice
+ prompt "Au1X00 SOC Type"
+ depends on SOC_AU1X00
+ help
+ Say Y here to enable support for one of three AMD/Alchemy
+ SOCs. For additional documentation see www.amd.com.
+
+config SOC_AU1000
+ bool "SOC_AU1000"
+config SOC_AU1100
+ bool "SOC_AU1100"
+config SOC_AU1500
+ bool "SOC_AU1500"
+
+endchoice
+
+choice
+ prompt "AMD/Alchemy Pb1x and Db1x board support"
+ depends on SOC_AU1X00
+ help
+ These are evaluation boards built by AMD/Alchemy to
+ showcase their Au1X00 Internet Edge Processors. The SOC design
+ is based on the MIPS32 architecture running at 266/400/500MHz
+ with many integrated peripherals. Further information can be
+ found at their website, . Say Y here if you
+ wish to build a kernel for this platform.
+
+config MIPS_PB1000
+ bool "PB1000 board"
+ depends on SOC_AU1000
+
+config MIPS_PB1100
+ bool "PB1100 board"
+ depends on SOC_AU1100
+
+config MIPS_PB1500
+ bool "PB1500 board"
+ depends on SOC_AU1500
+
+config MIPS_DB1000
+ bool "DB1000 board"
+ depends on SOC_AU1000
+
+config MIPS_DB1100
+ bool "DB1100 board"
+ depends on SOC_AU1100
+
+config MIPS_DB1500
+ bool "DB1500 board"
+ depends on SOC_AU1500
+
+endchoice
+
+config SIBYTE_SB1xxx_SOC
+ bool "Support for Broadcom BCM1xxx SOCs (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+
+choice
+ prompt "BCM1xxx SOC Type"
+ depends on SIBYTE_SB1xxx_SOC
+ default SIBYTE_SB1250
+
+config SIBYTE_SB1250
+ bool "BCM1250"
+
+endchoice
+
+config SIMULATION
+ bool "Running under simulation"
+ depends on SIBYTE_SB1xxx_SOC
+
+config SIBYTE_CFE
+ bool "Booting from CFE"
+ depends on SIBYTE_SB1xxx_SOC
+
+config SIBYTE_CFE_CONSOLE
+ bool "Use firmware console"
+ depends on SIBYTE_CFE
+
+config SIBYTE_STANDALONE
+ bool
+ depends on SIBYTE_SB1xxx_SOC && !SIBYTE_CFE
+ default y
+
+config SIBYTE_STANDALONE_RAM_SIZE
+ int "Memory size (in megabytes)"
+ depends on SIBYTE_SB1xxx_SOC && !SIBYTE_CFE
+ default "32"
+
+config SIBYTE_BUS_WATCHER
+ bool "Support for Bus Watcher statistics"
+ depends on SIBYTE_SB1xxx_SOC
+
+config SIBYTE_SB1250_PROF
+ bool "Support for SB1/SOC profiling - SB1/SCD perf counters"
+ depends on SIBYTE_SB1xxx_SOC
+
+config SIBYTE_TBPROF
+ bool "Support for ZBbus profiling"
+ depends on SIBYTE_SB1xxx_SOC
+
+config SIBYTE_SWARM
+ bool "Support for SWARM board"
+ depends on SIBYTE_SB1250
+
+config SIBYTE_BOARD
+ bool
+ depends on SIBYTE_SWARM
+ default y
+
+config SNI_RM200_PCI
+ bool "Support for SNI RM200 PCI"
+ help
+ The SNI RM200 PCI was a MIPS-based platform manufactured by Siemens
+ Nixdorf Informationssysteme (SNI), parent company of Pyramid
+ Technology and now in turn merged with Fujitsu. Say Y here to
+ support this machine type.
+
+config TANBAC_TB0226
+ bool "Support for TANBAC TB0226 (Mbase)"
+ help
+ The TANBAC TB0226 (Mbase) is a MIPS-based platform manufactured by TANBAC.
+ Please refer to about Mbase.
+
+config TANBAC_TB0229
+ bool "Support for TANBAC TB0229 (VR4131DIMM)"
+ help
+ The TANBAC TB0229 (VR4131DIMM) is a MIPS-based platform manufactured by TANBAC.
+ Please refer to about VR4131DIMM.
+
+config TOSHIBA_JMR3927
+ bool "Support for Toshiba JMR-TX3927 board"
+ depends on MIPS32
+
+config TOSHIBA_RBTX4927
+ bool "Support for Toshiba TBTX49[23]7 board"
+ depends on MIPS32
+
+config VICTOR_MPC30X
+ bool "Support for Victor MP-C303/304"
+
+config ZAO_CAPCELLA
+ bool "Support for ZAO Networks Capcella"
+
+config RWSEM_GENERIC_SPINLOCK
+ bool
+ default y
+
+config RWSEM_XCHGADD_ALGORITHM
+ bool
+
+#
+# Select some configuration options automatically based on user selections.
+#
+config ARC
+ bool
+ depends on SNI_RM200_PCI || SGI_IP32 || SGI_IP27 || SGI_IP22 || MIPS_MAGNUM_4000 || OLIVETTI_M700 || ACER_PICA_61
+ default y
+
+config GENERIC_ISA_DMA
+ bool
+ depends on SNI_RM200_PCI || MIPS_MAGNUM_4000 || OLIVETTI_M700 || ACER_PICA_61
+ default y
+
+config CONFIG_GT64120
+ bool
+ depends on MIPS_EV64120 || MOMENCO_OCELOT
+ default y
+
+config I8259
+ bool
+ depends on SNI_RM200_PCI || DDB5477 || DDB5476 || DDB5074 || MIPS_MALTA || MIPS_MAGNUM_4000 || OLIVETTI_M700 || MIPS_COBALT || ACER_PICA_61
+ default y
+
+config MIPS_JAZZ
+ bool
+ depends on MIPS_MAGNUM_4000 || OLIVETTI_M700 || ACER_PICA_61
+ default y
+
+config NONCOHERENT_IO
+ bool
+ depends on ZAO_CAPCELLA || VICTOR_MPC30X || TOSHIBA_JMR3927 || TOSHIBA_RBTX4927 || SNI_RM200_PCI || SGI_IP32 || SGI_IP22 || NEC_EAGLE || NEC_OSPREY || DDB5477 || DDB5476 || DDB5074 || MOMENCO_OCELOT || MOMENCO_OCELOT_C || MOMENCO_OCELOT_G || MIPS_SEAD || MIPS_MALTA || MIPS_MAGNUM_4000 || OLIVETTI_M700 || MIPS_ATLAS || LASAT || MIPS_ITE8172 || IBM_WORKPAD || HP_LASERJET || MIPS_IVR || MIPS_EV96100 || MIPS_EV64120 || DECSTATION || MIPS_COBALT || MIPS_PB1500 || MIPS_PB1100 || MIPS_PB1000 || CASIO_E55 || ACER_PICA_61 || TANBAC_TB0226 || TANBAC_TB0229
+ default y if ZAO_CAPCELLA || VICTOR_MPC30X || TOSHIBA_JMR3927 || TOSHIBA_RBTX4927 || SNI_RM200_PCI || SGI_IP32 || SGI_IP22 || NEC_EAGLE || NEC_OSPREY || DDB5477 || DDB5476 || DDB5074 || MOMENCO_OCELOT_G || MOMENCO_OCELOT || MIPS_SEAD || MIPS_MALTA || MIPS_MAGNUM_4000 || OLIVETTI_M700 || MIPS_ATLAS || LASAT || MIPS_ITE8172 || IBM_WORKPAD || HP_LASERJET || MIPS_IVR || MIPS_EV96100 || MIPS_EV64120 || DECSTATION || MIPS_COBALT || MIPS_PB1500 || MIPS_PB1100 || MIPS_PB1000 || CASIO_E55 || ACER_PICA_61 || TANBAC_TB0226 || TANBAC_TB0229
+ default n if (SIBYTE_SB1250 || SGI_IP27)
+
+config CPU_LITTLE_ENDIAN
+ bool "Generate little endian code"
+ default y if ACER_PICA_61 || CASIO_E55 || DDB5074 || DDB5476 || DDB5477 || DECSTATION || HP_LASERJET || IBM_WORKPAD || LASAT || MIPS_COBALT || MIPS_ITE8172 || MIPS_IVR || MIPS_PB1000 || MIPS_PB1100 || MIPS_PB1500 || NEC_OSPREY || NEC_EAGLE || OLIVETTI_M700 || SNI_RM200_PCI || VICTOR_MPC30X || ZAO_CAPCELLA
+ default n if BAGET_MIPS || MIPS_EV64120 || MIPS_EV96100 || MOMENCO_OCELOT || MOMENCO_OCELOT_G || SGI_IP22 || SGI_IP27 || SGI_IP32 || TOSHIBA_JMR3927
+ help
+ Some MIPS machines can be configured for either little or big endian
+ byte order. These modes require different kernels. Say Y if your
+ machine is little endian, N if it's a big endian machine.
+
+config IRQ_CPU
+ bool
+ depends on ZAO_CAPCELLA || VICTOR_MPC30X || SGI_IP22 || NEC_EAGLE || NEC_OSPREY || DDB5477 || DDB5476 || DDB5074 || IBM_WORKPAD || HP_LASERJET || DECSTATION || CASIO_E55 || TANBAC_TB0226 || TANBAC_TB0229
+ default y
+
+config VR41XX_TIME_C
+ bool
+ depends on ZAO_CAPCELLA || VICTOR_MPC30X || NEC_EAGLE || IBM_WORKPAD || CASIO_E55 || TANBAC_TB0226 || TANBAC_TB0229
+ default y
+
+config DUMMY_KEYB
+ bool
+ depends on ZAO_CAPCELLA || VICTOR_MPC30X || SIBYTE_SB1250 || NEC_EAGLE || NEC_OSPREY || DDB5477 || IBM_WORKPAD || CASIO_E55 || TANBAC_TB0226 || TANBAC_TB0229
+ default y
+
+config VR41XX_COMMON
+ bool
+ depends on NEC_EAGLE || ZAO_CAPCELLA || VICTOR_MPC30X || IBM_WORKPAD || CASIO_E55 || TANBAC_TB0226 || TANBAC_TB0229
+ default y
+
+config VRC4173
+ tristate "NEC VRC4173 Support"
+ depends on NEC_EAGLE || VICTOR_MPC30X
+
+config DDB5XXX_COMMON
+ bool
+ depends on DDB5074 || DDB5476 || DDB5477
+ default y
+
+config MIPS_BOARDS_GEN
+ bool
+ depends on MIPS_ATLAS || MIPS_MALTA || MIPS_SEAD
+ default y
+
+config ITE_BOARD_GEN
+ bool
+ depends on MIPS_IVR || MIPS_ITE8172
+ default y
+
+config NEW_PCI
+ bool
+ depends on ZAO_CAPCELLA || VICTOR_MPC30X || TOSHIBA_JMR3927 || TOSHIBA_RBTX4927 || NEC_EAGLE || DDB5477 || DDB5476 || DDB5074 || MIPS_ITE8172 || HP_LASERJET || MIPS_IVR || MIPS_EV96100 || MIPS_PB1500 || MIPS_PB1100 || MIPS_PB1000 || TANBAC_TB0226 || TANBAC_TB0229
+ default y
+
+config SWAP_IO_SPACE
+ bool "Support for paging of anonymous memory"
+ depends on TOSHIBA_JMR3927 || TOSHIBA_RBTX4927 || SIBYTE_SB1250 || SGI_IP22 || MOMENCO_OCELOT_C || MOMENCO_OCELOT_G || MOMENCO_OCELOT || MIPS_MALTA || MIPS_ATLAS || MIPS_EV96100 || MIPS_PB1100 || MIPS_PB1000
+ default y
+ help
+ This option allows you to choose whether you want to have support
+ for socalled swap devices or swap files in your kernel that are
+ used to provide more virtual memory than the actual RAM present
+ in your computer. If unusre say Y.
+
+config AU1000_USB_DEVICE
+ bool
+ depends on MIPS_PB1500 || MIPS_PB1100 || MIPS_PB1000
+ default n
+
+config COBALT_LCD
+ bool
+ depends on MIPS_COBALT
+ default y
+
+config MIPS_GT64120
+ bool
+ depends on MIPS_EV64120
+ default y
+
+config MIPS_GT96100
+ bool
+ depends on MIPS_EV96100
+ default y
+ help
+ Say Y here to support the Galileo Technology GT96100 communications
+ controller card. There is a web page at .
+
+config IT8172_CIR
+ bool
+ depends on MIPS_ITE8172 || MIPS_IVR
+ default y
+
+config IT8712
+ bool
+ depends on MIPS_ITE8172
+ default y
+
+config BOOT_ELF32
+ bool
+ depends on DECSTATION || MIPS_ATLAS || MIPS_MALTA || SIBYTE_SB1250 || SGI_IP32 || SGI_IP22 || SNI_RM200_PCI
+ default y
+
+config L1_CACHE_SHIFT
+ int
+ default "4" if DECSTATION
+ default "5" if SGI_IP32 || SGI_IP22 || MIPS_SEAD || MIPS_MALTA || MIPS_ATLAS
+ default "7" if SGI_IP27
+
+config ARC32
+ bool
+ depends on SNI_RM200_PCI || SGI_IP32 || SGI_IP22 || MIPS_MAGNUM_4000 || OLIVETTI_M700
+ default y
+
+config FB
+ bool
+ depends on MIPS_MAGNUM_4000 || OLIVETTI_M700
+ default y
+ ---help---
+ The frame buffer device provides an abstraction for the graphics
+ hardware. It represents the frame buffer of some video hardware and
+ allows application software to access the graphics hardware through
+ a well-defined interface, so the software doesn't need to know
+ anything about the low-level (hardware register) stuff.
+
+ Frame buffer devices work identically across the different
+ architectures supported by Linux and make the implementation of
+ application programs easier and more portable; at this point, an X
+ server exists which uses the frame buffer device exclusively.
+ On several non-X86 architectures, the frame buffer device is the
+ only way to use the graphics hardware.
+
+ The device is accessed through special device nodes, usually located
+ in the /dev directory, i.e. /dev/fb*.
+
+ You need an utility program called fbset to make full use of frame
+ buffer devices. Please read
+ and the Framebuffer-HOWTO at
+ for more
+ information.
+
+ Say Y here and to the driver for your graphics board below if you
+ are compiling a kernel for a non-x86 architecture.
+
+ If you are compiling for the x86 architecture, you can say Y if you
+ want to play with it, but it is not essential. Please note that
+ running graphical applications that directly touch the hardware
+ (e.g. an accelerated X server) and that are not frame buffer
+ device-aware may cause unexpected results. If unsure, say N.
+
+config FB_G364
+ bool
+ depends on MIPS_MAGNUM_4000 || OLIVETTI_M700
+ default y
+
+config HAVE_STD_PC_SERIAL_PORT
+ bool
+ depends on DDB5476 || DDB5074 || MIPS_MALTA
+ default y
+
+config VR4181
+ bool
+ depends on NEC_OSPREY
+ default y
+
+config ARC_CONSOLE
+ bool "ARC console support"
+ depends on SGI_IP22 || SNI_RM200_PCI
+
+config ARC_MEMORY
+ bool
+ depends on SNI_RM200_PCI || SGI_IP32
+ default y
+
+config ARC_PROMLIB
+ bool
+ depends on SNI_RM200_PCI || SGI_IP32 || SGI_IP22
+ default y
+
+config BOARD_SCACHE
+ bool
+ depends on MIPS_EV96100 || MOMENCO_OCELOT || SGI_IP22
+ default y
+
+config ARC64
+ bool
+ depends on SGI_IP27
+ default y
+
+config BOOT_ELF64
+ bool
+ depends on SGI_IP27
+ default y
+
+#config MAPPED_PCI_IO y
+# bool
+# depends on SGI_IP27
+# default y
+
+config QL_ISP_A64
+ bool
+ depends on SGI_IP27
+ default y
+
+config TOSHIBA_BOARDS
+ bool
+ depends on TOSHIBA_JMR3927 || TOSHIBA_RBTX4927
+ default y
+
+config TANBAC_TB0219
+ bool "Added TANBAC TB0219 Base board support"
+ depends on TANBAC_TB0229
+
+endmenu
+
+
+menu "CPU selection"
+
+choice
+ prompt "CPU type"
+ default CPU_R4X00
+
+config CPU_MIPS32
+ bool "MIPS32"
+
+config CPU_MIPS64
+ bool "MIPS64"
+
+config CPU_R3000
+ bool "R3000"
+ depends on MIPS32
+ help
+ Please make sure to pick the right CPU type. Linux/MIPS is not
+ designed to be generic, i.e. Kernels compiled for R3000 CPUs will
+ *not* work on R4000 machines and vice versa. However, since most
+ of the supported machines have an R4000 (or similar) CPU, R4x00
+ might be a safe bet. If the resulting kernel does not work,
+ try to recompile with R3000.
+
+config CPU_TX39XX
+ bool "R39XX"
+ depends on MIPS32
+
+config CPU_VR41XX
+ bool "R41xx"
+ help
+ The options selects support for the NEC VR41xx series of processors.
+ Only choose this option if you have one of these processors as a
+ kernel built with this option will not run on any other type of
+ processor or vice versa.
+
+config CPU_R4300
+ bool "R4300"
+ help
+ MIPS Technologies R4300-series processors.
+
+config CPU_R4X00
+ bool "R4x00"
+ help
+ MIPS Technologies R4000-series processors other than 4300, including
+ the R4000, R4400, R4600, and 4700.
+
+config CPU_TX49XX
+ bool "R49XX"
+
+config CPU_R5000
+ bool "R5000"
+ help
+ MIPS Technologies R5000-series processors other than the Nevada.
+
+config CPU_R5432
+ bool "R5432"
+
+config CPU_R6000
+ bool "R6000"
+ depends on MIPS32 && EXPERIMENTAL
+ help
+ MIPS Technologies R6000 and R6000A series processors. Note these
+ processors are extremly rare and the support for them is incomplete.
+
+config CPU_NEVADA
+ bool "R52xx"
+ help
+ MIPS Technologies R52x0-series ("Nevada") processors.
+
+config CPU_R8000
+ bool "R8000"
+ depends on MIPS64 && EXPERIMENTAL
+ help
+ MIPS Technologies R8000 processors. Note these processors are
+ uncommon and the support for them is incomplete.
+
+config CPU_R10000
+ bool "R10000"
+ help
+ MIPS Technologies R10000-series processors.
+
+config CPU_RM7000
+ bool "RM7000"
+
+config CPU_SB1
+ bool "SB1"
+
+endchoice
+
+config R5000_CPU_SCACHE
+ bool
+ depends on CPU_NEVADA || CPU_R5000
+ default y if SGI_IP32 || LASAT
+
+config BOARD_SCACHE
+ bool
+ depends on CPU_NEVADA || CPU_R4X00 || CPU_R5000
+ default y if SGI_IP22 || (SGI_IP32 && CPU_R5000) || R5000_CPU_SCACHE
+
+config CPU_HAS_PREFETCH
+ bool "Enable prefetches" if CPU_SB1 && !CPU_SB1_PASS_2
+ default y if CPU_RM7000 || CPU_MIPS64 || CPU_MIPS32
+
+config VTAG_ICACHE
+ bool "Support for Virtual Tagged I-cache" if CPU_MIPS64 || CPU_MIPS32
+ default y if CPU_SB1
+
+choice
+ prompt "SB1 Pass"
+ depends on CPU_SB1
+ default CPU_SB1_PASS_1
+
+config CPU_SB1_PASS_1
+ bool "Pass1"
+
+config CPU_SB1_PASS_2
+ bool "Pass2"
+
+config CPU_SB1_PASS_2_2
+ bool "Pass2.2"
+
+endchoice
+
+config SB1_PASS_1_WORKAROUNDS
+ bool
+ depends on CPU_SB1_PASS_1
+ default y
+
+config SB1_PASS_2_WORKAROUNDS
+ bool
+ depends on CPU_SB1 && (CPU_SB1_PASS_2_2 || CPU_SB1_PASS_2)
+ default y
+
+# Avoid prefetches on Pass 2 (before 2.2)
+# XXXKW for now, let 2.2 use same WORKAROUNDS flag as pre-2.2
+config SB1_CACHE_ERROR
+ bool "Support for SB1 Cache Error handler"
+ depends on CPU_SB1
+
+config SB1_CERR_IGNORE_RECOVERABLE
+ bool "Ignore recoverable cache errors"
+ depends on SB1_CACHE_ERROR
+
+config SB1_CERR_SPIN
+ bool "Spin instead of running handler"
+ depends on SB1_CACHE_ERROR
+
+config 64BIT_PHYS_ADDR
+ bool "Support for 64-bit physical address space"
+ depends on (CPU_R4X00 || CPU_R5000 || CPU_RM7000 || CPU_R10000 || CPU_SB1 || CPU_MIPS32 || CPU_MIPS64) && MIPS32
+
+config CPU_ADVANCED
+ bool "Override CPU Options"
+ depends on MIPS32
+ help
+ Saying yes here allows you to select support for various features
+ your CPU may or may not have. Most people should say N here.
+
+config CPU_HAS_LLSC
+ bool "ll/sc Instructions available" if CPU_ADVANCED
+ default y if !CPU_ADVANCED && !CPU_R3000 && !CPU_VR41XX && !CPU_TX39XX
+ help
+ MIPS R4000 series and later provide the Load Linked (ll)
+ and Store Conditional (sc) instructions. More information is
+ available at .
+
+ Say Y here if your CPU has the ll and sc instructions. Say Y here
+ for better performance, N if you don't know. You must say Y here
+ for multiprocessor machines.
+
+config CPU_HAS_LLDSCD
+ bool "lld/scd Instructions available" if CPU_ADVANCED
+ default y if !CPU_ADVANCED && !CPU_R3000 && !CPU_VR41XX && !CPU_TX39XX && !CPU_MIPS32
+ help
+ Say Y here if your CPU has the lld and scd instructions, the 64-bit
+ equivalents of ll and sc. Say Y here for better performance, N if
+ you don't know. You must say Y here for multiprocessor machines.
+
+config CPU_HAS_WB
+ bool "Writeback Buffer available" if CPU_ADVANCED
+ default y if !CPU_ADVANCED && (CPU_R3000 || CPU_VR41XX || CPU_TX39XX) && DECSTATION
+ help
+ Say N here for slightly better performance. You must say Y here for
+ machines which require flushing of write buffers in software. Saying
+ Y is the safe option; N may result in kernel malfunction and crashes.
+
+config CPU_HAS_SYNC
+ bool
+ depends on !CPU_R3000
+ default y
+
+#
+# - Highmem only makes sense for the 32-bit kernel.
+# - The current highmem code will only work properly on physically indexed
+# caches such as R3000, SB1, R7000 or those that look like they're virtually
+# indexed such as R4000/R4400 SC and MC versions or R10000. So for the
+# moment we protect the user and offer the highmem option only on machines
+# where it's known to be safe. This will not offer highmem on a few systems
+# such as MIPS32 and MIPS64 CPUs which may have virtual and physically
+# indexed CPUs but we're playing safe.
+# - We should not offer highmem for system of which we already know that they
+# don't have memory configurations that could gain from highmem support in
+# the kernel because they don't support configurations with RAM at physical
+# addresses > 0x20000000.
+#
+config HIGHMEM
+ bool "High Memory Support"
+ depends on MIPS32 && (CPU_R3000 || CPU_SB1 || CPU_R7000 || CPU_R10000) && !(BAGET_MIPS || DECSTATION)
+
+config SMP
+ bool "Multi-Processing support"
+ depends on SIBYTE_SB1xxx_SOC && SIBYTE_SB1250 && !SIBYTE_STANDALONE || SGI_IP27
+ ---help---
+ This enables support for systems with more than one CPU. If you have
+ a system with only one CPU, like most personal computers, say N. If
+ you have a system with more than one CPU, say Y.
+
+ If you say N here, the kernel will run on single and multiprocessor
+ machines, but will use only one CPU of a multiprocessor machine. If
+ you say Y here, the kernel will run on many, but not all,
+ singleprocessor machines. On a singleprocessor machine, the kernel
+ will run faster if you say N here.
+
+ People using multiprocessor machines who say Y here should also say
+ Y to "Enhanced Real Time Clock Support", below.
+
+ See also the ,
+ and the SMP-HOWTO available at
+ .
+
+ If you don't know what to do here, say N.
+
+config NR_CPUS
+ int "Maximum number of CPUs (2-32)"
+ depends on SMP
+ default "32"
+ help
+ This allows you to specify the maximum number of CPUs which this
+ kernel will support. The maximum supported value is 32 and the
+ minimum value which makes sense is 2.
+
+ This is purely to save memory - each supported CPU adds
+ approximately eight kilobytes to the kernel image.
+
+config PREEMPT
+ bool "Preemptible Kernel"
+ help
+ This option reduces the latency of the kernel when reacting to
+ real-time or interactive events by allowing a low priority process to
+ be preempted even if it is in kernel mode executing a system call.
+ This allows applications to run more reliably even when the system is
+ under load.
+
+config KALLSYMS
+ bool "Load all symbols for debugging/kksymoops"
+ help
+ Say Y here to let the kernel print out symbolic crash information and
+ symbolic stack backtraces. This increases the size of the kernel
+ somewhat, as all symbols have to be loaded into the kernel image.
+
+config DEBUG_SPINLOCK_SLEEP
+ bool "Sleep-inside-spinlock checking"
+ help
+ If you say Y here, various routines which may sleep will become very
+ noisy if they are called with a spinlock held.
+
+config RTC_DS1742
+ bool "DS1742 BRAM/RTC support"
+ depends on TOSHIBA_JMR3927 || TOSHIBA_RBTX4927
+
+config MIPS_INSANE_LARGE
+ bool "Support for large 64-bit configurations"
+ depends on CPU_R10000 && MIPS64
+ help
+ MIPS R10000 does support a 44 bit / 16TB address space as opposed to
+ previous 64-bit processors which only supported 40 bit / 1TB. If you
+ need processes of more than 1TB virtual address space, say Y here.
+ This will result in additional memory usage, so it is not
+ recommended for normal users.
+
+config RWSEM_GENERIC_SPINLOCK
+ bool
+ default y
+
+endmenu
+
+menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)"
+
+config PCI
+ bool "Support for PCI controller"
+ depends on MIPS_DB1000 || DDB5074 || DDB5476 || DDB5477 || HP_LASERJET || LASAT || MIPS_IVR || MIPS_ATLAS || MIPS_COBALT || MIPS_EV64120 || MIPS_EV96100 || MIPS_ITE8172 || MIPS_MALTA || MOMENCO_OCELOT || MOMENCO_OCELOT_C || MOMENCO_OCELOT_G || MIPS_PB1000 || MIPS_PB1100 || MIPS_PB1500 || NEC_EAGLE || SGI_IP27 || SGI_IP32 || SIBYTE_SB1250 || SNI_RM200_PCI || TANBAC_TB0226 || TANBAC_TB0229 || TOSHIBA_JMR3927 || TOSHIBA_RBTX4927 || VICTOR_MPC30X || ZAO_CAPCELLA
+ help
+ Find out whether you have a PCI motherboard. PCI is the name of a
+ bus system, i.e. the way the CPU talks to the other stuff inside
+ your box. Other bus systems are ISA, EISA, or VESA. If you have PCI,
+ say Y, otherwise N.
+
+ The PCI-HOWTO, available from
+ , contains valuable
+ information about which PCI hardware does work under Linux and which
+ doesn't.
+
+source "drivers/pci/Kconfig"
+
+config ISA
+ bool "ISA bus support"
+ depends on ACER_PICA_61 || SGI_IP22 || MIPS_MAGNUM_4000 || OLIVETTI_M700 || SNI_RM200_PCI
+ default y if TOSHIBA_RBTX4927 || DDB5476 || DDB5074 || IBM_WORKPAD || CASIO_E55
+ help
+ Find out whether you have ISA slots on your motherboard. ISA is the
+ name of a bus system, i.e. the way the CPU talks to the other stuff
+ inside your box. Other bus systems are PCI, EISA, or VESA. ISA is
+ an older system, now being displaced by PCI; newer boards don't
+ support it. If you have ISA, say Y, otherwise N.
+
+#
+# The SCSI bits are needed to get the SCSI code to link ...
+#
+config GENERIC_ISA_DMA
+ bool
+ default y if ACER_PICA_61 || MIPS_MAGNUM_4000 || OLIVETTI_M700 || SNI_RM200_PCI || SCSI
+
+config EISA
+ bool "EISA support"
+ depends on ISA && (SGI_IP22 || SNI_RM200_PCI)
+ ---help---
+ The Extended Industry Standard Architecture (EISA) bus was
+ developed as an open alternative to the IBM MicroChannel bus.
+
+ The EISA bus provided some of the features of the IBM MicroChannel
+ bus while maintaining backward compatibility with cards made for
+ the older ISA bus. The EISA bus saw limited use between 1988 and
+ 1995 when it was made obsolete by the PCI bus.
+
+ Say Y here if you are building a kernel for an EISA-based machine.
+
+ Otherwise, say N.
+
+source "drivers/eisa/Kconfig"
+
+config TC
+ bool "TURBOchannel support"
+ depends on DECSTATION
+ help
+ TurboChannel is a DEC (now Compaq (now HP)) bus for Alpha and MIPS
+ processors. Documentation on writing device drivers for TurboChannel
+ is available at:
+ .
+
+#config ACCESSBUS
+# bool "Access.Bus support"
+# depends on TC
+
+config MMU
+ bool
+ default y
+
+config MCA
+ bool
+
+config SBUS
+ bool
+
+config HOTPLUG
+ bool "Support for hot-pluggable devices"
+ ---help---
+ Say Y here if you want to plug devices into your computer while
+ the system is running, and be able to use them quickly. In many
+ cases, the devices can likewise be unplugged at any time too.
+
+ One well known example of this is PCMCIA- or PC-cards, credit-card
+ size devices such as network cards, modems or hard drives which are
+ plugged into slots found on all modern laptop computers. Another
+ example, used on modern desktops as well as laptops, is USB.
+
+ Enable HOTPLUG and KMOD, and build a modular kernel. Get agent
+ software (at ) and install it.
+ Then your kernel will automatically call out to a user mode "policy
+ agent" (/sbin/hotplug) to load modules and set up software needed
+ to use devices as you hotplug them.
+
+source "drivers/pcmcia/Kconfig"
+
+source "drivers/pci/hotplug/Kconfig"
+
+endmenu
+
+menu "Executable file formats"
+
+config KCORE_ELF
+ bool
+ default y
+ ---help---
+ If you enabled support for /proc file system then the file
+ /proc/kcore will contain the kernel core image. This can be used
+ in gdb:
+
+ $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
+
+ You have two choices here: ELF and A.OUT. Selecting ELF will make
+ /proc/kcore appear in ELF core format as defined by the Executable
+ and Linking Format specification. Selecting A.OUT will choose the
+ old "a.out" format which may be necessary for some old versions
+ of binutils or on some architectures.
+
+ This is especially useful if you have compiled the kernel with the
+ "-g" option to preserve debugging information. It is mainly used
+ for examining kernel data structures on the live kernel so if you
+ don't understand what this means or are not a kernel hacker, just
+ leave it at its default value ELF.
+
+config KCORE_AOUT
+ bool
+
+source "fs/Kconfig.binfmt"
+
+config BINFMT_IRIX
+ bool "Include IRIX binary compatibility"
+ depends on !CPU_LITTLE_ENDIAN && MIPS32
+
+config MIPS32_COMPAT
+ bool "Kernel support for Linux/MIPS 32-bit binary compatibility"
+ depends on MIPS64
+ help
+ Select this option if you want Linux/MIPS 32-bit binary
+ compatibility. Since all software available for Linux/MIPS is
+ currently 32-bit you should say Y here.
+
+config COMPAT
+ bool
+ depends on MIPS32_COMPAT
+ default y
+
+config MIPS32_O32
+ bool "Kernel support for o32 binaries"
+ depends on MIPS32_COMPAT
+ help
+ Select this option if you want to run o32 binaries. These are pure
+ 32-bit binaries as used by the 32-bit Linux/MIPS port. Most of
+ existing binaries are in this format.
+
+ If unsure, say Y.
+
+config MIPS32_N32
+ bool "Kernel support for n32 binaries"
+ depends on MIPS32_COMPAT
+ help
+ Select this option if you want to run n32 binaries. These are
+ 64-bit binaries using 32-bit quantities for addressing and certain
+ data that would normally be 64-bit. They are used in special
+ cases.
+
+ If unsure, say N.
+
+config BINFMT_ELF32
+ bool
+ default y if MIPS32_O32 || MIPS32_N32
+
+config PM
+ bool "Power Management support (EXPERIMENTAL)"
+ depends on EXPERIMENTAL && SOC_AU1X00
+
+endmenu
+
+source "drivers/mtd/Kconfig"
+
+source "drivers/parport/Kconfig"
+
+source "drivers/pnp/Kconfig"
+
+source "drivers/base/Kconfig"
+
+source "drivers/block/Kconfig"
+
+
+menu "MIPS initrd options"
+ depends on BLK_DEV_INITRD
+
+config EMBEDDED_RAMDISK
+ bool "Embed root filesystem ramdisk into the kernel"
+
+config EMBEDDED_RAMDISK_IMAGE
+ string "Filename of gziped ramdisk image"
+ depends on EMBEDDED_RAMDISK
+ default "ramdisk.gz"
+ help
+ This is the filename of the ramdisk image to be built into the
+ kernel. Relative pathnames are relative to arch/mips/ramdisk/.
+ The ramdisk image is not part of the kernel distribution; you must
+ provide one yourself.
+
+endmenu
+
+source "drivers/ide/Kconfig"
+
+source "drivers/scsi/Kconfig"
+
+source "drivers/cdrom/Kconfig"
+
+source "drivers/md/Kconfig"
+
+source "drivers/message/fusion/Kconfig"
+
+source "drivers/ieee1394/Kconfig"
+
+source "drivers/message/i2o/Kconfig"
+
+source "net/Kconfig"
+
+source "net/ax25/Kconfig"
+
+source "net/irda/Kconfig"
+
+source "drivers/isdn/Kconfig"
+
+source "drivers/telephony/Kconfig"
+
+#
+# input before char - char/joystick depends on it. As does USB.
+#
+source "drivers/input/Kconfig"
+
+source "drivers/char/Kconfig"
+
+#source drivers/misc/Config.in
+
+source "drivers/media/Kconfig"
+
+source "fs/Kconfig"
+
+source "drivers/video/Kconfig"
+
+
+menu "Sound"
+
+config SOUND
+ tristate "Sound card support"
+ ---help---
+ If you have a sound card in your computer, i.e. if it can say more
+ than an occasional beep, say Y. Be sure to have all the information
+ about your sound card and its configuration down (I/O port,
+ interrupt and DMA channel), because you will be asked for it.
+
+ You want to read the Sound-HOWTO, available from
+ . General information about
+ the modular sound system is contained in the files
+ . The file
+ contains some slightly
+ outdated but still useful information as well.
+
+ If you have a PnP sound card and you want to configure it at boot
+ time using the ISA PnP tools (read
+ ), then you need to
+ compile the sound card support as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want)
+ and load that module after the PnP configuration is finished. To do
+ this, say M here and read as well
+ as ; the module will be
+ called soundcore.
+
+ I'm told that even without a sound card, you can make your computer
+ say more than an occasional beep, by programming the PC speaker.
+ Kernel patches and supporting utilities to do that are in the pcsp
+ package, available at .
+
+source "sound/Kconfig"
+
+endmenu
+
+source "drivers/usb/Kconfig"
+
+source "net/bluetooth/Kconfig"
+
+
+menu "Kernel hacking"
+
+config CROSSCOMPILE
+ bool "Are you using a crosscompiler"
+ help
+ Say Y here if you are compiling the kernel on a different
+ architecture than the one it is intended to run on.
+
+config DEBUG_KERNEL
+ bool "Kernel debugging"
+
+config KGDB
+ bool "Remote GDB kernel debugging"
+ depends on DEBUG_KERNEL
+ help
+ If you say Y here, it will be possible to remotely debug the MIPS
+ kernel using gdb. This enlarges your kernel image disk size by
+ several megabytes and requires a machine with more than 16 MB,
+ better 32 MB RAM to avoid excessive linking time. This is only
+ useful for kernel hackers. If unsure, say N.
+
+config GDB_CONSOLE
+ bool "Console output to GDB"
+ depends on KGDB
+ help
+ If you are using GDB for remote debugging over a serial port and
+ would like kernel messages to be formatted into GDB $O packets so
+ that GDB prints them as program output, say 'Y'.
+
+config RUNTIME_DEBUG
+ bool "Enable run-time debugging"
+ depends on DEBUG_KERNEL
+ help
+ If you say Y here, some debugging macros will do run-time checking.
+ If you say N here, those macros will mostly turn to no-ops. See
+ include/asm-mips/debug.h for debuging macros.
+ If unsure, say N.
+
+
+config MAGIC_SYSRQ
+ bool "Magic SysRq key"
+ depends on DEBUG_KERNEL
+ help
+ If you say Y here, you will have some control over the system even
+ if the system crashes for example during kernel debugging (e.g., you
+ will be able to flush the buffer cache to disk, reboot the system
+ immediately or dump some status information). This is accomplished
+ by pressing various keys while holding SysRq (Alt+PrintScreen). It
+ also works on a serial console (on PC hardware at least), if you
+ send a BREAK and then within 5 seconds a command keypress. The
+ keys are documented in . Don't say Y
+ unless you really know what this hack does.
+
+config MIPS_UNCACHED
+ bool "Run uncached"
+ depends on DEBUG_KERNEL && !SMP && !SGI_IP27
+ help
+ If you say Y here there kernel will disable all CPU caches. This will
+ reduce the system's performance dramatically but can help finding
+ otherwise hard to track bugs. It can also useful if you're doing
+ hardware debugging with a logic analyzer and need to see all traffic
+ on the bus.
+
+config DEBUG_HIGHMEM
+ bool "Highmem debugging"
+ depends on DEBUG_KERNEL && HIGHMEM
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
diff -Nru a/arch/mips/Makefile b/arch/mips/Makefile
--- a/arch/mips/Makefile Wed Jul 2 13:59:48 2003
+++ b/arch/mips/Makefile Wed Jul 2 13:59:48 2003
@@ -5,11 +5,11 @@
#
# Copyright (C) 1994, 1995, 1996 by Ralf Baechle
# DECStation modifications by Paul M. Antoine, 1996
+# Copyright (C) 2002 Maciej W. Rozycki
#
# This file is included by the global makefile so that you can add your own
# architecture-specific flags and dependencies. Remember to do have actions
-# for "archclean" and "archdep" for cleaning up and making dependencies for
-# this architecture
+# for "archclean" cleaning up for this architecture.
#
#
@@ -17,16 +17,20 @@
#
ifdef CONFIG_CPU_LITTLE_ENDIAN
tool-prefix = mipsel-linux-
+JIFFIES32 = jiffies_64
+LDFLAGS_BLOB := --format binary --oformat elf32-tradlittlemips
else
tool-prefix = mips-linux-
+JIFFIES32 = jiffies_64 + 4
+LDFLAGS_BLOB := --format binary --oformat elf32-tradbigmips
endif
ifdef CONFIG_CROSSCOMPILE
-CROSS_COMPILE = $(tool-prefix)
+CROSS_COMPILE := $(tool-prefix)
endif
#
-# GCC uses -G0 -mabicalls -fpic as default. We don't want PIC in the kernel
+# GCC uses -G 0 -mabicalls -fpic as default. We don't want PIC in the kernel
# code since it only slows down the whole thing. At some point we might make
# use of global pointer optimizations but their use of $28 conflicts with
# the current pointer optimization.
@@ -35,218 +39,314 @@
# machines may also. Since BFD is incredibly buggy with respect to
# crossformat linking we rely on the elf2ecoff tool for format conversion.
#
-GCCFLAGS := -G 0 -mno-abicalls -fno-pic
-LDFLAGS_vmlinux += -static
-MODFLAGS += -mlong-calls
-LDFLAGS := -G 0
+cflags-y := -I $(TOPDIR)/include/asm/gcc
+cflags-y += -G 0 -mno-abicalls -fno-pic -pipe
+LDFLAGS_vmalinux += -G 0 -static # -N
+MODFLAGS += -mlong-calls
-ifdef CONFIG_REMOTE_DEBUG
-CFLAGS := $(CFLAGS) -g
-endif
+cflags-$(CONFIG_KGDB) += -g
+cflags-$(CONFIG_SB1XXX_CORELIS) += -mno-sched-prolog -fno-omit-frame-pointer
+
+check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
#
# CPU-dependent compiler/assembler options for optimization.
#
-ifdef CONFIG_CPU_R3000
-GCCFLAGS += -mcpu=r3000 -mips1
-endif
-ifdef CONFIG_CPU_R6000
-GCCFLAGS += -mcpu=r6000 -mips2 -Wa,--trap
-endif
-ifdef CONFIG_CPU_R4300
-GCCFLAGS += -mcpu=r4300 -mips2 -Wa,--trap
-endif
-ifdef CONFIG_CPU_VR41XX
-GCCFLAGS += -mcpu=r4600 -mips2 -Wa,--trap
-endif
-ifdef CONFIG_CPU_R4X00
-GCCFLAGS += -mcpu=r4600 -mips2 -Wa,--trap
-endif
-ifdef CONFIG_CPU_MIPS32
-GCCFLAGS += -mcpu=r4600 -mips2 -Wa,--trap
-endif
-ifdef CONFIG_CPU_MIPS64
-GCCFLAGS += -mcpu=r4600 -mips2 -Wa,--trap
-endif
-ifdef CONFIG_CPU_R5000
-GCCFLAGS += -mcpu=r5000 -mips2 -Wa,--trap
-endif
-ifdef CONFIG_CPU_R5432
-GCCFLAGS += -mcpu=r5000 -mips2 -Wa,--trap
-endif
-ifdef CONFIG_CPU_NEVADA
+cflags-$(CONFIG_CPU_R3000) += -mcpu=r3000 -mips1
+cflags-$(CONFIG_CPU_TX39XX) += -mcpu=r3000 -mips1
+cflags-$(CONFIG_CPU_R6000) += -mcpu=r6000 -mips2 -Wa,--trap
+cflags-$(CONFIG_CPU_R4300) += -mcpu=r4300 -mips2 -Wa,--trap
+cflags-$(CONFIG_CPU_VR41XX) += -mcpu=r4600 -mips2 -Wa,--trap
+cflags-$(CONFIG_CPU_R4X00) += -mcpu=r4600 -mips2 -Wa,--trap
+cflags-$(CONFIG_CPU_TX49XX) += -mcpu=r4600 -mips2 -Wa,--trap
+cflags-$(CONFIG_CPU_MIPS32) += -mcpu=r4600 -mips2 -Wa,--trap
+cflags-$(CONFIG_CPU_MIPS64) += -mcpu=r4600 -mips2 -Wa,--trap
+cflags-$(CONFIG_CPU_R5000) += -mcpu=r5000 -mips2 -Wa,--trap
+cflags-$(CONFIG_CPU_R5432) += -mcpu=r5000 -mips2 -Wa,--trap
# Cannot use -mmad with currently recommended tools
-GCCFLAGS += -mcpu=r5000 -mips2 -Wa,--trap
-endif
-ifdef CONFIG_CPU_RM7000
-GCCFLAGS += -mcpu=r5000 -mips2 -Wa,--trap
-endif
+cflags-$(CONFIG_CPU_NEVADA) += -mcpu=r5000 -mips2 -Wa,--trap
+cflags-$(CONFIG_CPU_RM7000) += -mcpu=r5000 -mips2 -Wa,--trap
+cflags-$(CONFIG_CPU_RM7000) += $(call check_gcc, -mcpu=r7000, -mcpu=r5000) \
+ -mips2 -Wa,--trap
+cflags-$(CONFIG_CPU_SB1) += $(call check_gcc, -mcpu=sb1, -mcpu=r8000) \
+ -mips2 -Wa,--trap
ifdef CONFIG_CPU_SB1
-GCCFLAGS += -mcpu=sb1 -mips2 -Wa,--trap
+ifdef CONFIG_SB1_PASS_1_WORKAROUNDS
+MODFLAGS += -msb1-pass1-workarounds
endif
+endif
+
+AFLAGS += $(cflags-y)
+CFLAGS += $(cflags-y)
-GCCFLAGS += -pipe
-CFLAGS := -I $(TOPDIR)/include/asm/gcc $(CFLAGS) $(GCCFLAGS)
-AFLAGS += $(GCCFLAGS)
-ASFLAGS += $(GCCFLAGS)
+#
+# ramdisk/initrd support
+# You need a compressed ramdisk image, named ramdisk.gz in
+# arch/mips/ramdisk
+#
+ifdef CONFIG_EMBEDDED_RAMDISK
+CORE_FILES += arch/mips/ramdisk/ramdisk.o
+SUBDIRS += arch/mips/ramdisk
+endif
#
-# We unconditionally build the math emulator
+# Firmware support
#
-core-y += arch/mips/math-emu/
+libs-$(CONFIG_ARC) += arch/mips/arc/
+libs-$(CONFIG_SIBYTE_CFE) += arch/mips/sibyte/cfe/
#
# Board-dependent options and extra files
#
-ifdef CONFIG_ALGOR_P4032
-core-y += arch/mips/algor/
-LOADADDR += 0x80000000
-endif
#
-# DECstation family
+# Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
#
-ifdef CONFIG_DECSTATION
-core-y += arch/mips/dec/
-libs-y += arch/mips/dec/prom/
-LOADADDR += 0x80040000
-endif
+core-$(CONFIG_MIPS_JAZZ) += arch/mips/jazz/
+load-$(CONFIG_MIPS_JAZZ) += 0x80080000
-ifdef CONFIG_MIPS_ATLAS
-core-y += arch/mips/mips-boards/atlas/ arch/mips/mips-boards/generic/
-LOADADDR += 0x80100000
-endif
-ifdef CONFIG_MIPS_MALTA
-core-y += arch/mips/mips-boards/malta/ arch/mips/mips-boards/generic/
-LOADADDR += 0x80100000
-endif
+#
+# Au1500 (Alchemy Semi PB1500) eval board
+#
+core-$(CONFIG_MIPS_PB1500) += arch/mips/au1000/common/
+libs-$(CONFIG_MIPS_PB1500) += arch/mips/au1000/pb1500/
+load-$(CONFIG_MIPS_PB1500) += 0x80100000
#
-# Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
+# Baget/MIPS
#
-ifdef CONFIG_MIPS_JAZZ
-core-y += arch/mips/jazz/
-libs-y += arch/mips/arc/
-LOADADDR += 0x80080000
-endif
+libs-$(CONFIG_BAGET_MIPS) += arch/mips/baget/ arch/mips/baget/prom/
+load-$(CONFIG_BAGET_MIPS) += 0x80001000
-ifdef CONFIG_SNI_RM200_PCI
-core-y += arch/mips/sni/
-libs-y += arch/mips/arc/
-LOADADDR += 0x80080000
-endif
+#
+# Cobalt Server
+#
+core-$(CONFIG_MIPS_COBALT) += arch/mips/cobalt/
+load-$(CONFIG_MIPS_COBALT) += 0x80080000
-ifdef CONFIG_SGI_IP22
-core-y += arch/mips/sgi/kernel/
-libs-y += arch/mips/arc/
-#
-# Set LOADADDR to >= 0x88069000 if you want to leave space for symmon,
-# 0x88002000 for production kernels. Note that the value must be
-# 8kb aligned or the handling of the current variable will break.
#
-LOADADDR += 0x88002000
-endif
+# DECstation family
+#
+core-$(CONFIG_DECSTATION) += arch/mips/dec/
+libs-$(CONFIG_DECSTATION) += arch/mips/dec/prom/
+load-$(CONFIG_DECSTATION) += 0x80040000
+CLEAN_FILES += drivers/tc/lk201-map.c
#
-# Baget/MIPS
+# Galileo EV64120 Board
#
-ifdef CONFIG_BAGET_MIPS
-core-y += arch/mips/baget/
-libs-y += arch/mips/baget/prom/
-LOADADDR += 0x80001000
-endif
+core-$(CONFIG_MIPS_EV64120) += arch/mips/galileo-boards/ev64120/
+load-$(CONFIG_MIPS_EV64120) += 0x80100000
#
-# NEC DDB Vrc-5074
+# Galileo EV96100 Board
#
-ifdef CONFIG_DDB5074
-core-y += arch/mips/ddb5074/
-LOADADDR += 0x80080000
-endif
+core-$(CONFIG_MIPS_EV96100) += arch/mips/galileo-boards/generic/ \
+ arch/mips/galileo-boards/ev96100/
+load-$(CONFIG_MIPS_EV96100) += 0x80100000
#
+# Globespan IVR eval board with QED 5231 CPU
#
-# NEC DDB Vrc-5476
+core-$(CONFIG_ITE_BOARD_GEN) += arch/mips/ite-boards/generic/
+core-$(CONFIG_MIPS_IVR) += arch/mips/ite-boards/ivr/
+load-$(CONFIG_MIPS_IVR) += 0x80100000
+
#
-ifdef CONFIG_DDB5476
-core-y += arch/mips/ddb5476/
-LOADADDR += 0x80080000
-endif
+# HP LaserJet
+#
+core-$(CONFIG_HP_LASERJET) += arch/mips/hp-lj/
+load-$(CONFIG_HP_LASERJET) += 0x80030000
#
+# ITE 8172 eval board with QED 5231 CPU
#
-# NEC DDB Vrc-5477
+core-$(CONFIG_MIPS_ITE8172) += arch/mips/ite-boards/qed-4n-s01b/
+load-$(CONFIG_MIPS_ITE8172) += 0x80100000
+
#
-ifdef CONFIG_DDB5477
-core-y += arch/mips/ddb5xxx/common/ \
- arch/mips/ddb5xxx/ddb5477/
-LOADADDR += 0x80080000
-endif
+# MIPS Atlas board
+#
+core-$(CONFIG_MIPS_BOARDS_GEN) += arch/mips/mips-boards/generic/
+core-$(CONFIG_MIPS_ATLAS) += arch/mips/mips-boards/atlas/
+load-$(CONFIG_MIPS_ATLAS) += 0x80100000
#
-# Galileo EV64120 Board
+# MIPS Malta board
#
-ifdef CONFIG_MIPS_EV64120
-core-y += arch/mips/galileo-boards/ev64120/
-LOADADDR += 0x80100000
-endif
+core-$(CONFIG_MIPS_MALTA) += arch/mips/mips-boards/malta/
+load-$(CONFIG_MIPS_MALTA) := 0x80100000
#
-# Galileo EV96100 Board
+# MIPS SEAD board
#
-ifdef CONFIG_MIPS_EV96100
-core-y += arch/mips/galileo-boards/ev96100/ \
- arch/mips/galileo-boards/generic/
-LOADADDR += 0x80100000
-endif
+core-$(CONFIG_MIPS_SEAD) += arch/mips/mips-boards/sead/
+load-$(CONFIG_MIPS_SEAD) += 0x80100000
#
# Momentum Ocelot board
#
-ifdef CONFIG_MOMENCO_OCELOT
# The Ocelot setup.o must be linked early - it does the ioremap() for the
# mips_io_port_base.
-core-y += arch/mips/gt64120/common/ \
- arch/mips/gt64120/momenco_ocelot/
-LOADADDR += 0x80100000
-endif
+#
+core-$(CONFIG_MOMENCO_OCELOT) += arch/mips/gt64120/common/ \
+ arch/mips/gt64120/momenco_ocelot/
+load-$(CONFIG_MOMENCO_OCELOT) += 0x80100000
#
-# Philips Nino
+# Momentum Ocelot-G board
#
-ifdef CONFIG_NINO
-core-y += arch/mips/philips/nino/
-LOADADDR += 0x80000000
-endif
+# The Ocelot-G setup.o must be linked early - it does the ioremap() for the
+# mips_io_port_base.
+#
+core-$(CONFIG_MOMENCO_OCELOT_G) += arch/mips/momentum/ocelot_g/
+load-$(CONFIG_MOMENCO_OCELOT_G) += 0x80100000
#
-# ITE 8172 eval board with QED 5231 CPU
+# Momentum Ocelot-C and -CS boards
#
-ifdef CONFIG_MIPS_ITE8172
-core-y += arch/mips/ite-boards/qed-4n-s01b/ \
- arch/mips/ite-boards/generic/
-LOADADDR += 0x80100000
-endif
+# The Ocelot-C[S] setup.o must be linked early - it does the ioremap() for the
+# mips_io_port_base.
+core-$(CONFIG_MOMENCO_OCELOT_C) += arch/mips/momentum/ocelot_c/
+load-$(CONFIG_MOMENCO_OCELOT_C) += 0x80100000
#
-# Globespan IVR eval board with QED 5231 CPU
+# NEC DDB Vrc-5074
#
-ifdef CONFIG_MIPS_IVR
-core-y += arch/mips/ite-boards/ivr/ \
- arch/mips/ite-boards/generic/
-LOADADDR += 0x80100000
-endif
+core-$(CONFIG_DDB5XXX_COMMON) += arch/mips/ddb5xxx/common/
+core-$(CONFIG_DDB5074) += arch/mips/ddb5xxx/ddb5074/
+load-$(CONFIG_DDB5074) += 0x80080000
#
-# Au1000 eval board
+# NEC DDB Vrc-5476
#
-ifdef CONFIG_MIPS_PB1000
-core-y += arch/mips/au1000/pb1000/ \
- arch/mips/au1000/common/
-LOADADDR += 0x80100000
-endif
+core-$(CONFIG_DDB5476) += arch/mips/ddb5xxx/ddb5476/
+load-$(CONFIG_DDB5476) += 0x80080000
+
+#
+# NEC DDB Vrc-5477
+#
+core-$(CONFIG_DDB5477) += arch/mips/ddb5xxx/ddb5477/
+load-$(CONFIG_DDB5477) += 0x80100000
+
+core-$(CONFIG_LASAT) += arch/mips/lasat/
+load-$(CONFIG_LASAT) += 0x80000000
+
+#
+# NEC Osprey (vr4181) board
+#
+core-$(CONFIG_NEC_OSPREY) += arch/mips/vr4181/common/ \
+ arch/mips/vr4181/osprey/
+load-$(CONFIG_NEC_OSPREY) += 0x80002000
+
+#
+# NEC Eagle/Hawk (VR4122/VR4131) board
+#
+core-$(CONFIG_VR41XX_COMMON) += arch/mips/vr41xx/common/
+core-$(CONFIG_NEC_EAGLE) += arch/mips/vr41xx/nec-eagle/
+load-$(CONFIG_NEC_EAGLE) += 0x80000000
+
+#
+# ZAO Networks Capcella (VR4131)
+#
+core-$(CONFIG_ZAO_CAPCELLA) += arch/mips/vr41xx/zao-capcella/
+load-$(CONFIG_ZAO_CAPCELLA) += 0x80000000
+
+#
+# Victor MP-C303/304 (VR4122)
+#
+core-$(CONFIG_VICTOR_MPC30X) += arch/mips/vr41xx/victor-mpc30x/
+load-$(CONFIG_VICTOR_MPC30X) += 0x80001000
+
+#
+# IBM WorkPad z50 (VR4121)
+#
+core-$(CONFIG_IBM_WORKPAD) += arch/mips/vr41xx/ibm-workpad/
+load-$(CONFIG_IBM_WORKPAD) += 0x80004000
+
+#
+# CASIO CASSIPEIA E-55/65 (VR4111)
+#
+core-$(CONFIG_CASIO_E55) += arch/mips/vr41xx/casio-e55/
+load-$(CONFIG_CASIO_E55) += 0x80004000
+
+#
+# TANBAC TB0226 Mbase (VR4131)
+#
+core-$(CONFIG_TANBAC_TB0226) += arch/mips/vr41xx/tanbac-tb0226/
+load-$(CONFIG_TANBAC_TB0226) += 0x80000000
+
+#
+# TANBAC TB0229 VR4131DIMM (VR4131)
+#
+core-$(CONFIG_TANBAC_TB0229) += arch/mips/vr41xx/tanbac-tb0229/
+load-$(CONFIG_TANBAC_TB0229) += 0x80000000
+
+#
+# SGI IP22 (Indy/Indigo2)
+#
+# Set the load address to >= 0x88069000 if you want to leave space for symmon,
+# 0x88002000 for production kernels. Note that the value must be 8kb aligned
+# or the handling of the current variable will break.
+#
+core-$(CONFIG_SGI_IP22) += arch/mips/sgi-ip22/
+load-$(CONFIG_SGI_IP22) += 0x88002000
+
+#
+# Sibyte SB1250 SOC
+#
+# This is a LIB so that it links at the end, and initcalls are later
+# the sequence; but it is built as an object so that modules don't get
+# removed (as happens, even if they have __initcall/module_init)
+#
+core-$(CONFIG_SIBYTE_BCM112X) += arch/mips/sibyte/sb1250/
+core-$(CONFIG_SIBYTE_SB1250) += arch/mips/sibyte/sb1250/
+
+#
+# Sibyte BCM91120x (Carmel) board
+# Sibyte BCM91120C (CRhine) board
+# Sibyte BCM91125C (CRhone) board
+# Sibyte BCM91125E (Rhone) board
+# Sibyte SWARM board
+#
+libs-$(CONFIG_SIBYTE_CARMEL) += arch/mips/sibyte/swarm/
+load-$(CONFIG_SIBYTE_CARMEL) := 0x80100000
+libs-$(CONFIG_SIBYTE_CRHINE) += arch/mips/sibyte/swarm/
+load-$(CONFIG_SIBYTE_CRHINE) := 0x80100000
+libs-$(CONFIG_SIBYTE_CRHONE) += arch/mips/sibyte/swarm/
+load-$(CONFIG_SIBYTE_CRHONE) := 0x80100000
+libs-$(CONFIG_SIBYTE_RHONE) += arch/mips/sibyte/swarm/
+load-$(CONFIG_SIBYTE_RHONE) := 0x80100000
+libs-$(CONFIG_SIBYTE_SENTOSA) += arch/mips/sibyte/swarm/
+load-$(CONFIG_SIBYTE_SENTOSA) := 0x80100000
+libs-$(CONFIG_SIBYTE_SWARM) += arch/mips/sibyte/swarm/
+load-$(CONFIG_SIBYTE_SWARM) := 0x80100000
+
+#
+# SNI RM200 PCI
+#
+core-$(CONFIG_SNI_RM200_PCI) += arch/mips/sni/
+load-$(CONFIG_SNI_RM200_PCI) += 0x80080000
+
+#
+# Toshiba JMR-TX3927 board
+#
+core-$(CONFIG_TOSHIBA_JMR3927) += arch/mips/jmr3927/rbhma3100/ \
+ arch/mips/jmr3927/common/
+load-$(CONFIG_TOSHIBA_JMR3927) += 0x80050000
+
+#
+# Toshiba RBTX4927 board or
+# Toshiba RBTX4937 board
+#
+core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/toshiba_rbtx4927/
+core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/common/
+load-$(CONFIG_TOSHIBA_RBTX4927) := 0x80020000
+
+drivers-$(CONFIG_PCI) += arch/mips/pci/
+
#
# Choosing incompatible machines durings configuration will result in
@@ -254,42 +354,79 @@
# none has been choosen above.
#
-AFLAGS_vmlinux.lds.o := -DLOADADDR=$(LOADADDR)
+AFLAGS_vmlinux.lds.o := -D"LOADADDR=$(load-y)" -D"JIFFIES32=$(JIFFIES32)"
head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
-SUBDIRS := arch/mips/tools
-
-core-y += arch/mips/kernel/ arch/mips/mm/
-libs-y += arch/mips/lib/lib.a
+libs-y += arch/mips/lib/
+core-y += arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/
ifdef CONFIG_BAGET_MIPS
BAGETBOOT = $(MAKE) -C arch/$(ARCH)/baget
-balo: vmlinux
+balo: vmlinux
$(BAGETBOOT) balo
endif
-ifdef CONFIG_MIPS_EV64120
-GALILEOBOOT = $(MAKE) -C arch/$(ARCH)/galileo-boards/ev64120
+ifdef CONFIG_LASAT
+rom.bin rom.sw: vmlinux
+ $(call descend,arch/mips/lasat/image,$@)
+endif
+
+makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/mips/boot $(1)
-gboot: vmlinux
- $(MAKE) -C arch/$(ARCH)/galileo-boards/ev64120/compressed
+#
+# SNI firmware is f*cked in interesting ways ...
+#
+ifdef CONFIG_SNI_RM200_PCI
+all: vmlinux.rm200
endif
-MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
+vmlinux.ecoff vmlinux.rm200: vmlinux
+ +@$(call makeboot,$@)
-vmlinux.ecoff: vmlinux
- @$(MAKEBOOT) $@
+CLEAN_FILES += vmlinux.ecoff \
+ vmlinux.rm200.tmp \
+ vmlinux.rm200
archclean:
- @$(MAKEBOOT) clean
- rm -f arch/$(ARCH)/ld.script
- $(MAKE) -C arch/$(ARCH)/tools clean
- $(MAKE) -C arch/mips/baget clean
+ @$(MAKE) -f scripts/Makefile.clean obj=arch/mips/boot
+ @$(MAKE) -f scripts/Makefile.clean obj=arch/mips/baget
+ @$(MAKE) -f scripts/Makefile.clean obj=arch/mips/lasat
archmrproper:
- @$(MAKEBOOT) mrproper
- $(MAKE) -C arch/$(ARCH)/tools mrproper
+
+# Generate
#include
-#include
#include
#include
#include
-
-extern char prom_getchar (void);
-extern void prom_printf (char *, ...);
+#include
static void prom_console_write(struct console *co, const char *s,
unsigned count)
{
- unsigned i;
-
- /*
- * Now, do each character
- */
- for (i = 0; i < count; i++) {
- if (*s == 10)
- prom_printf("%c", 13);
- prom_printf("%c", *s++);
+ /* Do each character */
+ while (count--) {
+ if (*s == '\n')
+ prom_putchar('\r');
+ prom_putchar(*s++);
}
}
-static int prom_console_wait_key(struct console *co)
-{
- return prom_getchar();
-}
-
static int __init prom_console_setup(struct console *co, char *options)
{
- return 0;
-}
-
-static kdev_t prom_console_device(struct console *c)
-{
- return MKDEV(TTY_MAJOR, 64 + c->index);
+ return !(prom_flags & PROM_FLAG_USE_AS_CONSOLE);
}
static struct console arc_cons = {
- "ttyS",
- prom_console_write,
- NULL,
- prom_console_device,
- prom_console_wait_key,
- NULL,
- prom_console_setup,
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ .name = "arc",
+ .write = prom_console_write,
+ .setup = prom_console_setup,
+ .flags = CON_PRINTBUFFER,
+ .index = -1,
};
/*
* Register console.
*/
-static void __init arc_console_init(void)
+static int __init arc_console_init(void)
{
register_console(&arc_cons);
+
+ return 0;
}
console_initcall(arc_console_init);
diff -Nru a/arch/mips/arc/cmdline.c b/arch/mips/arc/cmdline.c
--- a/arch/mips/arc/cmdline.c Wed Jul 2 14:00:42 2003
+++ b/arch/mips/arc/cmdline.c Wed Jul 2 14:00:42 2003
@@ -1,4 +1,8 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
* cmdline.c: Kernel command line creation using ARCS argc/argv.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
@@ -12,11 +16,11 @@
#undef DEBUG_CMDLINE
-char arcs_cmdline[COMMAND_LINE_SIZE];
+char arcs_cmdline[CL_SIZE];
char * __init prom_getcmdline(void)
{
- return &(arcs_cmdline[0]);
+ return arcs_cmdline;
}
static char *ignored[] = {
@@ -28,7 +32,6 @@
"OSLoadFilename=",
"OSLoadOptions="
};
-#define NENTS(foo) ((sizeof((foo)) / (sizeof((foo[0])))))
static char *used_arc[][2] = {
{ "OSLoadPartition=", "root=" },
@@ -43,16 +46,16 @@
actr = 1; /* Always ignore argv[0] */
while (actr < prom_argc) {
- for(i = 0; i < NENTS(used_arc); i++) {
+ for(i = 0; i < ARRAY_SIZE(used_arc); i++) {
int len = strlen(used_arc[i][0]);
- if(!strncmp(prom_argv[actr], used_arc[i][0], len)) {
+ if (!strncmp(prom_argv(actr), used_arc[i][0], len)) {
/* Ok, we want it. First append the replacement... */
strcat(cp, used_arc[i][1]);
cp += strlen(used_arc[i][1]);
/* ... and now the argument */
- s = strstr(prom_argv[actr], "=");
- if(s) {
+ s = strstr(prom_argv(actr), "=");
+ if (s) {
s++;
strcpy(cp, s);
cp += strlen(s);
@@ -67,7 +70,6 @@
return cp;
}
-
void __init prom_init_cmdline(void)
{
char *cp;
@@ -75,33 +77,34 @@
actr = 1; /* Always ignore argv[0] */
- cp = &(arcs_cmdline[0]);
- /*
+ cp = arcs_cmdline;
+ /*
* Move ARC variables to the beginning to make sure they can be
* overridden by later arguments.
*/
cp = move_firmware_args(cp);
while (actr < prom_argc) {
- for (i = 0; i < NENTS(ignored); i++) {
+ for (i = 0; i < ARRAY_SIZE(ignored); i++) {
int len = strlen(ignored[i]);
- if(!strncmp(prom_argv[actr], ignored[i], len))
+ if (!strncmp(prom_argv(actr), ignored[i], len))
goto pic_cont;
}
/* Ok, we want it. */
- strcpy(cp, prom_argv[actr]);
- cp += strlen(prom_argv[actr]);
+ strcpy(cp, prom_argv(actr));
+ cp += strlen(prom_argv(actr));
*cp++ = ' ';
pic_cont:
actr++;
}
- if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */
+
+ if (cp != arcs_cmdline) /* get rid of trailing space */
--cp;
*cp = '\0';
#ifdef DEBUG_CMDLINE
- prom_printf("prom_init_cmdline: %s\n", &(arcs_cmdline[0]));
+ printk(KERN_DEBUG "prom cmdline: %s\n", arcs_cmdline);
#endif
}
diff -Nru a/arch/mips/arc/console.c b/arch/mips/arc/console.c
--- a/arch/mips/arc/console.c Wed Jul 2 14:00:04 2003
+++ b/arch/mips/arc/console.c Wed Jul 2 14:00:04 2003
@@ -6,14 +6,9 @@
* Copyright (C) 1996 David S. Miller (dm@sgi.com)
* Compability with board caches, Ulf Carlsson
*/
-#include
-#include
#include
#include
#include
-#include
-#include
-#include
/*
* IP22 boardcache is not compatible with board caches. Thus we disable it
@@ -27,44 +22,42 @@
void prom_putchar(char c)
{
- long cnt;
- char it = c;
+ ULONG cnt;
+ CHAR it = c;
bc_disable();
- romvec->write(1, &it, 1, &cnt);
+ ArcWrite(1, &it, 1, &cnt);
bc_enable();
}
-char __init prom_getchar(void)
+char prom_getchar(void)
{
- long cnt;
- char c;
+ ULONG cnt;
+ CHAR c;
bc_disable();
- romvec->read(0, &c, 1, &cnt);
+ ArcRead(0, &c, 1, &cnt);
bc_enable();
return c;
}
-static char ppbuf[1024];
-
void prom_printf(char *fmt, ...)
{
va_list args;
- char ch, *bptr;
- int i;
+ char ppbuf[1024];
+ char *bptr;
va_start(args, fmt);
- i = vsprintf(ppbuf, fmt, args);
+ vsprintf(ppbuf, fmt, args);
bptr = ppbuf;
- while ((ch = *(bptr++)) != 0) {
- if (ch == '\n')
+ while (*bptr != 0) {
+ if (*bptr == '\n')
prom_putchar('\r');
- prom_putchar(ch);
+ prom_putchar(*bptr++);
}
va_end(args);
}
diff -Nru a/arch/mips/arc/env.c b/arch/mips/arc/env.c
--- a/arch/mips/arc/env.c Wed Jul 2 13:59:53 2003
+++ b/arch/mips/arc/env.c Wed Jul 2 13:59:53 2003
@@ -1,24 +1,27 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
* env.c: ARCS environment variable routines.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
- *
- * $Id: env.c,v 1.2 1999/10/09 00:00:57 ralf Exp $
*/
#include
#include
#include
+#include
#include
PCHAR __init
ArcGetEnvironmentVariable(CHAR *name)
{
- return romvec->get_evar(name);
+ return (CHAR *) ARC_CALL1(get_evar, name);
}
LONG __init
ArcSetEnvironmentVariable(PCHAR name, PCHAR value)
{
- return romvec->set_evar(name, value);
+ return ARC_CALL2(set_evar, name, value);
}
diff -Nru a/arch/mips/arc/file.c b/arch/mips/arc/file.c
--- a/arch/mips/arc/file.c Wed Jul 2 13:59:52 2003
+++ b/arch/mips/arc/file.c Wed Jul 2 13:59:52 2003
@@ -1,59 +1,75 @@
/*
- * file.c: ARCS firmware interface to files.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ * ARC firmware interface.
*
- * $Id: file.c,v 1.1 1998/10/18 13:32:08 tsbogend Exp $
+ * Copyright (C) 1994, 1995, 1996, 1999 Ralf Baechle
+ * Copyright (C) 1999 Silicon Graphics, Inc.
*/
#include
+
+#include
#include
-long __init prom_getvdirent(unsigned long fd, struct linux_vdirent *ent, unsigned long num, unsigned long *cnt)
+LONG __init
+ArcGetDirectoryEntry(ULONG FileID, struct linux_vdirent *Buffer,
+ ULONG N, ULONG *Count)
{
- return romvec->get_vdirent(fd, ent, num, cnt);
+ return ARC_CALL4(get_vdirent, FileID, Buffer, N, Count);
}
-long __init prom_open(char *name, enum linux_omode md, unsigned long *fd)
+LONG __init
+ArcOpen(CHAR *Path, enum linux_omode OpenMode, ULONG *FileID)
{
- return romvec->open(name, md, fd);
+ return ARC_CALL3(open, Path, OpenMode, FileID);
}
-long __init prom_close(unsigned long fd)
+LONG __init
+ArcClose(ULONG FileID)
{
- return romvec->close(fd);
+ return ARC_CALL1(close, FileID);
}
-long __init prom_read(unsigned long fd, void *buf, unsigned long num, unsigned long *cnt)
+LONG __init
+ArcRead(ULONG FileID, VOID *Buffer, ULONG N, ULONG *Count)
{
- return romvec->read(fd, buf, num, cnt);
+ return ARC_CALL4(read, FileID, Buffer, N, Count);
}
-long __init prom_getrstatus(unsigned long fd)
+LONG __init
+ArcGetReadStatus(ULONG FileID)
{
- return romvec->get_rstatus(fd);
+ return ARC_CALL1(get_rstatus, FileID);
}
-long __init prom_write(unsigned long fd, void *buf, unsigned long num, unsigned long *cnt)
+LONG __init
+ArcWrite(ULONG FileID, PVOID Buffer, ULONG N, PULONG Count)
{
- return romvec->write(fd, buf, num, cnt);
+ return ARC_CALL4(write, FileID, Buffer, N, Count);
}
-long __init prom_seek(unsigned long fd, struct linux_bigint *off, enum linux_seekmode sm)
+LONG __init
+ArcSeek(ULONG FileID, struct linux_bigint *Position, enum linux_seekmode SeekMode)
{
- return romvec->seek(fd, off, sm);
+ return ARC_CALL3(seek, FileID, Position, SeekMode);
}
-long __init prom_mount(char *name, enum linux_mountops op)
+LONG __init
+ArcMount(char *name, enum linux_mountops op)
{
- return romvec->mount(name, op);
+ return ARC_CALL2(mount, name, op);
}
-long __init prom_getfinfo(unsigned long fd, struct linux_finfo *buf)
+LONG __init
+ArcGetFileInformation(ULONG FileID, struct linux_finfo *Information)
{
- return romvec->get_finfo(fd, buf);
+ return ARC_CALL2(get_finfo, FileID, Information);
}
-long __init prom_setfinfo(unsigned long fd, unsigned long flags, unsigned long msk)
+LONG __init ArcSetFileInformation(ULONG FileID, ULONG AttributeFlags,
+ ULONG AttributeMask)
{
- return romvec->set_finfo(fd, flags, msk);
+ return ARC_CALL3(set_finfo, FileID, AttributeFlags, AttributeMask);
}
diff -Nru a/arch/mips/arc/identify.c b/arch/mips/arc/identify.c
--- a/arch/mips/arc/identify.c Wed Jul 2 13:59:55 2003
+++ b/arch/mips/arc/identify.c Wed Jul 2 13:59:55 2003
@@ -1,65 +1,117 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
* identify.c: identify machine by looking up system identifier
*
* Copyright (C) 1998 Thomas Bogendoerfer
- *
+ *
* This code is based on arch/mips/sgi/kernel/system.c, which is
- *
+ *
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
*/
+#include
#include
#include
#include
#include
-#include
#include
#include
struct smatch {
- char *name;
+ char *arcname;
+ char *liname;
int group;
int type;
int flags;
};
static struct smatch mach_table[] = {
- {"SGI-IP22", MACH_GROUP_SGI, MACH_SGI_INDY, PROM_FLAG_ARCS},
- {"Microsoft-Jazz", MACH_GROUP_JAZZ, MACH_MIPS_MAGNUM_4000, 0},
- {"PICA-61", MACH_GROUP_JAZZ, MACH_ACER_PICA_61, 0},
- {"RM200PCI", MACH_GROUP_SNI_RM, MACH_SNI_RM200_PCI, 0}
+ { "SGI-IP22",
+ "SGI Indy",
+ MACH_GROUP_SGI,
+ MACH_SGI_IP22,
+ PROM_FLAG_ARCS
+ }, { "SGI-IP27",
+ "SGI Origin",
+ MACH_GROUP_SGI,
+ MACH_SGI_IP27,
+ PROM_FLAG_ARCS
+ }, { "SGI-IP28",
+ "SGI IP28",
+ MACH_GROUP_SGI,
+ MACH_SGI_IP28,
+ PROM_FLAG_ARCS
+ }, { "SGI-IP32",
+ "SGI IP32",
+ MACH_GROUP_SGI,
+ MACH_SGI_IP32,
+ PROM_FLAG_ARCS
+ }, { "Microsoft-Jazz",
+ "Jazz MIPS_Magnum_4000",
+ MACH_GROUP_JAZZ,
+ MACH_MIPS_MAGNUM_4000,
+ 0
+ }, { "PICA-61",
+ "Jazz Acer_PICA_61",
+ MACH_GROUP_JAZZ,
+ MACH_ACER_PICA_61,
+ 0
+ }, { "RM200PCI",
+ "SNI RM200_PCI",
+ MACH_GROUP_SNI_RM,
+ MACH_SNI_RM200_PCI,
+ 0
+ }
};
int prom_flags;
-static struct smatch *__init string_to_mach(char *s)
+static struct smatch * __init string_to_mach(const char *s)
{
int i;
for (i = 0; i < (sizeof(mach_table) / sizeof (mach_table[0])); i++) {
- if (!strcmp(s, mach_table[i].name))
+ if (!strcmp(s, mach_table[i].arcname))
return &mach_table[i];
}
- prom_printf("\nYeee, could not determine architecture type <%s>\n",
- s);
- prom_printf("press a key to reboot\n");
- prom_getchar();
- romvec->imode();
- return NULL;
+
+ panic("Yeee, could not determine architecture type <%s>", s);
+}
+
+char *system_type;
+
+const char *get_system_type(void)
+{
+ return system_type;
}
void __init prom_identify_arch(void)
{
pcomponent *p;
struct smatch *mach;
+ const char *iname;
/*
- * The root component tells us what machine architecture we
- * have here.
+ * The root component tells us what machine architecture we have here.
*/
- p = prom_getchild(PROM_NULL_COMPONENT);
- printk("ARCH: %s\n", p->iname);
- mach = string_to_mach(p->iname);
+ p = ArcGetChild(PROM_NULL_COMPONENT);
+ if (p == NULL) {
+#ifdef CONFIG_SGI_IP27
+ /* IP27 PROM misbehaves, seems to not implement ARC
+ GetChild(). So we just assume it's an IP27. */
+ iname = "SGI-IP27";
+#else
+ iname = "Unknown";
+#endif
+ } else
+ iname = (char *) (long) p->iname;
+
+ printk("ARCH: %s\n", iname);
+ mach = string_to_mach(iname);
+ system_type = mach->liname;
mips_machgroup = mach->group;
mips_machtype = mach->type;
diff -Nru a/arch/mips/arc/init.c b/arch/mips/arc/init.c
--- a/arch/mips/arc/init.c Wed Jul 2 14:00:02 2003
+++ b/arch/mips/arc/init.c Wed Jul 2 14:00:02 2003
@@ -1,5 +1,5 @@
/*
- * This file is subject to the terms and conditions of the GNU General Public+
+ * This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
@@ -16,38 +16,17 @@
/* Master romvec interface. */
struct linux_romvec *romvec;
-struct linux_promblock *sgi_pblock;
int prom_argc;
-char **prom_argv, **prom_envp;
-unsigned short prom_vers, prom_rev;
-
-extern void prom_testtree(void);
-
-extern void arc_setup_console(void);
+LONG *_prom_argv, *_prom_envp;
void __init prom_init(int argc, char **argv, char **envp, int *prom_vec)
{
- struct linux_promblock *pb;
-
+ PSYSTEM_PARAMETER_BLOCK pb = PROMBLOCK;
romvec = ROMVECTOR;
- pb = sgi_pblock = PROMBLOCK;
prom_argc = argc;
- prom_argv = argv;
- prom_envp = envp;
+ _prom_argv = (LONG *) argv;
+ _prom_envp = (LONG *) envp;
-#if 0
- /* arc_printf should not use prom_printf as soon as we free
- * the prom buffers - This horribly breaks on Indys with framebuffer
- * as it simply stops after initialising swap - On the Indigo2 serial
- * console you will get A LOT illegal instructions - Only enable
- * this for early init crashes - This also brings up artefacts of
- * printing everything twice on serial console and on GFX Console
- * this has the effect of having the prom printing everything
- * in the small rectangle and the kernel printing around.
- */
-
- arc_setup_console();
-#endif
if (pb->magic != 0x53435241) {
prom_printf("Aieee, bad prom vector magic %08lx\n", pb->magic);
while(1)
@@ -55,19 +34,14 @@
}
prom_init_cmdline();
-
- prom_vers = pb->ver;
- prom_rev = pb->rev;
prom_identify_arch();
- printk("PROMLIB: ARC firmware Version %d Revision %d\n",
- prom_vers, prom_rev);
+ printk(KERN_INFO "PROMLIB: ARC firmware Version %d Revision %d\n",
+ pb->ver, pb->rev);
prom_meminit();
#ifdef DEBUG_PROM_INIT
- {
- prom_printf("Press a key to reboot\n");
- (void) prom_getchar();
- romvec->imode();
- }
+ prom_printf("Press a key to reboot\n");
+ prom_getchar();
+ ArcEnterInteractiveMode();
#endif
}
diff -Nru a/arch/mips/arc/memory.c b/arch/mips/arc/memory.c
--- a/arch/mips/arc/memory.c Wed Jul 2 14:00:12 2003
+++ b/arch/mips/arc/memory.c Wed Jul 2 14:00:12 2003
@@ -2,7 +2,14 @@
* memory.c: PROM library functions for acquiring/using memory descriptors
* given to us from the ARCS firmware.
*
- * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ * Copyright (C) 1996 by David S. Miller
+ * Copyright (C) 1999, 2000, 2001 by Ralf Baechle
+ * Copyright (C) 1999, 2000 by Silicon Graphics, Inc.
+ *
+ * PROM library functions for acquiring/using memory descriptors given to us
+ * from the ARCS firmware. This is only used when CONFIG_ARC_MEMORY is set
+ * because on some machines like SGI IP27 the ARC memory configuration data
+ * completly bogus and alternate easier to use mechanisms are available.
*/
#include
#include
@@ -19,10 +26,9 @@
#undef DEBUG
-struct linux_mdesc * __init
-ArcGetMemoryDescriptor(struct linux_mdesc *Current)
+struct linux_mdesc * __init ArcGetMemoryDescriptor(struct linux_mdesc *Current)
{
- return romvec->get_mdesc(Current);
+ return (struct linux_mdesc *) ARC_CALL1(get_mdesc, Current);
}
#ifdef DEBUG /* convenient for debugging */
@@ -47,7 +53,8 @@
"FirmwarePermanent",
"FreeContiguous"
};
-#define mtypes(a) (prom_flags & PROM_FLAG_ARCS) ? arcs_mtypes[a.arcs] : arc_mtypes[a.arc]
+#define mtypes(a) (prom_flags & PROM_FLAG_ARCS) ? arcs_mtypes[a.arcs] \
+ : arc_mtypes[a.arc]
#endif
static inline int memtype_classify_arcs (union linux_memtypes type)
@@ -92,7 +99,7 @@
static int __init prom_memtype_classify (union linux_memtypes type)
{
- if (prom_flags & PROM_FLAG_ARCS) /* SGI is ``different'' ... */
+ if (prom_flags & PROM_FLAG_ARCS) /* SGI is ``different'' ... */
return memtype_classify_arcs(type);
return memtype_classify_arc(type);
@@ -128,8 +135,7 @@
}
}
-void __init
-prom_free_prom_memory (void)
+void __init prom_free_prom_memory (void)
{
unsigned long freed = 0;
unsigned long addr;
@@ -149,5 +155,5 @@
freed += PAGE_SIZE;
}
}
- printk("Freeing prom memory: %ldkb freed\n", freed >> 10);
+ printk(KERN_INFO "Freeing prom memory: %ldkb freed\n", freed >> 10);
}
diff -Nru a/arch/mips/arc/misc.c b/arch/mips/arc/misc.c
--- a/arch/mips/arc/misc.c Wed Jul 2 13:59:54 2003
+++ b/arch/mips/arc/misc.c Wed Jul 2 13:59:54 2003
@@ -1,13 +1,21 @@
/*
- * misc.c: Miscellaneous ARCS PROM routines.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Miscellaneous ARCS PROM routines.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ * Copyright (C) 1999 Ralf Baechle (ralf@gnu.org)
+ * Copyright (C) 1999 Silicon Graphics, Inc.
*/
#include
#include
#include
#include
+
+#include
#include
#include
#include
@@ -15,68 +23,81 @@
extern void *sgiwd93_host;
extern void reset_wd33c93(void *instance);
-void prom_halt(void)
+VOID
+ArcHalt(VOID)
{
bc_disable();
- cli();
+ local_irq_disable();
#ifdef CONFIG_SCSI_SGIWD93
reset_wd33c93(sgiwd93_host);
#endif
- romvec->halt();
+ ARC_CALL0(halt);
+never: goto never;
}
-void prom_powerdown(void)
+VOID
+ArcPowerDown(VOID)
{
bc_disable();
- cli();
+ local_irq_disable();
#ifdef CONFIG_SCSI_SGIWD93
reset_wd33c93(sgiwd93_host);
#endif
- romvec->pdown();
+ ARC_CALL0(pdown);
+never: goto never;
}
/* XXX is this a soft reset basically? XXX */
-void prom_restart(void)
+VOID
+ArcRestart(VOID)
{
bc_disable();
- cli();
+ local_irq_disable();
#ifdef CONFIG_SCSI_SGIWD93
reset_wd33c93(sgiwd93_host);
#endif
- romvec->restart();
+ ARC_CALL0(restart);
+never: goto never;
}
-void prom_reboot(void)
+VOID
+ArcReboot(VOID)
{
bc_disable();
- cli();
+ local_irq_disable();
#ifdef CONFIG_SCSI_SGIWD93
reset_wd33c93(sgiwd93_host);
#endif
- romvec->reboot();
+ ARC_CALL0(reboot);
+never: goto never;
}
-void ArcEnterInteractiveMode(void)
+VOID
+ArcEnterInteractiveMode(VOID)
{
bc_disable();
- cli();
+ local_irq_disable();
#ifdef CONFIG_SCSI_SGIWD93
reset_wd33c93(sgiwd93_host);
#endif
- romvec->imode();
+ ARC_CALL0(imode);
+never: goto never;
}
-long prom_cfgsave(void)
+LONG
+ArcSaveConfiguration(VOID)
{
- return romvec->cfg_save();
+ return ARC_CALL0(cfg_save);
}
-struct linux_sysid *prom_getsysid(void)
+struct linux_sysid *
+ArcGetSystemId(VOID)
{
- return romvec->get_sysid();
+ return (struct linux_sysid *) ARC_CALL0(get_sysid);
}
-void __init prom_cacheflush(void)
+VOID __init
+ArcFlushAllCaches(VOID)
{
- romvec->cache_flush();
+ ARC_CALL0(cache_flush);
}
diff -Nru a/arch/mips/arc/promlib.c b/arch/mips/arc/promlib.c
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/arch/mips/arc/promlib.c Wed Jul 2 14:00:50 2003
@@ -0,0 +1,43 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1996 David S. Miller (dm@sgi.com)
+ * Compability with board caches, Ulf Carlsson
+ */
+#include
+#include
+#include
+
+/*
+ * IP22 boardcache is not compatible with board caches. Thus we disable it
+ * during romvec action. Since r4xx0.c is always compiled and linked with your
+ * kernel, this shouldn't cause any harm regardless what MIPS processor you
+ * have.
+ *
+ * The ARC write and read functions seem to interfere with the serial lines
+ * in some way. You should be careful with them.
+ */
+
+void prom_putchar(char c)
+{
+ ULONG cnt;
+ CHAR it = c;
+
+ bc_disable();
+ ArcWrite(1, &it, 1, &cnt);
+ bc_enable();
+}
+
+char prom_getchar(void)
+{
+ ULONG cnt;
+ CHAR c;
+
+ bc_disable();
+ ArcRead(0, &c, 1, &cnt);
+ bc_enable();
+
+ return c;
+}
diff -Nru a/arch/mips/arc/salone.c b/arch/mips/arc/salone.c
--- a/arch/mips/arc/salone.c Wed Jul 2 14:00:44 2003
+++ b/arch/mips/arc/salone.c Wed Jul 2 14:00:44 2003
@@ -1,25 +1,24 @@
/*
- * salone.c: Routines to load into memory and execute stand-along
- * program images using ARCS PROM firmware.
+ * Routines to load into memory and execute stand-along program images using
+ * ARCS PROM firmware.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
- *
- * $Id: salone.c,v 1.1 1998/10/18 13:32:09 tsbogend Exp $
*/
#include
#include
-long __init prom_load(char *name, unsigned long end, unsigned long *pc, unsigned long *eaddr)
+LONG __init ArcLoad(CHAR *Path, ULONG TopAddr, ULONG *ExecAddr, ULONG *LowAddr)
{
- return romvec->load(name, end, pc, eaddr);
+ return ARC_CALL4(load, Path, TopAddr, ExecAddr, LowAddr);
}
-long __init prom_invoke(unsigned long pc, unsigned long sp, long argc, char **argv, char **envp)
+LONG __init ArcInvoke(ULONG ExecAddr, ULONG StackAddr, ULONG Argc, CHAR *Argv[],
+ CHAR *Envp[])
{
- return romvec->invoke(pc, sp, argc, argv, envp);
+ return ARC_CALL5(invoke, ExecAddr, StackAddr, Argc, Argv, Envp);
}
-long __init prom_exec(char *name, long argc, char **argv, char **envp)
+LONG __init ArcExecute(CHAR *Path, LONG Argc, CHAR *Argv[], CHAR *Envp[])
{
- return romvec->exec(name, argc, argv, envp);
+ return ARC_CALL4(exec, Path, Argc, Argv, Envp);
}
diff -Nru a/arch/mips/arc/time.c b/arch/mips/arc/time.c
--- a/arch/mips/arc/time.c Wed Jul 2 14:00:02 2003
+++ b/arch/mips/arc/time.c Wed Jul 2 14:00:02 2003
@@ -1,19 +1,25 @@
/*
- * time.c: Extracting time information from ARCS prom.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ * Extracting time information from ARCS prom.
*
- * $Id: time.c,v 1.1 1998/10/18 13:32:10 tsbogend Exp $
+ * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
*/
#include
+
+#include
#include
-struct linux_tinfo * __init prom_gettinfo(void)
+struct linux_tinfo * __init
+ArcGetTime(VOID)
{
- return romvec->get_tinfo();
+ return (struct linux_tinfo *) ARC_CALL0(get_tinfo);
}
-unsigned long __init prom_getrtime(void)
+ULONG __init
+ArcGetRelativeTime(VOID)
{
- return romvec->get_rtime();
+ return ARC_CALL0(get_rtime);
}
diff -Nru a/arch/mips/arc/tree.c b/arch/mips/arc/tree.c
--- a/arch/mips/arc/tree.c Wed Jul 2 14:00:07 2003
+++ b/arch/mips/arc/tree.c Wed Jul 2 14:00:07 2003
@@ -1,72 +1,88 @@
/*
- * tree.c: PROM component device tree code.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ * PROM component device tree code.
*
- * $Id: tree.c,v 1.1 1998/10/18 13:32:10 tsbogend Exp $
+ * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ * Copyright (C) 1999 Ralf Baechle (ralf@gnu.org)
+ * Copyright (C) 1999 Silicon Graphics, Inc.
*/
#include
+#include
#include
-#define DEBUG_PROM_TREE
+#undef DEBUG_PROM_TREE
-pcomponent * __init prom_getsibling(pcomponent *this)
+pcomponent * __init
+ArcGetPeer(pcomponent *Current)
{
- if(this == PROM_NULL_COMPONENT)
+ if (Current == PROM_NULL_COMPONENT)
return PROM_NULL_COMPONENT;
- return romvec->next_component(this);
+
+ return (pcomponent *) ARC_CALL1(next_component, Current);
}
-pcomponent * __init prom_getchild(pcomponent *this)
+pcomponent * __init
+ArcGetChild(pcomponent *Current)
{
- return romvec->child_component(this);
+ return (pcomponent *) ARC_CALL1(child_component, Current);
}
-pcomponent * __init prom_getparent(pcomponent *child)
+pcomponent * __init
+ArcGetParent(pcomponent *Current)
{
- if(child == PROM_NULL_COMPONENT)
+ if (Current == PROM_NULL_COMPONENT)
return PROM_NULL_COMPONENT;
- return romvec->parent_component(child);
+
+ return (pcomponent *) ARC_CALL1(parent_component, Current);
}
-long __init prom_getcdata(void *buffer, pcomponent *this)
+LONG __init
+ArcGetConfigurationData(VOID *Buffer, pcomponent *Current)
{
- return romvec->component_data(buffer, this);
+ return ARC_CALL2(component_data, Buffer, Current);
}
-pcomponent * __init prom_childadd(pcomponent *this, pcomponent *tmp, void *data)
+pcomponent * __init
+ArcAddChild(pcomponent *Current, pcomponent *Template, VOID *ConfigurationData)
{
- return romvec->child_add(this, tmp, data);
+ return (pcomponent *)
+ ARC_CALL3(child_add, Current, Template, ConfigurationData);
}
-long __init prom_delcomponent(pcomponent *this)
+LONG __init
+ArcDeleteComponent(pcomponent *ComponentToDelete)
{
- return romvec->comp_del(this);
+ return ARC_CALL1(comp_del, ComponentToDelete);
}
-pcomponent * __init prom_componentbypath(char *path)
+pcomponent * __init
+ArcGetComponent(CHAR *Path)
{
- return romvec->component_by_path(path);
+ return (pcomponent *)ARC_CALL1(component_by_path, Path);
}
#ifdef DEBUG_PROM_TREE
+
static char *classes[] = {
"system", "processor", "cache", "adapter", "controller", "peripheral",
"memory"
};
static char *types[] = {
- "arc", "cpu", "fpu", "picache", "pdcache", "sicache", "sdcache", "sccache",
- "memdev", "eisa adapter", "tc adapter", "scsi adapter", "dti adapter",
- "multi-func adapter", "disk controller", "tp controller",
- "cdrom controller", "worm controller", "serial controller",
- "net controller", "display controller", "parallel controller",
- "pointer controller", "keyboard controller", "audio controller",
- "misc controller", "disk peripheral", "floppy peripheral",
- "tp peripheral", "modem peripheral", "monitor peripheral",
- "printer peripheral", "pointer peripheral", "keyboard peripheral",
- "terminal peripheral", "line peripheral", "net peripheral",
- "misc peripheral", "anonymous"
+ "arc", "cpu", "fpu", "picache", "pdcache", "sicache", "sdcache",
+ "sccache", "memdev", "eisa adapter", "tc adapter", "scsi adapter",
+ "dti adapter", "multi-func adapter", "disk controller",
+ "tp controller", "cdrom controller", "worm controller",
+ "serial controller", "net controller", "display controller",
+ "parallel controller", "pointer controller", "keyboard controller",
+ "audio controller", "misc controller", "disk peripheral",
+ "floppy peripheral", "tp peripheral", "modem peripheral",
+ "monitor peripheral", "printer peripheral", "pointer peripheral",
+ "keyboard peripheral", "terminal peripheral", "line peripheral",
+ "net peripheral", "misc peripheral", "anonymous"
};
static char *iflags[] = {
@@ -74,7 +90,8 @@
"input", "output"
};
-static void __init dump_component(pcomponent *p)
+static void __init
+dump_component(pcomponent *p)
{
prom_printf("[%p]:class<%s>type<%s>flags<%s>ver<%d>rev<%d>",
p, classes[p->class], types[p->type],
@@ -83,27 +100,28 @@
p->key, p->amask, (int)p->cdsize, (int)p->ilen, p->iname);
}
-static void __init traverse(pcomponent *p, int op)
+static void __init
+traverse(pcomponent *p, int op)
{
dump_component(p);
- if(prom_getchild(p))
- traverse(prom_getchild(p), 1);
- if(prom_getsibling(p) && op)
- traverse(prom_getsibling(p), 1);
+ if(ArcGetChild(p))
+ traverse(ArcGetChild(p), 1);
+ if(ArcGetPeer(p) && op)
+ traverse(ArcGetPeer(p), 1);
}
-void __init prom_testtree(void)
+void __init
+prom_testtree(void)
{
pcomponent *p;
- p = prom_getchild(PROM_NULL_COMPONENT);
+ p = ArcGetChild(PROM_NULL_COMPONENT);
dump_component(p);
- p = prom_getchild(p);
+ p = ArcGetChild(p);
while(p) {
dump_component(p);
- p = prom_getsibling(p);
+ p = ArcGetPeer(p);
}
- prom_printf("press a key\n");
- prom_getchar();
}
-#endif
+
+#endif /* DEBUG_PROM_TREE */
diff -Nru a/arch/mips/au1000/common/Makefile b/arch/mips/au1000/common/Makefile
--- a/arch/mips/au1000/common/Makefile Wed Jul 2 14:00:42 2003
+++ b/arch/mips/au1000/common/Makefile Wed Jul 2 14:00:42 2003
@@ -5,14 +5,14 @@
#
# Makefile for the Alchemy Au1000 CPU, generic files.
#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
-obj-y := prom.o dbg_io.o int-handler.o irq.o puts.o time.o reset.o
+obj-y += prom.o int-handler.o dma.o irq.o puts.o \
+ time.o reset.o clocks.o power.o
-obj-$(CONFIG_AU1000_UART) += serial.o
-obj-$(CONFIG_REMOTE_DEBUG) += dbg_io.o
-obj-$(CONFIG_BLK_DEV_INITRD) += ramdisk.o
-
-EXTRA_AFLAGS := $(CFLAGS)
-
-ramdisk.o:
- mkramobj ramdisk ramdisk.o
+obj-$(CONFIG_AU1X00_USB_DEVICE) += usbdev.o
+obj-$(CONFIG_KGDB) += dbg_io.o
+obj-$(CONFIG_RTC) += rtc.o
diff -Nru a/arch/mips/au1000/common/clocks.c b/arch/mips/au1000/common/clocks.c
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/arch/mips/au1000/common/clocks.c Wed Jul 2 14:00:47 2003
@@ -0,0 +1,97 @@
+/*
+ * BRIEF MODULE DESCRIPTION
+ * Simple Au1000 clocks routines.
+ *
+ * Copyright 2001 MontaVista Software Inc.
+ * Author: MontaVista Software, Inc.
+ * ppopov@mvista.com or source@mvista.com
+ *
+ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * 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.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include
+#include
+
+static unsigned int au1x00_clock; // Hz
+static unsigned int lcd_clock; // KHz
+static unsigned long uart_baud_base;
+
+/*
+ * Set the au1000_clock
+ */
+void set_au1x00_speed(unsigned int new_freq)
+{
+ au1x00_clock = new_freq;
+}
+
+unsigned int get_au1x00_speed(void)
+{
+ return au1x00_clock;
+}
+
+
+
+/*
+ * The UART baud base is not known at compile time ... if
+ * we want to be able to use the same code on different
+ * speed CPUs.
+ */
+unsigned long get_au1x00_uart_baud_base(void)
+{
+ return uart_baud_base;
+}
+
+void set_au1x00_uart_baud_base(unsigned long new_baud_base)
+{
+ uart_baud_base = new_baud_base;
+}
+
+/*
+ * Calculate the Au1x00's LCD clock based on the current
+ * cpu clock and the system bus clock, and try to keep it
+ * below 40 MHz (the Pb1000 board can lock-up if the LCD
+ * clock is over 40 MHz).
+ */
+void set_au1x00_lcd_clock(void)
+{
+ unsigned int static_cfg0;
+ unsigned int sys_busclk =
+ (get_au1x00_speed()/1000) /
+ ((int)(au_readl(SYS_POWERCTRL)&0x03) + 2);
+
+ static_cfg0 = au_readl(MEM_STCFG0);
+
+ if (static_cfg0 & (1<<11))
+ lcd_clock = sys_busclk / 5; /* note: BCLK switching fails with D5 */
+ else
+ lcd_clock = sys_busclk / 4;
+
+ if (lcd_clock > 50000) /* Epson MAX */
+ printk("%s: warning: LCD clock too high (%d KHz)\n",
+ __FUNCTION__, lcd_clock);
+}
+
+unsigned int get_au1x00_lcd_clock(void)
+{
+ return lcd_clock;
+}
+
+EXPORT_SYMBOL(get_au1x00_lcd_clock);
diff -Nru a/arch/mips/au1000/common/dbg_io.c b/arch/mips/au1000/common/dbg_io.c
--- a/arch/mips/au1000/common/dbg_io.c Wed Jul 2 14:00:41 2003
+++ b/arch/mips/au1000/common/dbg_io.c Wed Jul 2 14:00:41 2003
@@ -3,13 +3,13 @@
#include
#include
-#ifdef CONFIG_REMOTE_DEBUG
+#ifdef CONFIG_KGDB
/*
* FIXME the user should be able to select the
* uart to be used for debugging.
*/
-#define DEBUG_BASE UART2_ADDR
+#define DEBUG_BASE UART_DEBUG_BASE
/**/
/* we need uint32 uint8 */
@@ -53,8 +53,11 @@
#define UART_MOD_CNTRL 0x100 /* Module Control */
/* memory-mapped read/write of the port */
-#define UART16550_READ(y) (inl(DEBUG_BASE + y) & 0xff)
-#define UART16550_WRITE(y,z) (outl(z&0xff, DEBUG_BASE + y))
+#define UART16550_READ(y) (au_readl(DEBUG_BASE + y) & 0xff)
+#define UART16550_WRITE(y,z) (au_writel(z&0xff, DEBUG_BASE + y))
+
+extern unsigned long get_au1x00_uart_baud_base(void);
+extern unsigned long cal_r4koff(void);
void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop)
{
@@ -68,16 +71,16 @@
UART16550_WRITE(UART_IER, 0);
/* set up baud rate */
- {
+ {
uint32 divisor;
/* set divisor */
- divisor = get_au1000_uart_baud() / baud;
+ divisor = get_au1x00_uart_baud_base() / baud;
UART16550_WRITE(UART_CLK, divisor & 0xffff);
}
/* set data format */
- UART16550_WRITE(UART_LCR, data | parity | stop);
+ UART16550_WRITE(UART_LCR, (data | parity | stop));
}
static int remoteDebugInitialized = 0;
@@ -99,7 +102,8 @@
int putDebugChar(uint8 byte)
{
- int i;
+// int i;
+
if (!remoteDebugInitialized) {
remoteDebugInitialized = 1;
debugInit(UART16550_BAUD_115200,
diff -Nru a/arch/mips/au1000/common/dma.c b/arch/mips/au1000/common/dma.c
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/arch/mips/au1000/common/dma.c Wed Jul 2 14:00:49 2003
@@ -0,0 +1,217 @@
+/*
+ *
+ * BRIEF MODULE DESCRIPTION
+ * A DMA channel allocator for Au1000. API is modeled loosely off of
+ * linux/kernel/dma.c.
+ *
+ * Copyright 2000 MontaVista Software Inc.
+ * Author: MontaVista Software, Inc.
+ * stevel@mvista.com or source@mvista.com
+ *
+ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * 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.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+
+/*
+ * A note on resource allocation:
+ *
+ * All drivers needing DMA channels, should allocate and release them
+ * through the public routines `request_dma()' and `free_dma()'.
+ *
+ * In order to avoid problems, all processes should allocate resources in
+ * the same sequence and release them in the reverse order.
+ *
+ * So, when allocating DMAs and IRQs, first allocate the DMA, then the IRQ.
+ * When releasing them, first release the IRQ, then release the DMA. The
+ * main reason for this order is that, if you are requesting the DMA buffer
+ * done interrupt, you won't know the irq number until the DMA channel is
+ * returned from request_dma.
+ */
+
+
+spinlock_t au1000_dma_spin_lock = SPIN_LOCK_UNLOCKED;
+
+struct dma_chan au1000_dma_table[NUM_AU1000_DMA_CHANNELS] = {
+ {dev_id:-1,},
+ {dev_id:-1,},
+ {dev_id:-1,},
+ {dev_id:-1,},
+ {dev_id:-1,},
+ {dev_id:-1,},
+ {dev_id:-1,},
+ {dev_id:-1,}
+};
+
+// Device FIFO addresses and default DMA modes
+static const struct {
+ unsigned int fifo_addr;
+ unsigned int dma_mode;
+} dma_dev_table[DMA_NUM_DEV] = {
+ {UART0_ADDR + UART_TX, 0},
+ {UART0_ADDR + UART_RX, 0},
+ {0, 0},
+ {0, 0},
+ {AC97C_DATA, DMA_DW16 }, // coherent
+ {AC97C_DATA, DMA_DR | DMA_DW16 }, // coherent
+ {UART3_ADDR + UART_TX, DMA_DW8 | DMA_NC},
+ {UART3_ADDR + UART_RX, DMA_DR | DMA_DW8 | DMA_NC},
+ {USBD_EP0RD, DMA_DR | DMA_DW8 | DMA_NC},
+ {USBD_EP0WR, DMA_DW8 | DMA_NC},
+ {USBD_EP2WR, DMA_DW8 | DMA_NC},
+ {USBD_EP3WR, DMA_DW8 | DMA_NC},
+ {USBD_EP4RD, DMA_DR | DMA_DW8 | DMA_NC},
+ {USBD_EP5RD, DMA_DR | DMA_DW8 | DMA_NC},
+ {I2S_DATA, DMA_DW32 | DMA_NC},
+ {I2S_DATA, DMA_DR | DMA_DW32 | DMA_NC}
+};
+
+
+int au1000_dma_read_proc(char *buf, char **start, off_t fpos,
+ int length, int *eof, void *data)
+{
+ int i, len = 0;
+ struct dma_chan *chan;
+
+ for (i = 0; i < NUM_AU1000_DMA_CHANNELS; i++) {
+ if ((chan = get_dma_chan(i)) != NULL) {
+ len += sprintf(buf + len, "%2d: %s\n",
+ i, chan->dev_str);
+ }
+ }
+
+ if (fpos >= len) {
+ *start = buf;
+ *eof = 1;
+ return 0;
+ }
+ *start = buf + fpos;
+ if ((len -= fpos) > length)
+ return length;
+ *eof = 1;
+ return len;
+}
+
+
+void dump_au1000_dma_channel(unsigned int dmanr)
+{
+ struct dma_chan *chan;
+
+ if (dmanr > NUM_AU1000_DMA_CHANNELS)
+ return;
+ chan = &au1000_dma_table[dmanr];
+
+ printk(KERN_INFO "Au1000 DMA%d Register Dump:\n", dmanr);
+ printk(KERN_INFO " mode = 0x%08x\n",
+ au_readl(chan->io + DMA_MODE_SET));
+ printk(KERN_INFO " addr = 0x%08x\n",
+ au_readl(chan->io + DMA_PERIPHERAL_ADDR));
+ printk(KERN_INFO " start0 = 0x%08x\n",
+ au_readl(chan->io + DMA_BUFFER0_START));
+ printk(KERN_INFO " start1 = 0x%08x\n",
+ au_readl(chan->io + DMA_BUFFER1_START));
+ printk(KERN_INFO " count0 = 0x%08x\n",
+ au_readl(chan->io + DMA_BUFFER0_COUNT));
+ printk(KERN_INFO " count1 = 0x%08x\n",
+ au_readl(chan->io + DMA_BUFFER1_COUNT));
+}
+
+
+/*
+ * Finds a free channel, and binds the requested device to it.
+ * Returns the allocated channel number, or negative on error.
+ * Requests the DMA done IRQ if irqhandler != NULL.
+ */
+int request_au1000_dma(int dev_id, const char *dev_str,
+ void (*irqhandler)(int, void *, struct pt_regs *),
+ unsigned long irqflags,
+ void *irq_dev_id)
+{
+ struct dma_chan *chan;
+ int i, ret;
+
+ if (dev_id < 0 || dev_id >= DMA_NUM_DEV)
+ return -EINVAL;
+
+ for (i = 0; i < NUM_AU1000_DMA_CHANNELS; i++) {
+ if (au1000_dma_table[i].dev_id < 0)
+ break;
+ }
+ if (i == NUM_AU1000_DMA_CHANNELS)
+ return -ENODEV;
+
+ chan = &au1000_dma_table[i];
+
+ if (irqhandler) {
+ chan->irq = AU1000_DMA_INT_BASE + i;
+ chan->irq_dev = irq_dev_id;
+ if ((ret = request_irq(chan->irq, irqhandler, irqflags,
+ dev_str, chan->irq_dev))) {
+ chan->irq = 0;
+ chan->irq_dev = NULL;
+ return ret;
+ }
+ } else {
+ chan->irq = 0;
+ chan->irq_dev = NULL;
+ }
+
+ // fill it in
+ chan->io = DMA_CHANNEL_BASE + i * DMA_CHANNEL_LEN;
+ chan->dev_id = dev_id;
+ chan->dev_str = dev_str;
+ chan->fifo_addr = dma_dev_table[dev_id].fifo_addr;
+ chan->mode = dma_dev_table[dev_id].dma_mode;
+
+ /* initialize the channel before returning */
+ init_dma(i);
+
+ return i;
+}
+
+
+void free_au1000_dma(unsigned int dmanr)
+{
+ struct dma_chan *chan = get_dma_chan(dmanr);
+ if (!chan) {
+ printk("Trying to free DMA%d\n", dmanr);
+ return;
+ }
+
+ disable_dma(dmanr);
+ if (chan->irq)
+ free_irq(chan->irq, chan->irq_dev);
+
+ chan->irq = 0;
+ chan->irq_dev = NULL;
+ chan->dev_id = -1;
+}
diff -Nru a/arch/mips/au1000/common/int-handler.S b/arch/mips/au1000/common/int-handler.S
--- a/arch/mips/au1000/common/int-handler.S Wed Jul 2 13:59:58 2003
+++ b/arch/mips/au1000/common/int-handler.S Wed Jul 2 13:59:58 2003
@@ -9,7 +9,6 @@
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
-#include
#include
#include
#include
@@ -40,32 +39,30 @@
1:
andi a0, t0, CAUSEF_IP2 # Interrupt Controller 0, Request 0
- beq a0, zero, 2f
- move a0,sp
+ beq a0, zero, 2f
+ move a0,sp
jal intc0_req0_irqdispatch
j ret_from_irq
2:
andi a0, t0, CAUSEF_IP3 # Interrupt Controller 0, Request 1
- beq a0, zero, 3f
- move a0,sp
+ beq a0, zero, 3f
+ move a0,sp
jal intc0_req1_irqdispatch
j ret_from_irq
3:
andi a0, t0, CAUSEF_IP4 # Interrupt Controller 1, Request 0
- beq a0, zero, 4f
- move a0,sp
+ beq a0, zero, 4f
+ move a0,sp
jal intc1_req0_irqdispatch
j ret_from_irq
4:
andi a0, t0, CAUSEF_IP5 # Interrupt Controller 1, Request 1
- beq a0, zero, 5f
- move a0, sp
+ beq a0, zero, 5f
+ move a0, sp
jal intc1_req1_irqdispatch
j ret_from_irq
-5:
+5:
move a0, sp
- jal mips_spurious_interrupt
-done:
- j ret_from_irq
+ j spurious_interrupt
END(au1000_IRQ)
diff -Nru a/arch/mips/au1000/common/irq.c b/arch/mips/au1000/common/irq.c
--- a/arch/mips/au1000/common/irq.c Wed Jul 2 13:59:59 2003
+++ b/arch/mips/au1000/common/irq.c Wed Jul 2 13:59:59 2003
@@ -28,6 +28,7 @@
*/
#include
#include
+#include
#include
#include
#include
@@ -47,7 +48,21 @@
#include
#include
-#define ALLINTS (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5)
+#if defined(CONFIG_MIPS_PB1000)
+#include
+#elif defined(CONFIG_MIPS_PB1500)
+#include
+#elif defined(CONFIG_MIPS_PB1100)
+#include
+#elif defined(CONFIG_MIPS_DB1000)
+#include
+#elif defined(CONFIG_MIPS_DB1100)
+#include
+#elif defined(CONFIG_MIPS_DB1500)
+#include
+#else
+#error unsupported Alchemy board
+#endif
#undef DEBUG_IRQ
#ifdef DEBUG_IRQ
@@ -63,16 +78,13 @@
#define EXT_INTC1_REQ1 5 /* IP 5 */
#define MIPS_TIMER_IP 7 /* IP 7 */
-#ifdef CONFIG_REMOTE_DEBUG
+#ifdef CONFIG_KGDB
extern void breakpoint(void);
#endif
extern asmlinkage void au1000_IRQ(void);
-
extern void set_debug_traps(void);
-extern irq_cpustat_t irq_stat [];
-extern irq_desc_t irq_desc[NR_IRQS];
-
+extern irq_cpustat_t irq_stat [NR_CPUS];
unsigned int local_bh_count[NR_CPUS];
unsigned int local_irq_count[NR_CPUS];
@@ -82,154 +94,113 @@
static inline void mask_and_ack_level_irq(unsigned int irq_nr);
static inline void mask_and_ack_rise_edge_irq(unsigned int irq_nr);
static inline void mask_and_ack_fall_edge_irq(unsigned int irq_nr);
-static inline void local_enable_irq(unsigned int irq_nr);
-static inline void local_disable_irq(unsigned int irq_nr);
+inline void local_enable_irq(unsigned int irq_nr);
+inline void local_disable_irq(unsigned int irq_nr);
-unsigned long spurious_interrupts;
-extern unsigned int do_IRQ(int irq, struct pt_regs *regs);
extern void __init init_generic_irq(void);
-static inline void sync(void)
-{
- __asm volatile ("sync");
-}
-
-
-/* Function for careful CP0 interrupt mask access */
-static inline void modify_cp0_intmask(unsigned clr_mask, unsigned set_mask)
-{
- unsigned long status = read_32bit_cp0_register(CP0_STATUS);
- status &= ~((clr_mask & 0xFF) << 8);
- status |= (set_mask & 0xFF) << 8;
- write_32bit_cp0_register(CP0_STATUS, status);
-}
-
-
-static inline void mask_cpu_irq_input(unsigned int irq_nr)
-{
- modify_cp0_intmask(irq_nr, 0);
-}
-
-
-static inline void unmask_cpu_irq_input(unsigned int irq_nr)
-{
- modify_cp0_intmask(0, irq_nr);
-}
-
-
-static void disable_cpu_irq_input(unsigned int irq_nr)
-{
- unsigned long flags;
-
- save_and_cli(flags);
- mask_cpu_irq_input(irq_nr);
- restore_flags(flags);
-}
-
-
-static void enable_cpu_irq_input(unsigned int irq_nr)
-{
- unsigned long flags;
-
- save_and_cli(flags);
- unmask_cpu_irq_input(irq_nr);
- restore_flags(flags);
-}
+#ifdef CONFIG_PM
+extern void counter0_irq(int irq, void *dev_id, struct pt_regs *regs);
+#endif
+static spinlock_t irq_lock = SPIN_LOCK_UNLOCKED;
static void setup_local_irq(unsigned int irq_nr, int type, int int_req)
{
+ if (irq_nr > AU1000_MAX_INTR) return;
/* Config2[n], Config1[n], Config0[n] */
if (irq_nr > AU1000_LAST_INTC0_INT) {
switch (type) {
case INTC_INT_RISE_EDGE: /* 0:0:1 */
- outl(1< AU1000_LAST_INTC0_INT) {
- outl(1< AU1000_LAST_INTC0_INT) {
- outl(1< AU1000_LAST_INTC0_INT) {
- outl(1< AU1000_LAST_INTC0_INT) {
- outl(1<>= 1;
}
}
@@ -417,55 +548,84 @@
void intc0_req1_irqdispatch(struct pt_regs *regs)
{
int irq = 0, i;
- unsigned long int_request;
+ static unsigned long intc0_req1 = 0;
- int_request = inl(INTC0_REQ1_INT);
+ intc0_req1 = au_readl(IC0_REQ1INT);
- if (!int_request) return;
+ if (!intc0_req1) return;
for (i=0; i<32; i++) {
- if ((int_request & 0x1)) {
- do_IRQ(irq, regs);
+ if ((intc0_req1 & (1<>= 1;
}
}
+/*
+ * Interrupt Controller 1:
+ * interrupts 32 - 63
+ */
void intc1_req0_irqdispatch(struct pt_regs *regs)
{
int irq = 0, i;
- unsigned long int_request;
+ static unsigned long intc1_req0 = 0;
- int_request = inl(INTC1_REQ0_INT);
+ intc1_req0 |= au_readl(IC1_REQ0INT);
- if (!int_request) return;
+ if (!intc1_req0) return;
+#if defined(CONFIG_MIPS_PB1000) && defined(DEBUG_IRQ)
+ au_writel(1, CPLD_AUX0); /* debug led 0 */
+#endif
for (i=0; i<32; i++) {
- if ((int_request & 0x1)) {
- do_IRQ(irq, regs);
+ if ((intc1_req0 & (1<>= 1;
}
+#if defined(CONFIG_MIPS_PB1000) && defined(DEBUG_IRQ)
+ au_writel(0, CPLD_AUX0);
+#endif
}
void intc1_req1_irqdispatch(struct pt_regs *regs)
{
int irq = 0, i;
- unsigned long int_request;
+ static unsigned long intc1_req1 = 0;
- int_request = inl(INTC1_REQ1_INT);
+ intc1_req1 |= au_readl(IC1_REQ1INT);
- if (!int_request) return;
+ if (!intc1_req1) return;
for (i=0; i<32; i++) {
- if ((int_request & 0x1)) {
- do_IRQ(irq, regs);
+ if ((intc1_req1 & (1<>= 1;
}
}
diff -Nru a/arch/mips/au1000/common/power.c b/arch/mips/au1000/common/power.c
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/arch/mips/au1000/common/power.c Wed Jul 2 14:00:49 2003
@@ -0,0 +1,332 @@
+/*
+ * BRIEF MODULE DESCRIPTION
+ * Au1000 Power Management routines.
+ *
+ * Copyright 2001 MontaVista Software Inc.
+ * Author: MontaVista Software, Inc.
+ * ppopov@mvista.com or source@mvista.com
+ *
+ * Some of the routines are right out of init/main.c, whose
+ * copyrights apply here.
+ *
+ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * 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.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+#define DEBUG 1
+#ifdef DEBUG
+# define DPRINTK(fmt, args...) printk("%s: " fmt, __FUNCTION__ , ## args)
+#else
+# define DPRINTK(fmt, args...)
+#endif
+
+extern void au1k_wait(void);
+static void calibrate_delay(void);
+
+extern void set_au1000_speed(unsigned int new_freq);
+extern unsigned int get_au1000_speed(void);
+extern unsigned long get_au1000_uart_baud_base(void);
+extern void set_au1000_uart_baud_base(unsigned long new_baud_base);
+extern unsigned long save_local_and_disable(int controller);
+extern void restore_local_and_enable(int controller, unsigned long mask);
+extern void local_enable_irq(unsigned int irq_nr);
+
+/* Quick acpi hack. This will have to change! */
+#define CTL_ACPI 9999
+#define ACPI_S1_SLP_TYP 19
+#define ACPI_SLEEP 21
+
+#ifdef CONFIG_PM
+
+static spinlock_t pm_lock = SPIN_LOCK_UNLOCKED;
+
+unsigned long suspend_mode;
+
+void wakeup_from_suspend(void)
+{
+ suspend_mode = 0;
+}
+
+int au_sleep(void)
+{
+ unsigned long wakeup, flags;
+ spin_lock_irqsave(&pm_lock,flags);
+
+ flush_cache_all();
+ /* pin 6 is gpio */
+ au_writel(au_readl(SYS_PINSTATERD) & ~(1 << 11), SYS_PINSTATERD);
+
+ /* gpio 6 can cause a wake up event */
+ wakeup = au_readl(SYS_WAKEMSK);
+ wakeup &= ~(1 << 8); /* turn off match20 wakeup */
+ wakeup |= 1 << 6; /* turn on gpio 6 wakeup */
+ au_writel(wakeup, SYS_WAKEMSK);
+
+ au_writel(1, SYS_WAKESRC); /* clear cause */
+ au_writel(1, SYS_SLPPWR); /* prepare to sleep */
+
+ __asm__("la $4, 1f\n\t"
+ "lui $5, 0xb190\n\t"
+ "ori $5, 0x18\n\t"
+ "sw $4, 0($5)\n\t"
+ "li $4, 1\n\t"
+ "lui $5, 0xb190\n\t"
+ "ori $5, 0x7c\n\t"
+ "sw $4, 0($5)\n\t" "sync\n\t" "1:\t\n\t" "nop\n\t");
+
+ /* after a wakeup, the cpu vectors back to 0x1fc00000 so
+ * it's up to the boot code to get us back here.
+ */
+ spin_unlock_irqrestore(&pm_lock, flags);
+ return 0;
+}
+
+static int pm_do_sleep(ctl_table * ctl, int write, struct file *file,
+ void *buffer, size_t * len)
+{
+ int retval = 0;
+
+ if (!write) {
+ *len = 0;
+ } else {
+ retval = pm_send_all(PM_SUSPEND, (void *) 2);
+ if (retval)
+ return retval;
+
+ au_sleep();
+ retval = pm_send_all(PM_RESUME, (void *) 0);
+ }
+ return retval;
+}
+
+static int pm_do_suspend(ctl_table * ctl, int write, struct file *file,
+ void *buffer, size_t * len)
+{
+ int retval = 0;
+
+ if (!write) {
+ *len = 0;
+ } else {
+ retval = pm_send_all(PM_SUSPEND, (void *) 2);
+ if (retval)
+ return retval;
+ suspend_mode = 1;
+ au1k_wait();
+ retval = pm_send_all(PM_RESUME, (void *) 0);
+ }
+ return retval;
+}
+
+
+static int pm_do_freq(ctl_table * ctl, int write, struct file *file,
+ void *buffer, size_t * len)
+{
+ int retval = 0, i;
+ unsigned long val, pll;
+#define TMPBUFLEN 64
+#define MAX_CPU_FREQ 396
+ char buf[8], *p;
+ unsigned long flags, intc0_mask, intc1_mask;
+ unsigned long old_baud_base, old_cpu_freq, baud_rate, old_clk,
+ old_refresh;
+ unsigned long new_baud_base, new_cpu_freq, new_clk, new_refresh;
+
+ spin_lock_irqsave(&pm_lock, flags);
+ if (!write) {
+ *len = 0;
+ } else {
+ /* Parse the new frequency */
+ if (*len > TMPBUFLEN - 1) {
+ spin_unlock_irqrestore(&pm_lock, flags);
+ return -EFAULT;
+ }
+ if (copy_from_user(buf, buffer, *len)) {
+ spin_unlock_irqrestore(&pm_lock, flags);
+ return -EFAULT;
+ }
+ buf[*len] = 0;
+ p = buf;
+ val = simple_strtoul(p, &p, 0);
+ if (val > MAX_CPU_FREQ) {
+ spin_unlock_irqrestore(&pm_lock, flags);
+ return -EFAULT;
+ }
+
+ pll = val / 12;
+ if ((pll > 33) || (pll < 7)) { /* 396 MHz max, 84 MHz min */
+ /* revisit this for higher speed cpus */
+ spin_unlock_irqrestore(&pm_lock, flags);
+ return -EFAULT;
+ }
+
+ old_baud_base = get_au1000_uart_baud_base();
+ old_cpu_freq = get_au1000_speed();
+
+ new_cpu_freq = pll * 12 * 1000000;
+ new_baud_base = (new_cpu_freq / 4) / 16;
+ set_au1000_speed(new_cpu_freq);
+ set_au1000_uart_baud_base(new_baud_base);
+
+ old_refresh = au_readl(MEM_SDREFCFG) & 0x1ffffff;
+ new_refresh =
+ ((old_refresh * new_cpu_freq) /
+ old_cpu_freq) | (au_readl(MEM_SDREFCFG) & ~0x1ffffff);
+
+ au_writel(pll, SYS_CPUPLL);
+ au_sync_delay(1);
+ au_writel(new_refresh, MEM_SDREFCFG);
+ au_sync_delay(1);
+
+ for (i = 0; i < 4; i++) {
+ if (au_readl
+ (UART_BASE + UART_MOD_CNTRL +
+ i * 0x00100000) == 3) {
+ old_clk =
+ au_readl(UART_BASE + UART_CLK +
+ i * 0x00100000);
+ // baud_rate = baud_base/clk
+ baud_rate = old_baud_base / old_clk;
+ /* we won't get an exact baud rate and the error
+ * could be significant enough that our new
+ * calculation will result in a clock that will
+ * give us a baud rate that's too far off from
+ * what we really want.
+ */
+ if (baud_rate > 100000)
+ baud_rate = 115200;
+ else if (baud_rate > 50000)
+ baud_rate = 57600;
+ else if (baud_rate > 30000)
+ baud_rate = 38400;
+ else if (baud_rate > 17000)
+ baud_rate = 19200;
+ else
+ (baud_rate = 9600);
+ // new_clk = new_baud_base/baud_rate
+ new_clk = new_baud_base / baud_rate;
+ au_writel(new_clk,
+ UART_BASE + UART_CLK +
+ i * 0x00100000);
+ au_sync_delay(10);
+ }
+ }
+ }
+
+
+ /* We don't want _any_ interrupts other than
+ * match20. Otherwise our calibrate_delay()
+ * calculation will be off, potentially a lot.
+ */
+ intc0_mask = save_local_and_disable(0);
+ intc1_mask = save_local_and_disable(1);
+ local_enable_irq(AU1000_TOY_MATCH2_INT);
+ spin_unlock_irqrestore(&pm_lock, flags);
+ calibrate_delay();
+ restore_local_and_enable(0, intc0_mask);
+ restore_local_and_enable(1, intc1_mask);
+ return retval;
+}
+
+
+static struct ctl_table pm_table[] = {
+ {ACPI_S1_SLP_TYP, "suspend", NULL, 0, 0600, NULL, &pm_do_suspend},
+ {ACPI_SLEEP, "sleep", NULL, 0, 0600, NULL, &pm_do_sleep},
+ {CTL_ACPI, "freq", NULL, 0, 0600, NULL, &pm_do_freq},
+ {0}
+};
+
+static struct ctl_table pm_dir_table[] = {
+ {CTL_ACPI, "pm", NULL, 0, 0555, pm_table},
+ {0}
+};
+
+/*
+ * Initialize power interface
+ */
+static int __init pm_init(void)
+{
+ register_sysctl_table(pm_dir_table, 1);
+ return 0;
+}
+
+__initcall(pm_init);
+
+
+/*
+ * This is right out of init/main.c
+ */
+
+/* This is the number of bits of precision for the loops_per_jiffy. Each
+ bit takes on average 1.5/HZ seconds. This (like the original) is a little
+ better than 1% */
+#define LPS_PREC 8
+
+static void calibrate_delay(void)
+{
+ unsigned long ticks, loopbit;
+ int lps_precision = LPS_PREC;
+
+ loops_per_jiffy = (1 << 12);
+
+ while (loops_per_jiffy <<= 1) {
+ /* wait for "start of" clock tick */
+ ticks = jiffies;
+ while (ticks == jiffies)
+ /* nothing */ ;
+ /* Go .. */
+ ticks = jiffies;
+ __delay(loops_per_jiffy);
+ ticks = jiffies - ticks;
+ if (ticks)
+ break;
+ }
+
+/* Do a binary approximation to get loops_per_jiffy set to equal one clock
+ (up to lps_precision bits) */
+ loops_per_jiffy >>= 1;
+ loopbit = loops_per_jiffy;
+ while (lps_precision-- && (loopbit >>= 1)) {
+ loops_per_jiffy |= loopbit;
+ ticks = jiffies;
+ while (ticks == jiffies);
+ ticks = jiffies;
+ __delay(loops_per_jiffy);
+ if (jiffies != ticks) /* longer than 1 tick */
+ loops_per_jiffy &= ~loopbit;
+ }
+}
+
+void au1k_wait(void)
+{
+ __asm__("nop\n\t" "nop\n\t");
+}
+
+#endif /* CONFIG_PM */
diff -Nru a/arch/mips/au1000/common/prom.c b/arch/mips/au1000/common/prom.c
--- a/arch/mips/au1000/common/prom.c Wed Jul 2 14:00:13 2003
+++ b/arch/mips/au1000/common/prom.c Wed Jul 2 14:00:13 2003
@@ -4,11 +4,11 @@
* PROM library initialisation code, assuming a version of
* pmon is the boot code.
*
- * Copyright 2000 MontaVista Software Inc.
+ * Copyright 2000,2001 MontaVista Software Inc.
* Author: MontaVista Software, Inc.
* ppopov@mvista.com or source@mvista.com
*
- * This file was derived from Carsten Langgaard's
+ * This file was derived from Carsten Langgaard's
* arch/mips/mips-boards/xx files.
*
* Carsten Langgaard, carstenl@mips.com
@@ -35,7 +35,7 @@
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include
+#include
#include
#include
#include
@@ -44,22 +44,23 @@
/* #define DEBUG_CMDLINE */
-char arcs_cmdline[COMMAND_LINE_SIZE];
-int prom_argc;
-char **prom_argv, **prom_envp;
+char arcs_cmdline[CL_SIZE];
+extern int prom_argc;
+extern char **prom_argv, **prom_envp;
-typedef struct {
- char *name;
-/* char *val; */
-} t_env_var;
+typedef struct
+{
+ char *name;
+/* char *val; */
+}t_env_var;
-char * __init prom_getcmdline(void)
+char * prom_getcmdline(void)
{
return &(arcs_cmdline[0]);
}
-void __init prom_init_cmdline(void)
+void prom_init_cmdline(void)
{
char *cp;
int actr;
@@ -101,20 +102,57 @@
return(NULL);
}
-static inline unsigned char str2hexnum(unsigned char c)
+inline unsigned char str2hexnum(unsigned char c)
{
if(c >= '0' && c <= '9')
- return c - '0';
+ return c - '0';
if(c >= 'a' && c <= 'f')
- return c - 'a' + 10;
+ return c - 'a' + 10;
+ if(c >= 'A' && c <= 'F')
+ return c - 'A' + 10;
return 0; /* foo */
}
-int __init page_is_ram(unsigned long pagenr)
+inline void str2eaddr(unsigned char *ea, unsigned char *str)
{
- return 1;
+ int i;
+
+ for(i = 0; i < 6; i++) {
+ unsigned char num;
+
+ if((*str == '.') || (*str == ':'))
+ str++;
+ num = str2hexnum(*str++) << 4;
+ num |= (str2hexnum(*str++));
+ ea[i] = num;
+ }
}
-void prom_free_prom_memory (void)
+int get_ethernet_addr(char *ethernet_addr)
{
+ char *ethaddr_str;
+
+ ethaddr_str = prom_getenv("ethaddr");
+ if (!ethaddr_str) {
+ printk("ethaddr not set in boot prom\n");
+ return -1;
+ }
+ str2eaddr(ethernet_addr, ethaddr_str);
+
+#if 0
+ {
+ int i;
+
+ printk("get_ethernet_addr: ");
+ for (i=0; i<5; i++)
+ printk("%02x:", (unsigned char)*(ethernet_addr+i));
+ printk("%02x\n", *(ethernet_addr+i));
+ }
+#endif
+
+ return 0;
}
+
+void prom_free_prom_memory (void) {}
+EXPORT_SYMBOL(prom_getcmdline);
+EXPORT_SYMBOL(get_ethernet_addr);
diff -Nru a/arch/mips/au1000/common/puts.c b/arch/mips/au1000/common/puts.c
--- a/arch/mips/au1000/common/puts.c Wed Jul 2 14:00:36 2003
+++ b/arch/mips/au1000/common/puts.c Wed Jul 2 14:00:36 2003
@@ -29,8 +29,9 @@
*/
#include
+#include
-#define SERIAL_BASE 0xB1100000 /* au1000, uart 0 */
+#define SERIAL_BASE UART_BASE
#define SER_CMD 0x7
#define SER_DATA 0x1
#define TX_BUSY 0x20
diff -Nru a/arch/mips/au1000/common/reset.c b/arch/mips/au1000/common/reset.c
--- a/arch/mips/au1000/common/reset.c Wed Jul 2 13:59:50 2003
+++ b/arch/mips/au1000/common/reset.c Wed Jul 2 13:59:50 2003
@@ -27,7 +27,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
+#include
#include
#include
#include
@@ -35,23 +35,107 @@
#include
#include
#include
+#include
+
+extern int au_sleep(void);
void au1000_restart(char *command)
{
- set_cp0_status(ST0_BEV | ST0_ERL);
- set_cp0_config(CONF_CM_UNCACHED);
+ /* Set all integrated peripherals to disabled states */
+ u32 prid = read_c0_prid();
+
+ printk(KERN_NOTICE "\n** Resetting Integrated Peripherals\n");
+ switch (prid & 0xFF000000)
+ {
+ case 0x00000000: /* Au1000 */
+ au_writel(0x02, 0xb0000010); /* ac97_enable */
+ au_writel(0x08, 0xb017fffc); /* usbh_enable - early errata */
+ asm("sync");
+ au_writel(0x00, 0xb017fffc); /* usbh_enable */
+ au_writel(0x00, 0xb0200058); /* usbd_enable */
+ au_writel(0x00, 0xb0300040); /* ir_enable */
+ au_writel(0x00, 0xb0520000); /* macen0 */
+ au_writel(0x00, 0xb0520004); /* macen1 */
+ au_writel(0x00, 0xb1000008); /* i2s_enable */
+ au_writel(0x00, 0xb1100100); /* uart0_enable */
+ au_writel(0x00, 0xb1200100); /* uart1_enable */
+ au_writel(0x00, 0xb1300100); /* uart2_enable */
+ au_writel(0x00, 0xb1400100); /* uart3_enable */
+ au_writel(0x02, 0xb1600100); /* ssi0_enable */
+ au_writel(0x02, 0xb1680100); /* ssi1_enable */
+ au_writel(0x00, 0xb1900020); /* sys_freqctrl0 */
+ au_writel(0x00, 0xb1900024); /* sys_freqctrl1 */
+ au_writel(0x00, 0xb1900028); /* sys_clksrc */
+ au_writel(0x00, 0xb1900100); /* sys_pininputen */
+ break;
+ case 0x01000000: /* Au1500 */
+ au_writel(0x02, 0xb0000010); /* ac97_enable */
+ au_writel(0x08, 0xb017fffc); /* usbh_enable - early errata */
+ asm("sync");
+ au_writel(0x00, 0xb017fffc); /* usbh_enable */
+ au_writel(0x00, 0xb0200058); /* usbd_enable */
+ au_writel(0x00, 0xb1520000); /* macen0 */
+ au_writel(0x00, 0xb1520004); /* macen1 */
+ au_writel(0x00, 0xb1100100); /* uart0_enable */
+ au_writel(0x00, 0xb1400100); /* uart3_enable */
+ au_writel(0x00, 0xb1900020); /* sys_freqctrl0 */
+ au_writel(0x00, 0xb1900024); /* sys_freqctrl1 */
+ au_writel(0x00, 0xb1900028); /* sys_clksrc */
+ au_writel(0x00, 0xb1900100); /* sys_pininputen */
+ break;
+ case 0x02000000: /* Au1100 */
+ au_writel(0x02, 0xb0000010); /* ac97_enable */
+ au_writel(0x08, 0xb017fffc); /* usbh_enable - early errata */
+ asm("sync");
+ au_writel(0x00, 0xb017fffc); /* usbh_enable */
+ au_writel(0x00, 0xb0200058); /* usbd_enable */
+ au_writel(0x00, 0xb0300040); /* ir_enable */
+ au_writel(0x00, 0xb0520000); /* macen0 */
+ au_writel(0x00, 0xb1000008); /* i2s_enable */
+ au_writel(0x00, 0xb1100100); /* uart0_enable */
+ au_writel(0x00, 0xb1200100); /* uart1_enable */
+ au_writel(0x00, 0xb1400100); /* uart3_enable */
+ au_writel(0x02, 0xb1600100); /* ssi0_enable */
+ au_writel(0x02, 0xb1680100); /* ssi1_enable */
+ au_writel(0x00, 0xb1900020); /* sys_freqctrl0 */
+ au_writel(0x00, 0xb1900024); /* sys_freqctrl1 */
+ au_writel(0x00, 0xb1900028); /* sys_clksrc */
+ au_writel(0x00, 0xb1900100); /* sys_pininputen */
+ break;
+
+ default:
+ break;
+ }
+
+ set_c0_status(ST0_BEV | ST0_ERL);
+ set_c0_config(CONF_CM_UNCACHED);
flush_cache_all();
- write_32bit_cp0_register(CP0_WIRED, 0);
+ write_c0_wired(0);
+
+#if defined(CONFIG_MIPS_PB1500) || defined(CONFIG_MIPS_PB1100) || defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1100) || defined(CONFIG_MIPS_DB1500)
+ /* Do a HW reset if the board can do it */
+
+ au_writel(0x00000000, 0xAE00001C);
+#endif
+
__asm__ __volatile__("jr\t%0"::"r"(0xbfc00000));
}
void au1000_halt(void)
{
printk(KERN_NOTICE "\n** You can safely turn off the power\n");
+#ifdef CONFIG_PM
+ au_sleep();
+
+ /* should not get here */
+ printk(KERN_ERR "Unable to put cpu in sleep mode\n");
+ while(1);
+#else
while (1)
__asm__(".set\tmips3\n\t"
"wait\n\t"
".set\tmips0");
+#endif
}
void au1000_power_off(void)
diff -Nru a/arch/mips/au1000/common/rtc.c b/arch/mips/au1000/common/rtc.c
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/arch/mips/au1000/common/rtc.c Wed Jul 2 14:00:46 2003
@@ -0,0 +1,37 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * RTC routines for PC style attached Dallas chip.
+ *
+ * Copyright (C) 1998, 2001 by Ralf Baechle
+ */
+#include
+#include
+#include