diff -Nru a/Documentation/00-INDEX b/Documentation/00-INDEX --- a/Documentation/00-INDEX Tue Feb 4 09:34:26 2003 +++ b/Documentation/00-INDEX Mon Jun 2 01:55:49 2003 @@ -182,6 +182,8 @@ - short guide on how to set up and use the RAM disk. riscom8.txt - notes on using the RISCom/8 multi-port serial driver. +rocket.txt + - info on installing/using the Comtrol RocketPort multiport serial driver rtc.txt - notes on how to use the Real Time Clock (aka CMOS clock) driver. s390/ diff -Nru a/Documentation/DMA-mapping.txt b/Documentation/DMA-mapping.txt --- a/Documentation/DMA-mapping.txt Sat Dec 21 20:36:48 2002 +++ b/Documentation/DMA-mapping.txt Thu May 29 22:42:44 2003 @@ -83,6 +83,15 @@ to be increased. And for a device with limitations, as discussed in the previous paragraph, it needs to be decreased. +pci_alloc_consistent() by default will return 32-bit DMA addresses. +PCI-X specification requires PCI-X devices to support 64-bit +addressing (DAC) for all transactions. And at least one platform (SGI +SN2) requires 64-bit consistent allocations to operate correctly when +the IO bus is in PCI-X mode. Therefore, like with pci_set_dma_mask(), +it's good practice to call pci_set_consistent_dma_mask() to set the +appropriate mask even if your device only supports 32-bit DMA +(default) and especially if it's a PCI-X device. + For correct operation, you must interrogate the PCI layer in your device probe routine to see if the PCI controller on the machine can properly support the DMA addressing limitation your device has. It is @@ -94,6 +103,11 @@ int pci_set_dma_mask(struct pci_dev *pdev, u64 device_mask); +The query for consistent allocations is performed via a a call to +pci_set_consistent_dma_mask(): + + int pci_set_consistent_dma_mask(struct pci_dev *pdev, u64 device_mask); + Here, pdev is a pointer to the PCI device struct of your device, and device_mask is a bit mask describing which bits of a PCI address your device supports. It returns zero if your card can perform DMA @@ -133,7 +147,7 @@ Sparc64 is one platform which behaves in this way. Here is how you would handle a 64-bit capable device which can drive -all 64-bits during a DAC cycle: +all 64-bits when accessing streaming DMA: int using_dac; @@ -147,6 +161,30 @@ goto ignore_this_device; } +If a card is capable of using 64-bit consistent allocations as well, +the case would look like this: + + int using_dac, consistent_using_dac; + + if (!pci_set_dma_mask(pdev, 0xffffffffffffffff)) { + using_dac = 1; + consistent_using_dac = 1; + pci_set_consistent_dma_mask(pdev, 0xffffffffffffffff) + } else if (!pci_set_dma_mask(pdev, 0xffffffff)) { + using_dac = 0; + consistent_using_dac = 0; + pci_set_consistent_dma_mask(pdev, 0xffffffff) + } else { + printk(KERN_WARNING + "mydev: No suitable DMA available.\n"); + goto ignore_this_device; + } + +pci_set_consistent_dma_mask() will always be able to set the same or a +smaller mask as pci_set_dma_mask(). However for the rare case that a +device driver only uses consistent allocations, one would have to +check the return value from pci_set_consistent(). + If your 64-bit device is going to be an enormous consumer of DMA mappings, this can be problematic since the DMA mappings are a finite resource on many platforms. Please see the "DAC Addressing @@ -215,9 +253,10 @@ Think of "consistent" as "synchronous" or "coherent". - Consistent DMA mappings are always SAC addressable. That is - to say, consistent DMA addresses given to the driver will always - be in the low 32-bits of the PCI bus space. + The current default is to return consistent memory in the low 32 + bits of the PCI bus space. However, for future compatibility you + should set the consistent mask even if this default is fine for your + driver. Good examples of what to use consistent mappings for are: @@ -287,15 +326,14 @@ driver needs regions sized smaller than a page, you may prefer using the pci_pool interface, described below. -The consistent DMA mapping interfaces, for non-NULL dev, will always -return a DMA address which is SAC (Single Address Cycle) addressable. -Even if the device indicates (via PCI dma mask) that it may address -the upper 32-bits and thus perform DAC cycles, consistent allocation -will still only return 32-bit PCI addresses for DMA. This is true -of the pci_pool interface as well. - -In fact, as mentioned above, all consistent memory provided by the -kernel DMA APIs are always SAC addressable. +The consistent DMA mapping interfaces, for non-NULL dev, will by +default return a DMA address which is SAC (Single Address Cycle) +addressable. Even if the device indicates (via PCI dma mask) that it +may address the upper 32-bits and thus perform DAC cycles, consistent +allocation will only return > 32-bit PCI addresses for DMA if the +consistent dma mask has been explicitly changed via +pci_set_consistent_dma_mask(). This is true of the pci_pool interface +as well. pci_alloc_consistent returns two values: the virtual address which you can use to access it from the CPU and dma_handle which you pass to the diff -Nru a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile --- a/Documentation/DocBook/Makefile Fri Feb 28 03:48:00 2003 +++ b/Documentation/DocBook/Makefile Mon Jun 2 04:30:16 2003 @@ -11,7 +11,8 @@ kernel-locking.sgml via-audio.sgml mousedrivers.sgml \ deviceiobook.sgml procfs-guide.sgml tulip-user.sgml \ writing_usb_driver.sgml scsidrivers.sgml sis900.sgml \ - kernel-api.sgml journal-api.sgml lsm.sgml usb.sgml + kernel-api.sgml journal-api.sgml lsm.sgml usb.sgml \ + gadget.sgml ### # The build process is as follows (targets): diff -Nru a/Documentation/DocBook/gadget.tmpl b/Documentation/DocBook/gadget.tmpl --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/Documentation/DocBook/gadget.tmpl Mon Jun 2 04:30:16 2003 @@ -0,0 +1,966 @@ + + + + USB Gadget API for Linux + 02 June 2003 + 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. + + + + + 2003 + David Brownell + + + + David + Brownell + +
dbrownell@users.sourceforge.net
+
+
+
+ + + +Introduction + +This document presents a Linux-USB "Gadget" +kernel mode +API, for use within peripherals and other USB devices +that embed Linux. +It provides an overview of the API structure, +and shows how that fits into a system development project. +This is the first such API released on Linux to address +a number of important problems, including: + + + Supports USB 2.0, for high speed devices which + can stream data at several dozen megabytes per second. + + Handles devices with dozens of endpoints just as + well as ones with just two fixed-function ones. Gadget drivers + can be written so they're easy to port to new hardware. + + Flexible enough to expose more complex USB device + capabilities such as multiple configurations, multiple interfaces, + composite devices, + and alternate interface settings. + + Sharing data structures and API models with the + Linux-USB host side API. This looks forward to USB "On-The-Go" + (OTG) and similar more-symmetric frameworks. + + Minimalist, so it's easier to support new device + controller hardware. I/O processing doesn't imply large + demands for memory or CPU resources. + + + + +Most Linux developers will not be able to use this API, since they +have USB "host" hardware in a PC, workstation, or server. +Linux users with embedded systems are more likely to +have USB peripheral hardware. +To distinguish drivers running inside such hardware from the +more familiar Linux "USB device drivers", +which are host side proxies for the real USB devices, +a different term is used: +the drivers inside the peripherals are "USB gadget drivers". +In USB protocol interactions, the device driver is the master +(or "client driver") +and the gadget driver is the slave (or "function driver"). + + +The gadget API resembles the host side Linux-USB API in that both +use queues of request objects to package I/O buffers, and those requests +may be submitted or canceled. +They share common definitions for the standard USB +Chapter 9 messages, structures, and constants. +Also, both APIs bind and unbind drivers to devices. +The APIs differ in detail, since the host side's current +URB framework exposes a number of implementation details +and assumptions that are inappropriate for a gadget API. +While the model for control transfers and configuration +management is necessarily different (one side is a hardware-neutral master, +the other is a hardware-aware slave), the endpoint I/0 API used here +should also be usable for an overhead-reduced host side API. + + + + +Structure of Gadget Drivers + +A system running inside a USB peripheral +normally has at least three layers inside the kernel to handle +USB protocol processing, and may have additional layers in +user space code. +The "gadget" API is used by the middle layer to interact +with the lowest level (which directly handles hardware). + + +In Linux, from the bottom up, these layers are: + + + + + + USB Controller Driver + + + This is the lowest software level. + It is the only layer that talks to hardware, + through registers, fifos, dma, irqs, and the like. + The <linux/usb_gadget.h> API abstracts + the peripheral controller endpoint hardware. + That hardware is exposed through endpoint objects, which accept + streams of IN/OUT buffers, and through callbacks that interact + with gadget drivers. + Since normal USB devices only have one upstream + port, they only have one of these drivers. + The controller driver can support any number of different + gadget drivers, but only one of them can be used at a time. + + + Examples of such controller hardware include + the PCI-based NetChip 2280 USB 2.0 high speed controller, + the SA-11x0 or PXA-25x UDC (found within many PDAs), + and a variety of other products. + + + + + Gadget Driver + + + The lower boundary of this driver implements hardware-neutral + USB functions, using calls to the controller driver. + Because such hardware varies widely in capabilities and restrictions, + the gadget driver is normally configured at compile time + to work with endpoints supported by one particular controller. + Gadget drivers may be portable to several different controllers, + using conditional compilation. + Gadget driver responsibilities include: + + + handling setup requests (ep0 protocol responses) + possibly including class-specific functionality + + returning configuration and string descriptors + + (re)setting configurations and interface + altsettings, including enabling and configuring endpoints + + handling life cycle events, such as managing + bindings + to hardware, and disconnection from the USB host. + + managing IN and OUT transfers on all currently + enabled endpoints + + + + + Such drivers may be modules of proprietary code, although + that approach is discouraged in the Linux community. + + + + + Upper Level + + + Most gadget drivers have an upper boundary that connects + to some Linux driver or framework in Linux. + Through that boundary flows the data which the gadget driver + produces and/or consumes through protocol transfers over USB. + Examples include: + + + user mode code, using generic (gadgetfs) + or application specific files in + /dev + + networking subsystem (for network gadgets, + like the CDC Ethernet Model gadget driver) + + data capture drivers, perhaps video4Linux or + a scanner driver; or test and measurement hardware. + + input subsystem (for HID gadgets) + + sound subsystem (for audio gadgets) + + file system (for PTP gadgets) + + block i/o subsystem (for usb-storage gadgets) + + ... and more + + + + + Additional Layers + + + Other layers may exist. + These could include kernel layers, such as network protocol stacks, + as well as user mode applications building on standard POSIX + system call APIs such as + open(), close(), + read() and write(). + On newer systems, POSIX Async I/O calls may be an option. + Such user mode code will not necessarily be subject to + the GNU General Public License (GPL). + + + + + + +Over time, reusable utilities should evolve to help make some +gadget driver tasks simpler. An example of particular interest +is code implementing standard USB-IF protocols for +HID, networking, storage, or audio classes. +Some developers are interested in KDB or KGDB hooks, to let +target hardware be remotely debugged. +Most such USB protocol code doesn't need to be hardware-specific, +any more than network protocols like X11, HTTP, or NFS are. +Such interface drivers might be combined, to support composite devices. + + + + + +Kernel Mode Gadget API + +Gadget drivers declare themselves through a +struct usb_gadget_driver, which is responsible for +most parts of enumeration for a struct usb_gadget. +The response to a set_configuration usually involves +enabling one or more of the struct usb_ep objects +exposed by the gadget, and submitting one or more +struct usb_request buffers to transfer data. +Understand those four data types, and their operations, and +you will understand how this API works. + + +Incomplete Data Type Descriptions + +This documentation was prepared using the standard Linux +kernel docproc tool, which turns text +and in-code comments into SGML DocBook and then into usable +formats such as HTML or PDF. +Other than the "Chapter 9" data types, most of the significant +data types and functions are described here. + + +However, docproc does not understand all the C constructs +that are used, so some relevant information is likely omitted from +what you are reading. +One example of such information is several per-request flags. +You'll have to read the header file, and use example source +code (such as that for "Gadget Zero"), to fully understand the API. + + +The part of the API implementing some basic +driver capabilities is specific to the version of the +Linux kernel that's in use. +The 2.5 kernel includes a driver model +framework that has no analogue on earlier kernels; +so those parts of the gadget API are not fully portable. +(They are implemented on 2.4 kernels, but in a different way.) +The driver model state is another part of this API that is +ignored by the kerneldoc tools. + + + +The core API does not expose +every possible hardware feature, only the most widely available ones. +There are significant hardware features, such as device-to-device DMA +(without temporary storage in a memory buffer) +that would be added using hardware-specific APIs. + + +This API expects drivers to use conditional compilation to handle +endpoint capabilities of different hardware. +Those tend to have arbitrary restrictions, relating to +transfer types, addressing, packet sizes, buffering, and availability. +As a rule, such differences only matter for "endpoint zero" logic +that handles device configuration and management. +The API only supports limited run-time +detection of capabilities, through naming conventions for endpoints. +Although a gadget driver could scan the endpoints available to it and +choose to map those capabilities onto driver functionality in some way, +few drivers will want to reconfigure themselves at run-time. + + +Like the Linux-USB host side API, this API exposes +the "chunky" nature of USB messages: I/O requests are in terms +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) +more than asynchronous ones +(tty style, like 8 bytes, 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 +protocols where packet boundaries (and "short packets") +are not significant. + + +Driver Life Cycle + +Gadget drivers make endpoint I/O requests to hardware without +needing to know many details of the hardware, but driver +setup/configuration code needs to handle some differences. +Use the API like this: + + + + +Register a driver for the particular device side +usb controller hardware, +such as the net2280 on PCI (USB 2.0), +sa11x0 or pxa25x as found in Linux PDAs, +and so on. +At this point the device is logically in the USB ch9 initial state +("attached"), drawing no power and not usable +(since it does not yet support enumeration). + + +Register a gadget driver that implements some higher level +device function. That will then bind() to a usb_gadget. + + +The hardware driver can now start enumerating. +The steps it handles are to accept USB power and set_address requests. +Other steps are handled by the gadget driver. +If the gadget driver module is unloaded before the host starts to +enumerate, steps before step 7 are skipped. + + +The gadget driver's setup() call returns usb descriptors, +based both on what the bus interface hardware provides and on the +functionality being implemented. +That can involve alternate settings or configurations, +unless the hardware prevents such operation. + + +The gadget driver handles the last step of enumeration, +when the USB host issues a set_configuration call. +It enables all endpoints used in that configuration, +with all interfaces in their default settings. +That involves using a list of the hardware's endpoints, enabling each +endpoint according to its descriptor. + + +Do real work and perform data transfers, possibly involving +changes to interface settings or switching to new configurations, until the +device is disconnect()ed from the host. +Queue any number of transfer requests to each endpoint. +The drivers then go back to step 3 (above). + + +When the gadget driver module is being unloaded, +the driver unbind() callback is issued. That lets the controller +driver be unloaded. + + + + +Drivers will normally be arranged so that just loading the +gadget driver module (or statically linking it into a Linux kernel) +allows the peripheral device to be enumerated. +Note that at this lowest level there are no policies about how +ep0 configuration logic is implemented, +except that it should obey USB specifications. +Such issues are in the domain of gadget drivers, +including knowing about implementation constraints +imposed by some USB controllers +or understanding that composite devices might happen to +be built by integrating reusable components. + + + + +USB 2.0 Chapter 9 Types and Constants + +Gadget drivers +rely on common USB structures and constants +defined in the +<linux/usb_ch9.h> +header file, which is standard in Linux 2.5 kernels. +These are the same types and constants used by host +side drivers. + + +!Iinclude/linux/usb_ch9.h + + +Core Objects and Methods + +These are declared in +<linux/usb_gadget.h>, +and are used by gadget drivers to interact with +USB peripheral controller drivers. + + + + +!Iinclude/linux/usb_gadget.h + + +Optional Utilities + +The core API is sufficient for writing a USB Gadget Driver, +but some optional utilities are provided to simplify common tasks. + + +!Edrivers/usb/gadget/usbstring.c + + + + +Peripheral Controller Drivers + +The first hardware supporting this API is the NetChip 2280 +controller, which supports USB 2.0 high speed and is based on PCI. +This is the net2280 driver module. +The driver supports Linux kernel versions 2.4 and 2.5; +contact NetChip Technologies for development boards and product +information. + + + + +A partial USB simulator, +the dummy_hcd driver, is available. +It can act like a net2280, a pxa25x, or an sa11x0 in terms +of available endpoints and device speeds; and it simulates +control, bulk, and to some extent interrupt transfers. +That lets you develop some parts of a gadget driver on a normal PC, +without any special hardware, and perhaps with the assistance +of tools such as GDB running with User Mode Linux. +At least one person has expressed interest in adapting that +approach, hooking it up to a simulator for a microcontroller. +Such simulators can help debug subsystems where the runtime hardware +is unfriendly to software development, or is not yet available. + + +Support for other controllers is expected to be developed +and contributed +over time, as this driver framework evolves. + + + + +Gadget Drivers + +In addition to Gadget Zero +(used primarily for testing and development with drivers +for usb controller hardware), other gadget drivers exist. + + +There's an ethernet gadget +driver, which implements one of the most useful +Communications Device Class models. +One of the standards for cable modem interoperability even +specifies the use of this ethernet model as one of two +mandatory options. +Gadgets using this code look to a USB host as if they're +an Ethernet adapter. +It provides access to a network where the gadget's CPU is one host, +which could easily be bridging, routing, or firewalling +access to other networks. + + +There is also support for user mode gadget drivers, +using gadgetfs. +This provides a User Mode API that presents +each endpoint as a single file descriptor. I/O is done using +normal read() and read() calls. +Familiar tools like GDB and pthreads can be used to +develop and debug user mode drivers, so that once a robust +controller driver is available many applications for it +won't require new kernel mode software. + + +Support for other kinds of gadget is expected to +be developed and contributed +over time, as this driver framework evolves. + + + + + + +GNU Free Documentation License +Version 1.2, November 2002 + + + +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: + + + +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. +
+
+ +
+ diff -Nru a/Documentation/filesystems/fat_cvf.txt b/Documentation/filesystems/fat_cvf.txt --- a/Documentation/filesystems/fat_cvf.txt Mon Feb 4 23:49:25 2002 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,210 +0,0 @@ -This is the main documentation for the CVF-FAT filesystem extension. 18Nov1998 - - -Table of Contents: - -1. The idea of CVF-FAT -2. Restrictions -3. Mount options -4. Description of the CVF-FAT interface -5. CVF Modules - ------------------------------------------------------------------------------- - - -1. The idea of CVF-FAT ------------------------------------------------------------------------------- - -CVF-FAT is a FAT filesystem extension that provides a generic interface for -Compressed Volume Files in FAT partitions. Popular CVF software, for -example, are Microsoft's Doublespace/Drivespace and Stac's Stacker. -Using the CVF-FAT interface, it is possible to load a module that handles -all the low-level disk access that has to do with on-the-fly compression -and decompression. Any other part of FAT filesystem access is still handled -by the FAT, MSDOS or VFAT or even UMSDOS driver. - -CVF access works by redirecting certain low-level routines from the FAT -driver to a loadable, CVF-format specific module. This module must fake -a normal FAT filesystem to the FAT driver while doing all the extra stuff -like compression and decompression silently. - - -2. Restrictions ------------------------------------------------------------------------------- - -- BMAP problems - - CVF filesystems cannot do bmap. It's impossible in principle. Thus - all actions that require bmap do not work (swapping, writable mmapping). - Read-only mmapping works because the FAT driver has a hack for this - situation :) Well, writable mmapping should now work using the readpage - interface function which has been hacked into the FAT driver just for - CVF-FAT :) - -- attention, DOSEmu users - - You may have to unmount all CVF partitions before running DOSEmu depending - on your configuration. If DOSEmu is configured to use wholedisk or - partition access (this is often the case to let DOSEmu access - compressed partitions) there's a risk of destroying your compressed - partitions or crashing your system because of confused drivers. - - Note that it is always safe to redirect the compressed partitions with - lredir or emufs.sys. Refer to the DOSEmu documentation for details. - - -3. Mount options ------------------------------------------------------------------------------- - -The CVF-FAT extension currently adds the following options to the FAT -driver's standard options: - - cvf_format=xxx - Forces the driver to use the CVF module "xxx" instead of auto-detection. - Without this option, the CVF-FAT interface asks all currently loaded - CVF modules whether they recognize the CVF. Therefore, this option is - only necessary if the CVF format is not recognized correctly - because of bugs or incompatibilities in the CVF modules. (It skips - the detect_cvf call.) "xxx" may be the text "none" (without the quotes) - to inhibit using any of the loaded CVF modules, just in case a CVF - module insists on mounting plain FAT filesystems by misunderstanding. - "xxx" may also be the text "autoload", which has a special meaning for - a module loader, but does not skip auto-detection. - - If the kernel supports kmod, the cvf_format=xxx option also controls - on-demand CVF module loading. Without this option, nothing is loaded - on demand. With cvf_format=xxx, a module "xxx" is requested automatically - before mounting the compressed filesystem (unless "xxx" is "none"). In - case there is a difference between the CVF format name and the module - name, setup aliases in your modules configuration. If the string "xxx" - is "autoload", a non-existent module "cvf_autoload" is requested which - can be used together with a special modules configuration (alias and - pre-install statements) in order to load more than one CVF module, let - them detect automatically which kind of CVF is to be mounted, and only - keep the "right" module in memory. For examples please refer to the - dmsdos documentation (ftp and http addresses see below). - - cvf_options=yyy - Option string passed to the CVF module. I.e. only the "yyy" is passed - (without the quotes). The documentation for each CVF module should - explain it since it is interpreted only by the CVF module. Note that - the string must not contain a comma (",") - this would lead to - misinterpretation by the FAT driver, which would recognize the text - after a comma as a FAT driver option and might get confused or print - strange error messages. The documentation for the CVF module should - offer a different separation symbol, for example the dot "." or the - plus sign "+", which is only valid inside the string "yyy". - - -4. Description of the CVF-FAT interface ------------------------------------------------------------------------------- - -Assuming you want to write your own CVF module, you need to write a lot of -interface functions. Most of them are covered in the kernel documentation -you can find on the net, and thus won't be described here. They have been -marked with "[...]" :-) Take a look at include/linux/fat_cvf.h. - -struct cvf_format -{ int cvf_version; - char* cvf_version_text; - unsigned long int flags; - int (*detect_cvf) (struct super_block*sb); - int (*mount_cvf) (struct super_block*sb,char*options); - int (*unmount_cvf) (struct super_block*sb); - [...] - void (*zero_out_cluster) (struct inode*, int clusternr); -} - -This structure defines the capabilities of a CVF module. It must be filled -out completely by a CVF module. Consider it as a kind of form that is used -to introduce the module to the FAT/CVF-FAT driver. - -It contains... - - cvf_version: - A version id which must be unique. Choose one. - - cvf_version_text: - A human readable version string that should be one short word - describing the CVF format the module implements. This text is used - for the cvf_format option. This name must also be unique. - - flags: - Bit coded flags, currently only used for a readpage/mmap hack that - provides both mmap and readpage functionality. If CVF_USE_READPAGE - is set, mmap is set to generic_file_mmap and readpage is caught - and redirected to the cvf_readpage function. If it is not set, - readpage is set to generic_readpage and mmap is caught and redirected - to cvf_mmap. (If you want writable mmap use the readpage interface.) - - detect_cvf: - A function that is called to decide whether the filesystem is a CVF of - the type the module supports. The detect_cvf function must return 0 - for "NO, I DON'T KNOW THIS GARBAGE" or anything >0 for "YES, THIS IS - THE KIND OF CVF I SUPPORT". The function must maintain the module - usage counters for safety, i.e. do MOD_INC_USE_COUNT at the beginning - and MOD_DEC_USE_COUNT at the end. The function *must not* assume that - successful recognition would lead to a call of the mount_cvf function - later. - - mount_cvf: - A function that sets up some values or initializes something additional - to what has to be done when a CVF is mounted. This is called at the - end of fat_read_super and must return 0 on success. Definitely, this - function must increment the module usage counter by MOD_INC_USE_COUNT. - This mount_cvf function is also responsible for interpreting a CVF - module specific option string (the "yyy" from the FAT mount option - "cvf_options=yyy") which cannot contain a comma (use for example the - dot "." as option separator symbol). - - unmount_cvf: - A function that is called when the filesystem is unmounted. Most likely - it only frees up some memory and calls MOD_DEC_USE_COUNT. The return - value might be ignored (it currently is ignored). - - [...]: - All other interface functions are "caught" FAT driver functions, i.e. - are executed by the FAT driver *instead* of the original FAT driver - functions. NULL means use the original FAT driver functions instead. - If you really want "no action", write a function that does nothing and - hang it in instead. - - zero_out_cluster: - The zero_out_cluster function is called when the fat driver wants to - zero out a (new) cluster. This is important for directories (mkdir). - If it is NULL, the FAT driver defaults to overwriting the whole - cluster with zeros. Note that clusternr is absolute, not relative - to the provided inode. - -Notes: - 1. The cvf_bmap function should be ignored. It really should never - get called from somewhere. I recommend redirecting it to a panic - or fatal error message so bugs show up immediately. - 2. The cvf_writepage function is ignored. This is because the fat - driver doesn't support it. This might change in future. I recommend - setting it to NULL (i.e use default). - -int register_cvf_format(struct cvf_format*cvf_format); - If you have just set up a variable containing the above structure, - call this function to introduce your CVF format to the FAT/CVF-FAT - driver. This is usually done in init_module. Be sure to check the - return value. Zero means success, everything else causes a kernel - message printed in the syslog describing the error that occurred. - Typical errors are: - - a module with the same version id is already registered or - - too many CVF formats. Hack fs/fat/cvf.c if you need more. - -int unregister_cvf_format(struct cvf_format*cvf_format); - This is usually called in cleanup_module. Return value =0 means - success. An error only occurs if you try to unregister a CVF format - that has not been previously registered. The code uses the version id - to distinguish the modules, so be sure to keep it unique. - -5. CVF Modules ------------------------------------------------------------------------------- - -Refer to the dmsdos module (the successor of the dmsdos filesystem) for a -sample implementation. It can currently be found at - - ftp://fb9nt.uni-duisburg.de/pub/linux/dmsdos/dmsdos-x.y.z.tgz - ftp://sunsite.unc.edu/pub/Linux/system/Filesystems/dosfs/dmsdos-x.y.z.tgz - ftp://ftp.uni-stuttgart.de/pub/systems/linux/local/system/dmsdos-x.y.z.tgz - -(where x.y.z is to be replaced with the actual version number). Full -documentation about dmsdos is included in the dmsdos package, but can also -be found at - - http://fb9nt.uni-duisburg.de/mitarbeiter/gockel/software/dmsdos/index.html - http://www.yk.rim.or.jp/~takafumi/dmsdos/index.html (in Japanese). diff -Nru a/Documentation/filesystems/jfs.txt b/Documentation/filesystems/jfs.txt --- a/Documentation/filesystems/jfs.txt Mon Jan 27 09:20:39 2003 +++ b/Documentation/filesystems/jfs.txt Thu May 1 10:54:05 2003 @@ -4,10 +4,10 @@ Team members ------------ -Steve Best sbest@us.ibm.com Dave Kleikamp shaggy@austin.ibm.com +Dave Blaschke blaschke@us.ibm.com +Steve Best sbest@us.ibm.com Barry Arndt barndt@us.ibm.com -Christoph Hellwig hch@infradead.org The following mount options are supported: diff -Nru a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt --- a/Documentation/filesystems/proc.txt Sat Apr 12 16:23:07 2003 +++ b/Documentation/filesystems/proc.txt Sun Jun 1 14:12:47 2003 @@ -1068,6 +1068,8 @@ out to disk. This tunable expresses the interval between those wakeups, in 100'ths of a second. +Setting this to zero disables periodic writeback altogether. + dirty_expire_centisecs ---------------------- diff -Nru a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt --- a/Documentation/kbuild/kconfig-language.txt Tue Mar 11 10:20:18 2003 +++ b/Documentation/kbuild/kconfig-language.txt Sat May 31 15:15:59 2003 @@ -18,7 +18,7 @@ +- ... Every entry has its own dependencies. These dependencies are used -to determine the visible of an entry. Any child entry is only +to determine the visibility of an entry. Any child entry is only visible if its parent entry is also visible. Menu entries @@ -50,7 +50,7 @@ - type definition: "bool"/"tristate"/"string"/"hex"/"integer" Every config option must have a type. There are only two basic types: - tristate and string, the other types base on these two. The type + tristate and string, the other types are based on these two. The type definition optionally accepts an input prompt, so these two examples are equivalent: @@ -64,7 +64,7 @@ to the user. Optionally dependencies only for this prompt can be added with "if". -- default value: "default" ["if" ] +- default value: "default" ["if" ] A config option can have any number of default values. If multiple default values are visible, only the first defined one is active. Default values are not limited to the menu entry, where they are @@ -81,7 +81,7 @@ This defines a dependency for this menu entry. If multiple dependencies are defined they are connected with '&&'. Dependencies are applied to all other options within this menu entry (which also - accept "if" expression), so these two examples are equivalent: + accept an "if" expression), so these two examples are equivalent: bool "foo" if BAR default y if BAR @@ -90,9 +90,24 @@ bool "foo" default y +- reverse dependencies: "select" ["if" ] + While normal dependencies reduce the upper limit of a symbol (see + below), reverse dependencies can be used to force a lower limit of + another symbol. The value of the current menu symbol is used as the + minimal value can be set to. If is selected multiple + times, the limit is set to the largest selection. + Reverse dependencies can only be used with boolean or tristate + symbols. + +- numerical ranges: "range" ["if" ] + This allows to limit the range of possible input values for integer + and hex symbols. The user can only input a value which is larger than + or equal to the first symbol and smaller than or equal to the second + symbol. + - help text: "help" This defines a help text. The end of the help text is determined by - the level indentation, this means it ends at the first line which has + the indentation level, this means it ends at the first line which has a smaller indentation than the first line of the help text. @@ -123,14 +138,14 @@ otherwise 'y'. (4) Returns the value of the expression. Used to override precedence. (5) Returns the result of (2-/expr/). -(6) Returns the result of min(/expr/, /expr/). -(7) Returns the result of max(/expr/, /expr/). +(6) Returns the result of max(/expr/, /expr/). +(7) Returns the result of min(/expr/, /expr/). An expression can have a value of 'n', 'm' or 'y' (or 0, 1, 2 respectively for calculations). A menu entry becomes visible when it's expression evaluates to 'm' or 'y'. -There are two type of symbols: constant and nonconstant symbols. +There are two types of symbols: constant and nonconstant symbols. Nonconstant symbols are the most common ones and are defined with the 'config' statement. Nonconstant symbols consist entirely of alphanumeric characters or underscores. @@ -159,8 +174,8 @@ The other way to generate the menu structure is done by analyzing the dependencies. If a menu entry somehow depends on the previous entry, it -can be made a submenu of it. First the the previous (parent) symbol must -be part of the dependency list and then one of these two condititions +can be made a submenu of it. First, the previous (parent) symbol must +be part of the dependency list and then one of these two conditions must be true: - the child entry must become invisible, if the parent is set to 'n' - the child entry must only be visible, if the parent is visible @@ -177,7 +192,7 @@ MODVERSIONS directly depends on MODULES, this means it's only visible if MODULES is different from 'n'. The comment on the other hand is always -visible when MODULES it's visible (the (empty) dependency of MODULES is +visible when MODULES is visible (the (empty) dependency of MODULES is also part of the comment dependencies). @@ -188,12 +203,13 @@ line starts with a keyword (except help texts). The following keywords end a menu entry: - config +- menuconfig - choice/endchoice - comment - menu/endmenu - if/endif - source -The first four also start the definition of a menu entry. +The first five also start the definition of a menu entry. config: @@ -202,6 +218,14 @@ This defines a config symbol and accepts any of above attributes as options. + +menuconfig: + "menuconfig" + + +This is similiar to the simple config entry above, but it also gives a +hint to front ends, that all suboptions should be displayed as a +separate list of options. choices: diff -Nru a/Documentation/kobject.txt b/Documentation/kobject.txt --- a/Documentation/kobject.txt Mon May 12 15:14:33 2003 +++ b/Documentation/kobject.txt Tue Jun 3 16:15:33 2003 @@ -2,7 +2,18 @@ Patrick Mochel -7 January 2003 +Updated: 3 June 2003 + + +Copyright (c) Patrick Mochel +Copyright (c) Open Source Development Labs +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". + 0. Introduction @@ -100,6 +111,28 @@ When a kobject's reference count reaches 0, the method struct kobj_type::release() (which the kobject's kset points to) is called. This allows any memory allocated for the object to be freed. + + +NOTE!!! + +It is _imperative_ that you supply a desctructor for dynamically +allocated kobjects to free them if you are using kobject reference +counts. The reference count controls the duration of the lifetime of +the object. If it goes to 0, then it is assumed that the object will +be freed and cannot be used. + +More importantly, you must free the object there, and not immediately +after an unregister call. If someone else is referencing the object +(e.g. through a sysfs file), they will obtain a reference to the +object, assume it's valid and operate on it. If the object is +unregistered and freed in the meantime, the operation will then +reference freed memory and go boom. + +This can be prevented, in the simplest case, by defining a release +method and freeing the object from there only. Note that this will not +secure reference count/object management models that use a dual +reference count or do other wacky things with the reference count +(like the networking layer). 1.4 sysfs diff -Nru a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt --- a/Documentation/networking/ip-sysctl.txt Mon May 19 23:44:05 2003 +++ b/Documentation/networking/ip-sysctl.txt Tue Jun 3 22:06:50 2003 @@ -31,6 +31,11 @@ ipfrag_time - INTEGER Time in seconds to keep an IP fragment in memory. +ipfrag_secret_interval - INTEGER + Regeneration interval (in seconds) of the hash secret (or lifetime + for the hash secret) for IP fragments. + Default: 600 + INET peer storage: inet_peer_threshold - INTEGER @@ -514,6 +519,25 @@ FALSE: enable IPv4-mapped address feature Default: FALSE (as specified in RFC2553bis) + +IPv6 Fragmentation: + +ip6frag_high_thresh - INTEGER + Maximum memory used to reassemble IPv6 fragments. When + ip6frag_high_thresh bytes of memory is allocated for this purpose, + the fragment handler will toss packets until ip6frag_low_thresh + is reached. + +ip6frag_low_thresh - INTEGER + See ip6frag_high_thresh + +ip6frag_time - INTEGER + Time in seconds to keep an IPv6 fragment in memory. + +ip6frag_secret_interval - INTEGER + Regeneration interval (in seconds) of the hash secret (or lifetime + for the hash secret) for IPv6 fragments. + Default: 600 conf/default/*: Change the interface-specific default settings. diff -Nru a/Documentation/rocket.txt b/Documentation/rocket.txt --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/Documentation/rocket.txt Thu Jun 5 13:19:39 2003 @@ -0,0 +1,87 @@ +Comtrol(tm) RocketPort(R)/RocketModem(TM) Series +Device Driver for the Linux Operating System + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +PRODUCT OVERVIEW +---------------- + +This driver provides a loadable kernel driver for the Comtrol RocketPort +and RocketModem PCI boards. These boards provide, 2, 4, 8, 16, or 32 +high-speed serial ports or modems. This driver supports up to a combination +of four RocketPort or RocketModems boards in one machine simultaneously. +This file assumes that you are using the RocketPort driver which is +integrated into the kernel sources. + +The driver can also be installed as an external module using the usual +"make;make install" routine. This external module driver, obtainable +from the Comtrol website listed below, is useful for updating the driver +or installing it into kernels which do not have the driver configured +into them. Installations instructions for the external module +are in the included README and HW_INSTALL files. + +RocketPort ISA and RocketModem II PCI boards are also supported by this +driver, but must use the external module driver for configuration reasons. + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +INSTALLATION PROCEDURES +----------------------- + +RocketPort/RocketModem PCI cards require no driver configuration, they are +automatically detected and configured. + +The RocketPort driver can be installed as a module (recommended) or built +into the kernel. This is selected, as for other drivers, through the `make config` +command from the root of the Linux source tree during the kernel build process. + +The RocketPort/RocketModem serial ports installed by this driver are assigned +device major number 46, and will be named /dev/ttyRx, where x is the port number +starting at zero (ex. /dev/ttyR0, /devttyR1, ...). If you have multiple cards +installed in the system, the mapping of port names to serial ports is displayed +in the system log at /var/log/messages. + +If installed as a module, the module must be loaded. This can be done +manually by entering "modprobe rocket". To have the module loaded automatically +upon system boot, edit the /etc/modules.conf file and add the line +"alias char-major-46 rocket". + +In order to use the ports, their device names (nodes) must be created with mknod. +This is only required once, the system will retain the names once created. To +create the RocketPort/RocketModem device names, use the command +"mknod /dev/ttyRx c 46 x" where x is the port number starting at zero. For example: + +>mknod /dev/ttyR0 c 46 0 +>mknod /dev/ttyR1 c 46 1 +>mknod /dev/ttyR2 c 46 2 + +The Linux script MAKEDEV will create the first 16 ttyRx device names (nodes) for you: + +>/dev/MAKEDEV ttyR + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +REPORTING BUGS +-------------- + +For technical support, please provide the following +information: Driver version, kernel release, distribution of +kernel, and type of board you are using. Error messages and log +printouts port configuration details are especially helpful. + +USA + Phone: (612) 494-4100 + FAX: (612) 494-4199 + email: support@comtrol.com + +Comtrol Europe + Phone: +44 (0) 1 869 323-220 + FAX: +44 (0) 1 869 323-211 + email: support@comtrol.co.uk + +Web: http://www.comtrol.com +FTP: ftp.comtrol.com + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + + diff -Nru a/Documentation/scsi/aic7xxx.txt b/Documentation/scsi/aic7xxx.txt --- a/Documentation/scsi/aic7xxx.txt Thu May 1 10:04:05 2003 +++ b/Documentation/scsi/aic7xxx.txt Wed May 14 15:22:44 2003 @@ -132,6 +132,11 @@ 2. Version History + 6.2.34 - Fix locking regression instroduced in 6.2.29 that + could cuase a lock order reversal between the io_request_lock + and our per-softc lock. This was only possible on RH9, + SuSE, and kernel.org 2.4.X kernels. + 6.2.33 - Dynamically disable PCI parity error reporting after 10 errors are reported to the user. These errors are the result of some other device issuing PCI transactions diff -Nru a/Documentation/scsi/dc395x.txt b/Documentation/scsi/dc395x.txt --- a/Documentation/scsi/dc395x.txt Sat Apr 26 14:17:46 2003 +++ b/Documentation/scsi/dc395x.txt Fri May 23 15:57:18 2003 @@ -23,40 +23,70 @@ Both can be overriden by command line parameters (module or kernel parameters). -The syntax is as follows: - dc395x = AdapterID, SpeedIdx, DevMode, AdaptMode, Tags, DelayReset +The following parameters are available: -AdapterID : Host Adapter SCSI ID -SpeedIdx : 0,1,...7 = 20,13.3,10,8,6.7,5.8,5,4 MHz [ 7] -DevMode : Bitmap for Dev Cfg [63] -AdaptMode : Bitmap for Adapter Cfg [47] -Tags : The number of tags is 1<= 1. - -If you set AdapterID to -1, the adapter will use conservative -("safe") default settings instead; more precisely, dc395x=-1 is a -shortcut for dc395x=7,4,9,15,2,10 + - safe + Default: 0, Acceptable values: 0 or 1 + + If safe is set to 1 then the adapter will use conservative + ("safe") default settings. This sets: + + shortcut for dc395x=7,4,9,15,2,10 + + - adapter_id + Default: 7, Acceptable values: 0 to 15 + + Sets the host adapter SCSI ID. + + - max_speed + Default: 1, Acceptable value: 0 to 7 + 0 = 20 Mhz + 1 = 12.2 Mhz + 2 = 10 Mhz + 3 = 8 Mhz + 4 = 6.7 Mhz + 5 = 5.8 Hhz + 6 = 5 Mhz + 7 = 4 Mhz + + - dev_mode + Bitmap for device configuration + + DevMode bit definition: + Bit Val(hex) Val(dec) Meaning + *0 0x01 1 Parity check + *1 0x02 2 Synchronous Negotiation + *2 0x04 4 Disconnection + *3 0x08 8 Send Start command on startup. (Not used) + *4 0x10 16 Tagged Command Queueing + *5 0x20 32 Wide Negotiation + + - adapter_mode + Bitmap for adapter configuration + + AdaptMode bit definition + Bit Val(hex) Val(dec) Meaning + *0 0x01 1 Support more than two drives. (Not used) + *1 0x02 2 Use DOS compatible mapping for HDs greater than 1GB. + *2 0x04 4 Reset SCSI Bus on startup. + *3 0x08 8 Active Negation: Improves SCSI Bus noise immunity. + 4 0x10 16 Immediate return on BIOS seek command. (Not used) + (*)5 0x20 32 Check for LUNs >= 1. + + - tags + Default: 3, Acceptable values: 0-5 + + The number of tags is 1< scsi_adjust_queue_depth() | slave_alloc() - slave_configure() --> scsi_adjust_queue_depth() + slave_configure() | slave_alloc() ** slave_destroy() ** -The invocation of scsi_adjust_queue_depth() by the LLD is required -if slave_configure() is supplied. +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. @@ -179,7 +183,7 @@ scsi_add_device() ------+ | slave_alloc() - slave_configure() --> scsi_adjust_queue_depth() + slave_configure() [--> scsi_adjust_queue_depth()] [DEVICE unplug] LLD mid level LLD @@ -228,13 +232,14 @@ slave_destroy() ** | slave_alloc() - slave_configure() --> scsi_adjust_queue_depth() + slave_configure() slave_alloc() ** slave_destroy() ** -If the LLD does not supply a slave_configure() then the mid level invokes -scsi_adjust_queue_depth() itself with tagged queuing off and "cmd_per_lun" -for that host as the queue length. +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. @@ -1093,11 +1098,6 @@ * 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. - * If this function is not supplied, the mid level will call - * scsi_adjust_queue_depth() with the struct Scsi_Host::cmd_per_lun - * value on behalf of the given device. If this function is - * supplied then its implementation must call - * scsi_adjust_queue_depth(). * * Defined in: LLD **/ @@ -1277,8 +1277,9 @@ Patrick Mansfield Christoph Hellwig Doug Ledford + Andries Brouwer Douglas Gilbert dgilbert@interlog.com -19th April 2003 +29th April 2003 diff -Nru a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt --- a/Documentation/sound/alsa/ALSA-Configuration.txt Thu Mar 20 08:41:10 2003 +++ b/Documentation/sound/alsa/ALSA-Configuration.txt Sun Jun 1 11:47:52 2003 @@ -53,14 +53,9 @@ for soundcards which are not installed in your system device_mode - specifies permission mask for dynamic sound device filesystem + (available only when DEVFS is enabled) - default value = 0666 - for example 'device_mode=0660' - device_gid - - specifies GID number for dynamic sound device filesystem - - default value = 0 (root) - device_uid - - specifies UID number for dynamic sound device filesystem - - default value = 0 (root) Module snd-pcm-oss @@ -144,6 +139,7 @@ Module for ALi M5451 PCI chip. pcm_channels - Number of hardware channels assigned for PCM + spdif - Support SPDIF I/O (disabled by default) Module supports autoprobe and multiple chips (max 8). @@ -846,6 +842,20 @@ Module supports up to 8 cards. + Module snd-sscape + ----------------- + + Module for ENSONIQ SoundScape PnP cards. + + port - Port # (PnP setup) + irq - IRQ # (PnP setup) + mpu_irq - MPU-401 IRQ # (PnP setup) + dma - DMA # (PnP setup) + + Module supports up to 8 cards. ISA PnP must be enabled. + You need sscape_ctl tool in alsa-tools package for loading + the microcode. + Module snd-sun-amd7930 (on sparc only) -------------------------------------- @@ -945,19 +955,34 @@ Module snd-via82xx ------------------ - Module for AC'97 motherboards based on VIA 82C686A/686B, 8233 - (south) bridge. + Module for AC'97 motherboards based on VIA 82C686A/686B, 8233, + 8233A, 8233C, 8235 (south) bridge. mpu_port - 0x300,0x310,0x320,0x330, otherwise obtain BIOS setup + [VIA686A/686B only] ac97_clock - AC'97 codec clock base (default 48000Hz) + dxs_support - support DXS channels, + 0 = auto (default), 1 = enable, 2 = disable, + 3 = 48k only + [VIA8233/C,8235 only] Module supports autoprobe and multiple bus-master chips (max 8). + Note: on some SMP motherboards like MSI 694D the interrupts might not be generated properly. In such a case, please try to set the SMP (or MPS) version on BIOS to 1.1 instead of default value 1.4. Then the interrupt number will be assigned under 15. You might also upgrade your BIOS. + Note: VIA8233/5 (not VIA8233A) can support DXS (direct sound) + channels as the first PCM. With this device, up to 4 + streams can be played at the same time. If the playback on + this PCM is noisy, try to specify dxs_channels option to 2 + or 3. + + Note: for the MPU401 on VIA823x, use snd-mpu401 driver + additonally. + Module snd-virmidi ------------------ @@ -968,6 +993,53 @@ midi_devs - MIDI devices # (1-8, default=4) Module supports up to 8 cards. + + Module snd-vx222 + ---------------- + + Module for Digigram VX-Pocket VX222, V222 v2 and Mic cards. + + mic - Enable Microphone on V222 Mic (NYI) + + Module supports up to 8 cards. + + For loading the firmware, use vxloader utility in alsa-tools + package. You can load the firmware automatically by adding + the following to /etc/modules.conf + + post-install snd-vx222 "/usr/bin/vxload" + + Module snd-vxpocket + ------------------- + + Module for Digigram VX-Pocket VX2 PCMCIA card. + + irq_mask - IRQ bitmask, specifies the available IRQs as bits + + Module supports up to 8 cards. The module is compiled only when + PCMCIA is supported on kernel. + + To activate the driver via the card manager, you'll need to set + up /etc/pcmcia/vxpocket.conf. See the sound/pcmcia/vx/vxpocket.c. + + For loading the firmware, use vxloader utility in alsa-tools + package. + + Module snd-vxp440 + ----------------- + + Module for Digigram VX-Pocket 440 PCMCIA card. + + irq_mask - IRQ bitmask, specifies the available IRQs as bits + + Module supports up to 8 cards. The module is compiled only when + PCMCIA is supported on kernel. + + To activate the driver via the card manager, you'll need to set + up /etc/pcmcia/vxp440.conf. See the sound/pcmcia/vx/vxp440.c. + + For loading the firmware, use vxloader utility in alsa-tools + package. Module snd-ymfpci ----------------- diff -Nru a/Documentation/sound/alsa/CMIPCI.txt b/Documentation/sound/alsa/CMIPCI.txt --- a/Documentation/sound/alsa/CMIPCI.txt Tue Feb 25 05:46:04 2003 +++ b/Documentation/sound/alsa/CMIPCI.txt Wed May 21 09:51:51 2003 @@ -115,8 +115,7 @@ % aplay -Dspdif foo.wav -So far, only S16LE format is supported. Still no 24bit. Sorry, not -enough info for this. +24bit format is also supported experimentally. The playback and capture over SPDIF use normal DAC and ADC, respectively, so you cannot playback both analog and digital streams diff -Nru a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl Thu Apr 10 03:28:09 2003 +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl Tue May 20 14:12:59 2003 @@ -1538,11 +1538,12 @@ @@ -3149,8 +3150,8 @@ Interrupt Handler Case #1 lock); @@ -3160,9 +3161,11 @@ spin_unlock(&chip->lock); snd_pcm_period_elapsed(chip->substream); spin_lock(&chip->lock); + // acknowledge the interrupt if necessary } .... spin_unlock(&chip->lock); + return IRQ_HANDLED; } ]]> @@ -3191,8 +3194,8 @@ Interrupt Handler Case #2 lock); @@ -3221,9 +3224,11 @@ snd_pcm_period_elapsed(substream); spin_lock(&chip->lock); } + // acknowledge the interrupt if necessary } .... spin_unlock(&chip->lock); + return IRQ_HANDLED; } ]]> diff -Nru a/Documentation/sound/alsa/OSS-Emulation.txt b/Documentation/sound/alsa/OSS-Emulation.txt --- a/Documentation/sound/alsa/OSS-Emulation.txt Mon Jan 27 11:00:11 2003 +++ b/Documentation/sound/alsa/OSS-Emulation.txt Thu May 8 01:44:25 2003 @@ -249,7 +249,7 @@ [Volume|Switch]" will be checked in addition. The current assignment of these mixer elements is listed in the proc -file, /proc/asound/cardX/mixer_oss, which will be like the following +file, /proc/asound/cardX/oss_mixer, which will be like the following VOLUME "Master" 0 BASS "" 0 @@ -267,7 +267,7 @@ proc file. For example, to map "Wave Playback" to the PCM volume, send the command like the following: - % echo 'VOLUME "Wave Playback" 0' > /proc/asound/card0/mixer_oss + % echo 'VOLUME "Wave Playback" 0' > /proc/asound/card0/oss_mixer The command is exactly as same as listed in the proc file. You can change one or more elements, one volume per line. In the last diff -Nru a/Documentation/usb/proc_usb_info.txt b/Documentation/usb/proc_usb_info.txt --- a/Documentation/usb/proc_usb_info.txt Sun Jan 12 03:27:36 2003 +++ b/Documentation/usb/proc_usb_info.txt Fri May 30 02:36:57 2003 @@ -1,10 +1,11 @@ /proc/bus/usb filesystem output =============================== -(version 2002.03.19) +(version 2003.05.30) -The /proc filesystem for USB devices provides /proc/bus/usb/drivers -and /proc/bus/usb/devices, as well as /proc/bus/usb/BBB/DDD files. +The usbfs filesystem for USB devices is traditionally mounted at +/proc/bus/usb. It provides the /proc/bus/usb/devices file, as well as +the /proc/bus/usb/BBB/DDD files. **NOTE**: If /proc/bus/usb appears empty, and a host controller @@ -66,30 +67,6 @@ grant read/write permissions to other users by using "chmod". Also, usbfs mount options such as "devmode=0666" may be helpful. - - -THE /proc/bus/usb/drivers FILE: -------------------------------- -Each of the USB device drivers linked into your kernel (statically, -or dynamically using "modprobe") is listed in the "drivers" file. -Here's an example from one system: - - usbdevfs - hub - 0- 15: usblp - usbnet - serial - usb-storage - pegasus - -If you see this file, "usbdevfs" and "hub" will always be listed, -since those are part of the "usbcore" framework. - -Drivers that use the USB major number (180) to provide character devices -will include a range of minor numbers, as shown above for the "usblp" -(actually "printer.o") module. USB device drivers can of course use any -major number, but it's easy to use the USB range since there's explicit -support for subdividing it in the USB device driver framework. THE /proc/bus/usb/devices FILE: diff -Nru a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt --- a/Documentation/vm/hugetlbpage.txt Tue Mar 11 10:20:19 2003 +++ b/Documentation/vm/hugetlbpage.txt Wed Jun 4 00:50:35 2003 @@ -67,14 +67,21 @@ call, then it is required that system administrator mount a file system of type hugetlbfs: - mount none /mnt/huge -t hugetlbfs + mount none /mnt/huge -t hugetlbfs This command mounts a (pseudo) filesystem of type hugetlbfs on the directory -/mnt/huge. Any files created on /mnt/huge uses hugepages. An example is -given at the end of this document. +/mnt/huge. Any files created on /mnt/huge uses hugepages. The uid and gid +options sets the owner and group of the root of the file system. By default +the uid and gid of the current process are taken. The mode option sets the +mode of root of file system to value & 0777. This value is given in octal. +By default the value 0755 is picked. An example is given at the end of this +document. read and write system calls are not supported on files that reside on hugetlb file systems. + +A regular chown, chgrp and chmod commands (with right permissions) could be +used to change the file attributes on hugetlbfs. Also, it is important to note that no such mount command is required if the applications are going to use only shmat/shmget system calls. It is possible diff -Nru a/MAINTAINERS b/MAINTAINERS --- a/MAINTAINERS Sun May 25 23:18:42 2003 +++ b/MAINTAINERS Thu Jun 5 22:28:25 2003 @@ -281,6 +281,13 @@ W: http://linux-atm.sourceforge.net S: Maintained +ATMEL WIRELESS DRIVER +P: Simon Kelley +M: simon@thekelleys.org.uk +W: http://www.thekelleys.org.uk/atmel +W: http://atmelwlandriver.sourceforge.net/ +S: Maintained + AX.25 NETWORK LAYER P: Ralf Baechle M: ralf@linux-mips.org @@ -1523,6 +1530,12 @@ L: reiserfs-list@namesys.com W: http://www.namesys.com S: Supported + +ROCKETPORT DRIVER +P: Comtrol Corp. +M: support@comtrol.com +W: http://www.comtrol.com +S: Maintained ROSE NETWORK LAYER P: Ralf Baechle diff -Nru a/Makefile b/Makefile --- a/Makefile Mon May 26 17:57:52 2003 +++ b/Makefile Fri Jun 6 04:31:05 2003 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 5 SUBLEVEL = 70 -EXTRAVERSION = +EXTRAVERSION = -bk11 # *DOCUMENTATION* # To see a list of typical targets execute "make help" @@ -36,13 +36,36 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \ -e s/s390x/s390/ ) -ARCH := $(SUBARCH) # Remove hyphens since they have special meaning in RPM filenames KERNELPATH=kernel-$(subst -,,$(KERNELRELEASE)) +# Cross compiling and selecting different set of gcc/bin-utils +# --------------------------------------------------------------------------- +# +# When performing cross compilation for other architectures ARCH shall be set +# to the target architecture. (See arch/* for the possibilities). +# ARCH can be set during invocation of make: +# make ARCH=ia64 +# Another way is to have ARCH set in the environment. +# The default ARCH is the host where make is executed. + +# CROSS_COMPILE specify the prefix used for all executables used +# during compilation. Only gcc and related bin-utils executables +# are prefixed with $(CROSS_COMPILE). +# CROSS_COMPILE can be set on the command line +# make CROSS_COMPILE=ia64-linux- +# Alternatively CROSS_COMPILE can be set in the environment. +# Default value for CROSS_COMPILE is not to prefix executables +# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile + +ARCH ?= $(SUBARCH) +CROSS_COMPILE ?= + +# Architecture as present in compile.h UTS_MACHINE := $(ARCH) +# SHELL used by kbuild CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ else if [ -x /bin/bash ]; then echo /bin/bash; \ else echo sh; fi ; fi) @@ -53,7 +76,6 @@ HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer HOSTCXXFLAGS = -O2 -CROSS_COMPILE = # That's our default target when none is given on the command line # Note that 'modules' will be added as a prerequisite as well, @@ -783,25 +805,27 @@ help: @echo 'Cleaning targets:' - @echo ' clean - remove most generated files but keep the config' - @echo ' mrproper - remove all generated files + config + various backup files' + @echo ' clean - remove most generated files but keep the config' + @echo ' mrproper - remove all generated files + config + various backup files' @echo '' @echo 'Configuration targets:' - @echo ' oldconfig - Update current config utilising a line-oriented program' - @echo ' menuconfig - Update current config utilising a menu based program' - @echo ' xconfig - Update current config utilising a X-based program' - @echo ' defconfig - New config with default answer to all options' - @echo ' allmodconfig - New config selecting modules when possible' - @echo ' allyesconfig - New config where all options are accepted with yes' - @echo ' allnoconfig - New minimal config' + @echo ' oldconfig - Update current config utilising a line-oriented program' + @echo ' menuconfig - Update current config utilising a menu based program' + @echo ' xconfig - Update current config utilising a QT based front-end' + @echo ' gconfig - Update current config utilising a GTK based front-end' + @echo ' defconfig - New config with default answer to all options' + @echo ' allmodconfig - New config selecting modules when possible' + @echo ' allyesconfig - New config where all options are accepted with yes' + @echo ' allnoconfig - New minimal config' @echo '' @echo 'Other generic targets:' - @echo ' all - Build all targets marked with [*]' - @echo '* vmlinux - Build the bare kernel' - @echo '* modules - Build all modules' - @echo ' dir/file.[ois]- Build specified target only' - @echo ' rpm - Build a kernel as an RPM package' - @echo ' tags/TAGS - Generate tags file for editors' + @echo ' all - Build all targets marked with [*]' + @echo '* vmlinux - Build the bare kernel' + @echo '* modules - Build all modules' + @echo ' modules_install - Install all modules' + @echo ' dir/file.[ois] - Build specified target only' + @echo ' rpm - Build a kernel as an RPM package' + @echo ' tags/TAGS - Generate tags file for editors' @echo '' @echo 'Documentation targets:' @$(MAKE) --no-print-directory -f Documentation/DocBook/Makefile dochelp @@ -809,6 +833,9 @@ @echo 'Architecture specific targets ($(ARCH)):' @$(if $(archhelp),$(archhelp),\ echo ' No architecture specific help defined for $(ARCH)') + @echo '' + @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' + @echo ' make C=1 [targets] Check all c source with checker tool' @echo '' @echo 'Execute "make" or "make all" to build all targets marked with [*] ' @echo 'For further info browse Documentation/kbuild/*' diff -Nru a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c --- a/arch/alpha/kernel/core_marvel.c Wed May 21 11:19:03 2003 +++ b/arch/alpha/kernel/core_marvel.c Tue May 27 02:13:14 2003 @@ -980,7 +980,7 @@ } static int -marvel_agp_bind_memory(alpha_agp_info *agp, off_t pg_start, agp_memory *mem) +marvel_agp_bind_memory(alpha_agp_info *agp, off_t pg_start, struct agp_memory *mem) { struct marvel_agp_aperture *aper = agp->aperture.sysdata; return iommu_bind(aper->arena, aper->pg_start + pg_start, @@ -988,7 +988,7 @@ } static int -marvel_agp_unbind_memory(alpha_agp_info *agp, off_t pg_start, agp_memory *mem) +marvel_agp_unbind_memory(alpha_agp_info *agp, off_t pg_start, struct agp_memory *mem) { struct marvel_agp_aperture *aper = agp->aperture.sysdata; return iommu_unbind(aper->arena, aper->pg_start + pg_start, diff -Nru a/arch/alpha/kernel/core_titan.c b/arch/alpha/kernel/core_titan.c --- a/arch/alpha/kernel/core_titan.c Wed May 21 11:19:03 2003 +++ b/arch/alpha/kernel/core_titan.c Tue May 27 02:14:12 2003 @@ -679,7 +679,7 @@ } static int -titan_agp_bind_memory(alpha_agp_info *agp, off_t pg_start, agp_memory *mem) +titan_agp_bind_memory(alpha_agp_info *agp, off_t pg_start, struct agp_memory *mem) { struct titan_agp_aperture *aper = agp->aperture.sysdata; return iommu_bind(aper->arena, aper->pg_start + pg_start, @@ -687,7 +687,7 @@ } static int -titan_agp_unbind_memory(alpha_agp_info *agp, off_t pg_start, agp_memory *mem) +titan_agp_unbind_memory(alpha_agp_info *agp, off_t pg_start, struct agp_memory *mem) { struct titan_agp_aperture *aper = agp->aperture.sysdata; return iommu_unbind(aper->arena, aper->pg_start + pg_start, diff -Nru a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c --- a/arch/alpha/kernel/pci.c Fri Apr 4 12:06:45 2003 +++ b/arch/alpha/kernel/pci.c Wed May 21 08:28:01 2003 @@ -102,7 +102,7 @@ { unsigned int class = dev->class >> 8; - if (class == PCI_CLASS_BRIDGE_ISA || class == PCI_CLASS_BRIDGE_ISA) { + if (class == PCI_CLASS_BRIDGE_ISA || class == PCI_CLASS_BRIDGE_EISA) { dev->dma_mask = MAX_ISA_DMA_ADDRESS - 1; isa_bridge = dev; } diff -Nru a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c --- a/arch/alpha/kernel/ptrace.c Tue May 20 10:47:24 2003 +++ b/arch/alpha/kernel/ptrace.c Wed May 21 10:51:52 2003 @@ -366,8 +366,8 @@ ret = -EIO; if ((unsigned long) data > _NSIG) break; - /* Set single stepping. */ - ptrace_set_bpt(child); + /* Mark single stepping. */ + child->thread_info->bpt_nsaved = -1; clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); wake_up_process(child); child->exit_code = data; diff -Nru a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c --- a/arch/alpha/kernel/signal.c Mon Feb 17 00:17:26 2003 +++ b/arch/alpha/kernel/signal.c Wed May 21 11:17:01 2003 @@ -619,7 +619,10 @@ if (!oldset) oldset = ¤t->blocked; + /* This lets the debugger run, ... */ signr = get_signal_to_deliver(&info, regs, NULL); + /* ... so re-check the single stepping. */ + single_stepping |= ptrace_cancel_bpt(current); if (signr > 0) { /* Whee! Actually deliver the signal. */ diff -Nru a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c --- a/arch/alpha/kernel/smp.c Tue May 20 11:25:56 2003 +++ b/arch/alpha/kernel/smp.c Wed May 21 08:27:23 2003 @@ -417,12 +417,7 @@ /* Don't care about the contents of regs since we'll never reschedule the forked task. */ struct pt_regs regs; - int pid; - pid = do_fork(CLONE_VM|CLONE_IDLETASK, 0, ®s, 0, NULL, NULL); - if (pid < 0) - return NULL; - - return find_task_by_pid (pid); + return copy_process(CLONE_VM|CLONE_IDLETASK, 0, ®s, 0, NULL, NULL); } /* @@ -441,8 +436,10 @@ wish. We can't use kernel_thread since we must avoid rescheduling the child. */ idle = fork_by_hand(); - if (!idle) + if (IS_ERR(idle)) panic("failed fork for CPU %d", cpuid); + + wake_up_forked_process(idle); init_idle(idle, cpuid); unhash_process(idle); diff -Nru a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c --- a/arch/alpha/kernel/sys_sio.c Thu Nov 21 04:00:24 2002 +++ b/arch/alpha/kernel/sys_sio.c Wed Jun 4 07:34:25 2003 @@ -85,10 +85,10 @@ sio_collect_irq_levels(void) { unsigned int level_bits = 0; - struct pci_dev *dev; + struct pci_dev *dev = NULL; /* Iterate through the devices, collecting IRQ levels. */ - pci_for_each_dev(dev) { + while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) && (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA)) continue; diff -Nru a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S --- a/arch/alpha/kernel/systbls.S Mon Feb 17 01:04:50 2003 +++ b/arch/alpha/kernel/systbls.S Wed Jun 4 18:57:34 2003 @@ -433,6 +433,15 @@ .quad sys_set_tid_address .quad sys_restart_syscall .quad sys_fadvise64 + .quad sys_timer_create + .quad sys_timer_settime /* 415 */ + .quad sys_timer_gettime + .quad sys_timer_getoverrun + .quad sys_timer_delete + .quad sys_clock_settime + .quad sys_clock_gettime /* 420 */ + .quad sys_clock_getres + .quad sys_clock_nanosleep .size sys_call_table, . - sys_call_table .type sys_call_table, @object diff -Nru a/arch/arm/common/Makefile b/arch/arm/common/Makefile --- a/arch/arm/common/Makefile Mon Feb 3 14:19:35 2003 +++ b/arch/arm/common/Makefile Wed Jun 4 15:17:11 2003 @@ -2,7 +2,7 @@ # Makefile for the linux kernel. # -obj-$(CONFIG_SA1111) += sa1111.o sa1111-pcibuf.o sa1111-pcipool.o - +obj-y += platform.o +obj-$(CONFIG_SA1111) += sa1111.o sa1111-pcibuf.o sa1111-pcipool.o obj-$(CONFIG_PCI_HOST_PLX90X0) += plx90x0.o obj-$(CONFIG_PCI_HOST_VIA82C505) += via82c505.o diff -Nru a/arch/arm/common/platform.c b/arch/arm/common/platform.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm/common/platform.c Wed Jun 4 15:17:13 2003 @@ -0,0 +1,35 @@ +#include +#include +#include + +int __init platform_add_device(struct platform_device *dev) +{ + int i; + + for (i = 0; i < dev->num_resources; i++) { + struct resource *r = &dev->resource[i]; + + r->name = dev->dev.name; + + if (r->flags & IORESOURCE_MEM && + request_resource(&iomem_resource, r)) { + printk(KERN_ERR + "%s%d: failed to claim resource %d\n", + dev->name, dev->id, i); + break; + } + } + if (i == dev->num_resources) + platform_device_register(dev); + return 0; +} + +int __init platform_add_devices(struct platform_device **devs, int num) +{ + int i; + + for (i = 0; i < num; i++) + platform_add_device(devs[i]); + + return 0; +} diff -Nru a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c --- a/arch/arm/common/sa1111.c Mon May 12 19:06:25 2003 +++ b/arch/arm/common/sa1111.c Wed Jun 4 15:17:11 2003 @@ -42,7 +42,7 @@ */ struct sa1111 { struct device *dev; - struct resource res; + unsigned long phys; int irq; spinlock_t lock; void *base; @@ -60,7 +60,6 @@ }, .skpcr_mask = SKPCR_UCLKEN, .devid = SA1111_DEVID_USB, - .dma_mask = 0xffffffffLL, .irq = { IRQ_USBPWR, IRQ_HCIM, @@ -470,6 +469,17 @@ #ifdef CONFIG_ARCH_SA1100 +static u32 sa1111_dma_mask[] = { + ~0, + ~(1 << 20), + ~(1 << 23), + ~(1 << 24), + ~(1 << 25), + ~(1 << 20), + ~(1 << 20), + 0, +}; + /* * Configure the SA1111 shared memory controller. */ @@ -483,26 +493,43 @@ smcr |= SMCR_CLAT; sa1111_writel(smcr, sachip->base + SA1111_SMCR); + + /* + * Now clear the bits in the DMA mask to work around the SA1111 + * DMA erratum (Intel StrongARM SA-1111 Microprocessor Companion + * Chip Specification Update, June 2000, Erratum #7). + */ + if (sachip->dev->dma_mask) + *sachip->dev->dma_mask &= sa1111_dma_mask[drac >> 2]; } #endif static void -sa1111_init_one_child(struct sa1111 *sachip, struct sa1111_dev *sadev, unsigned int offset) +sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, + struct sa1111_dev *sadev, unsigned int offset) { snprintf(sadev->dev.bus_id, sizeof(sadev->dev.bus_id), "%4.4x", offset); + /* + * If the parent device has a DMA mask associated with it, + * propagate it down to the children. + */ + if (sachip->dev->dma_mask) { + sadev->dma_mask = *sachip->dev->dma_mask; + sadev->dev.dma_mask = &sadev->dma_mask; + } + sadev->dev.parent = sachip->dev; sadev->dev.bus = &sa1111_bus_type; - sadev->dev.dma_mask = &sadev->dma_mask; - sadev->res.start = sachip->res.start + offset; + sadev->res.start = sachip->phys + offset; sadev->res.end = sadev->res.start + 511; sadev->res.name = sadev->dev.name; sadev->res.flags = IORESOURCE_MEM; sadev->mapbase = sachip->base + offset; - if (request_resource(&sachip->res, &sadev->res)) { + if (request_resource(parent, &sadev->res)) { printk("SA1111: failed to allocate resource for %s\n", sadev->res.name); return; @@ -524,7 +551,7 @@ * %0 successful. */ static int __init -__sa1111_probe(struct device *me, unsigned long phys_addr, int irq) +__sa1111_probe(struct device *me, struct resource *mem, int irq) { struct sa1111 *sachip; unsigned long id; @@ -542,24 +569,17 @@ sachip->dev = me; dev_set_drvdata(sachip->dev, sachip); - sachip->res.name = me->name; - sachip->res.start = phys_addr; - sachip->res.end = phys_addr + 0x2000; + sachip->phys = mem->start; sachip->irq = irq; - if (request_resource(&iomem_resource, &sachip->res)) { - ret = -EBUSY; - goto out; - } - /* * Map the whole region. This also maps the * registers for our children. */ - sachip->base = ioremap(phys_addr, PAGE_SIZE * 2); + sachip->base = ioremap(mem->start, PAGE_SIZE * 2); if (!sachip->base) { ret = -ENOMEM; - goto release; + goto out; } /* @@ -611,9 +631,11 @@ * The interrupt controller must be initialised before any * other device to ensure that the interrupts are available. */ - int_dev.irq[0] = irq; - sa1111_init_one_child(sachip, &int_dev, SA1111_INTC); - sa1111_init_irq(&int_dev); + if (irq != NO_IRQ) { + int_dev.irq[0] = irq; + sa1111_init_one_child(sachip, mem, &int_dev, SA1111_INTC); + sa1111_init_irq(&int_dev); + } g_sa1111 = sachip; @@ -626,14 +648,12 @@ for (i = 0; i < ARRAY_SIZE(devs); i++) if (has_devs & (1 << i)) - sa1111_init_one_child(sachip, devs[i], dev_offset[i]); + sa1111_init_one_child(sachip, mem, devs[i], dev_offset[i]); return 0; unmap: iounmap(sachip->base); - release: - release_resource(&sachip->res); out: kfree(sachip); return ret; @@ -649,7 +669,6 @@ } iounmap(sachip->base); - release_resource(&sachip->res); kfree(sachip); } @@ -874,7 +893,17 @@ static int sa1111_probe(struct device *dev) { - return -ENODEV; + struct platform_device *pdev = to_platform_device(dev); + struct resource *mem = NULL, *irq = NULL; + int i; + + for (i = 0; i < pdev->num_resources; i++) { + if (pdev->resource[i].flags & IORESOURCE_MEM) + mem = &pdev->resource[i]; + if (pdev->resource[i].flags & IORESOURCE_IRQ) + irq = &pdev->resource[i]; + } + return __sa1111_probe(dev, mem, irq ? irq->start : NO_IRQ); } static int sa1111_remove(struct device *dev) @@ -903,7 +932,7 @@ */ static struct device_driver sa1111_device_driver = { .name = "sa1111", - .bus = &system_bus_type, + .bus = &platform_bus_type, .probe = sa1111_probe, .remove = sa1111_remove, .suspend = sa1111_suspend, @@ -920,29 +949,6 @@ } arch_initcall(sa1111_driver_init); - -static struct sys_device sa1111_device = { - .name = "SA1111", - .id = 0, - .root = NULL, - .dev = { - .name = "Intel Corporation SA1111", - .driver = &sa1111_device_driver, - }, -}; - -int sa1111_init(unsigned long phys, unsigned int irq) -{ - int ret; - - snprintf(sa1111_device.dev.bus_id, sizeof(sa1111_device.dev.bus_id), "%8.8lx", phys); - - ret = sys_device_register(&sa1111_device); - if (ret) - printk("sa1111 device_register failed: %d\n", ret); - - return __sa1111_probe(&sa1111_device.dev, phys, irq); -} /* * Get the parent device driver (us) structure diff -Nru a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c --- a/arch/arm/kernel/bios32.c Tue Mar 18 13:42:00 2003 +++ b/arch/arm/kernel/bios32.c Wed Jun 4 07:34:26 2003 @@ -22,9 +22,9 @@ void pcibios_report_status(u_int status_mask, int warn) { - struct pci_dev *dev; + struct pci_dev *dev = NULL; - pci_for_each_dev(dev) { + while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { u16 status; /* diff -Nru a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c --- a/arch/arm/kernel/process.c Sun Apr 27 07:37:26 2003 +++ b/arch/arm/kernel/process.c Wed Jun 4 06:42:27 2003 @@ -239,7 +239,7 @@ #define ll_alloc_task_struct() ((struct thread_info *) __get_free_pages(GFP_KERNEL,1)) #define ll_free_task_struct(p) free_pages((unsigned long)(p),1) -struct thread_info *alloc_thread_info(void) +struct thread_info *alloc_thread_info(struct task_struct *task) { struct thread_info *thread = NULL; diff -Nru a/arch/arm/lib/putuser.S b/arch/arm/lib/putuser.S --- a/arch/arm/lib/putuser.S Sat Feb 16 11:00:42 2002 +++ b/arch/arm/lib/putuser.S Wed May 28 06:17:24 2003 @@ -31,11 +31,11 @@ .global __put_user_1 __put_user_1: - bic r2, sp, #0x1f00 - bic r2, r2, #0x00ff - ldr r2, [r2, #TI_ADDR_LIMIT] - sub r2, r2, #1 - cmp r0, r2 + bic ip, sp, #0x1f00 + bic ip, ip, #0x00ff + ldr ip, [ip, #TI_ADDR_LIMIT] + sub ip, ip, #1 + cmp r0, ip 1: strlsbt r1, [r0] movls r0, #0 movls pc, lr @@ -43,17 +43,17 @@ .global __put_user_2 __put_user_2: - bic r2, sp, #0x1f00 - bic r2, r2, #0x00ff - ldr r2, [r2, #TI_ADDR_LIMIT] - sub r2, r2, #2 - cmp r0, r2 - movls r2, r1, lsr #8 + bic ip, sp, #0x1f00 + bic ip, ip, #0x00ff + ldr ip, [ip, #TI_ADDR_LIMIT] + sub ip, ip, #2 + cmp r0, ip + movls ip, r1, lsr #8 #ifndef __ARMEB__ 2: strlsbt r1, [r0], #1 -3: strlsbt r2, [r0] +3: strlsbt ip, [r0] #else -2: strlsbt r2, [r0], #1 +2: strlsbt ip, [r0], #1 3: strlsbt r1, [r0] #endif movls r0, #0 @@ -62,11 +62,11 @@ .global __put_user_4 __put_user_4: - bic r2, sp, #0x1f00 - bic r2, r2, #0x00ff - ldr r2, [r2, #TI_ADDR_LIMIT] - sub r2, r2, #4 - cmp r0, r2 + bic ip, sp, #0x1f00 + bic ip, ip, #0x00ff + ldr ip, [ip, #TI_ADDR_LIMIT] + sub ip, ip, #4 + cmp r0, ip 4: strlst r1, [r0] movls r0, #0 movls pc, lr diff -Nru a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c --- a/arch/arm/mach-footbridge/isa-irq.c Tue Feb 11 15:05:29 2003 +++ b/arch/arm/mach-footbridge/isa-irq.c Wed Jun 4 02:20:01 2003 @@ -84,10 +84,6 @@ .unmask = isa_unmask_pic_hi_irq, }; -static void no_action(int irq, void *dev_id, struct pt_regs *regs) -{ -} - static void isa_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) { diff -Nru a/arch/arm/mach-integrator/Makefile b/arch/arm/mach-integrator/Makefile --- a/arch/arm/mach-integrator/Makefile Thu Mar 6 08:48:28 2003 +++ b/arch/arm/mach-integrator/Makefile Wed Jun 4 15:54:24 2003 @@ -4,10 +4,7 @@ # Object file lists. -obj-y := arch.o irq.o mm.o time.o -obj-m := -obj-n := -obj- := +obj-y := core.o time.o obj-$(CONFIG_LEDS) += leds.o obj-$(CONFIG_PCI) += pci_v3.o pci.o diff -Nru a/arch/arm/mach-integrator/arch.c b/arch/arm/mach-integrator/arch.c --- a/arch/arm/mach-integrator/arch.c Sun Nov 17 07:31:10 2002 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,40 +0,0 @@ -/* - * linux/arch/arm/mach-integrator/arch.c - * - * Copyright (C) 2000 Deep Blue Solutions Ltd - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * 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 - */ -#include -#include -#include - -#include -#include -#include -#include - -#include - -extern void integrator_map_io(void); -extern void integrator_init_irq(void); - -MACHINE_START(INTEGRATOR, "ARM-Integrator") - MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") - BOOT_MEM(0x00000000, 0x16000000, 0xf1600000) - BOOT_PARAMS(0x00000100) - MAPIO(integrator_map_io) - INITIRQ(integrator_init_irq) -MACHINE_END diff -Nru a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm/mach-integrator/core.c Wed Jun 4 15:54:24 2003 @@ -0,0 +1,135 @@ +/* + * linux/arch/arm/mach-integrator/arch.c + * + * Copyright (C) 2000 Deep Blue Solutions Ltd + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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 + */ +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +/* + * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx + * is the (PA >> 12). + * + * Setup a VA for the Integrator interrupt controller (for header #0, + * just for now). + */ +#define VA_IC_BASE IO_ADDRESS(INTEGRATOR_IC_BASE) +#define VA_CMIC_BASE IO_ADDRESS(INTEGRATOR_HDR_BASE) + INTEGRATOR_HDR_IC_OFFSET + +/* + * Logical Physical + * e8000000 40000000 PCI memory PHYS_PCI_MEM_BASE (max 512M) + * ec000000 61000000 PCI config space PHYS_PCI_CONFIG_BASE (max 16M) + * ed000000 62000000 PCI V3 regs PHYS_PCI_V3_BASE (max 64k) + * ee000000 60000000 PCI IO PHYS_PCI_IO_BASE (max 16M) + * ef000000 Cache flush + * f1000000 10000000 Core module registers + * f1100000 11000000 System controller registers + * f1200000 12000000 EBI registers + * f1300000 13000000 Counter/Timer + * f1400000 14000000 Interrupt controller + * f1500000 15000000 RTC + * f1600000 16000000 UART 0 + * f1700000 17000000 UART 1 + * f1a00000 1a000000 Debug LEDs + * f1b00000 1b000000 GPIO + */ + +static struct map_desc integrator_io_desc[] __initdata = { + { IO_ADDRESS(INTEGRATOR_HDR_BASE), INTEGRATOR_HDR_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_SC_BASE), INTEGRATOR_SC_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_EBI_BASE), INTEGRATOR_EBI_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_CT_BASE), INTEGRATOR_CT_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_IC_BASE), INTEGRATOR_IC_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_RTC_BASE), INTEGRATOR_RTC_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_UART0_BASE), INTEGRATOR_UART0_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_UART1_BASE), INTEGRATOR_UART1_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_DBG_BASE), INTEGRATOR_DBG_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_GPIO_BASE), INTEGRATOR_GPIO_BASE, SZ_4K, MT_DEVICE }, + { PCI_MEMORY_VADDR, PHYS_PCI_MEM_BASE, SZ_16M, MT_DEVICE }, + { PCI_CONFIG_VADDR, PHYS_PCI_CONFIG_BASE, SZ_16M, MT_DEVICE }, + { PCI_V3_VADDR, PHYS_PCI_V3_BASE, SZ_64K, MT_DEVICE }, + { PCI_IO_VADDR, PHYS_PCI_IO_BASE, SZ_64K, MT_DEVICE } +}; + +static void __init integrator_map_io(void) +{ + iotable_init(integrator_io_desc, ARRAY_SIZE(integrator_io_desc)); +} + +#define ALLPCI ( (1 << IRQ_PCIINT0) | (1 << IRQ_PCIINT1) | (1 << IRQ_PCIINT2) | (1 << IRQ_PCIINT3) ) + +static void sc_mask_irq(unsigned int irq) +{ + writel(1 << irq, VA_IC_BASE + IRQ_ENABLE_CLEAR); +} + +static void sc_unmask_irq(unsigned int irq) +{ + writel(1 << irq, VA_IC_BASE + IRQ_ENABLE_SET); +} + +static struct irqchip sc_chip = { + .ack = sc_mask_irq, + .mask = sc_mask_irq, + .unmask = sc_unmask_irq, +}; + +static void __init integrator_init_irq(void) +{ + unsigned int i; + + /* Disable all interrupts initially. */ + /* Do the core module ones */ + writel(-1, VA_CMIC_BASE + IRQ_ENABLE_CLEAR); + + /* do the header card stuff next */ + writel(-1, VA_IC_BASE + IRQ_ENABLE_CLEAR); + writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR); + + for (i = 0; i < NR_IRQS; i++) { + if (((1 << i) && INTEGRATOR_SC_VALID_INT) != 0) { + set_irq_chip(i, &sc_chip); + set_irq_handler(i, do_level_IRQ); + set_irq_flags(i, IRQF_VALID | IRQF_PROBE); + } + } +} + +MACHINE_START(INTEGRATOR, "ARM-Integrator") + MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") + BOOT_MEM(0x00000000, 0x16000000, 0xf1600000) + BOOT_PARAMS(0x00000100) + MAPIO(integrator_map_io) + INITIRQ(integrator_init_irq) +MACHINE_END diff -Nru a/arch/arm/mach-integrator/irq.c b/arch/arm/mach-integrator/irq.c --- a/arch/arm/mach-integrator/irq.c Sun Apr 27 09:08:24 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,76 +0,0 @@ -/* - * linux/arch/arm/mach-integrator/irq.c - * - * Copyright (C) 1999 ARM Limited - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include -#include - -#include -#include -#include - -#include - -/* - * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx - * is the (PA >> 12). - * - * Setup a VA for the Integrator interrupt controller (for header #0, - * just for now). - */ -#define VA_IC_BASE IO_ADDRESS(INTEGRATOR_IC_BASE) -#define VA_CMIC_BASE IO_ADDRESS(INTEGRATOR_HDR_BASE) + INTEGRATOR_HDR_IC_OFFSET - -#define ALLPCI ( (1 << IRQ_PCIINT0) | (1 << IRQ_PCIINT1) | (1 << IRQ_PCIINT2) | (1 << IRQ_PCIINT3) ) - -static void sc_mask_irq(unsigned int irq) -{ - __raw_writel(1 << irq, VA_IC_BASE + IRQ_ENABLE_CLEAR); -} - -static void sc_unmask_irq(unsigned int irq) -{ - __raw_writel(1 << irq, VA_IC_BASE + IRQ_ENABLE_SET); -} - -static struct irqchip sc_chip = { - .ack = sc_mask_irq, - .mask = sc_mask_irq, - .unmask = sc_unmask_irq, -}; - -void __init integrator_init_irq(void) -{ - unsigned int i; - - /* Disable all interrupts initially. */ - /* Do the core module ones */ - __raw_writel(-1, VA_CMIC_BASE + IRQ_ENABLE_CLEAR); - - /* do the header card stuff next */ - __raw_writel(-1, VA_IC_BASE + IRQ_ENABLE_CLEAR); - __raw_writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR); - - for (i = 0; i < NR_IRQS; i++) { - if (((1 << i) && INTEGRATOR_SC_VALID_INT) != 0) { - set_irq_chip(i, &sc_chip); - set_irq_handler(i, do_level_IRQ); - set_irq_flags(i, IRQF_VALID | IRQF_PROBE); - } - } -} diff -Nru a/arch/arm/mach-integrator/mm.c b/arch/arm/mach-integrator/mm.c --- a/arch/arm/mach-integrator/mm.c Tue May 13 09:30:31 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,70 +0,0 @@ -/* - * linux/arch/arm/mach-integrator/mm.c - * - * Extra MM routines for the ARM Integrator board - * - * Copyright (C) 1999,2000 Arm Limited - * Copyright (C) 2000 Deep Blue Solutions Ltd - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * 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 - */ -#include -#include - -#include -#include - -#include - -/* - * Logical Physical - * e8000000 40000000 PCI memory PHYS_PCI_MEM_BASE (max 512M) - * ec000000 61000000 PCI config space PHYS_PCI_CONFIG_BASE (max 16M) - * ed000000 62000000 PCI V3 regs PHYS_PCI_V3_BASE (max 64k) - * ee000000 60000000 PCI IO PHYS_PCI_IO_BASE (max 16M) - * ef000000 Cache flush - * f1000000 10000000 Core module registers - * f1100000 11000000 System controller registers - * f1200000 12000000 EBI registers - * f1300000 13000000 Counter/Timer - * f1400000 14000000 Interrupt controller - * f1500000 15000000 RTC - * f1600000 16000000 UART 0 - * f1700000 17000000 UART 1 - * f1a00000 1a000000 Debug LEDs - * f1b00000 1b000000 GPIO - */ - -static struct map_desc integrator_io_desc[] __initdata = { - { IO_ADDRESS(INTEGRATOR_HDR_BASE), INTEGRATOR_HDR_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_SC_BASE), INTEGRATOR_SC_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_EBI_BASE), INTEGRATOR_EBI_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_CT_BASE), INTEGRATOR_CT_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_IC_BASE), INTEGRATOR_IC_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_RTC_BASE), INTEGRATOR_RTC_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_UART0_BASE), INTEGRATOR_UART0_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_UART1_BASE), INTEGRATOR_UART1_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_DBG_BASE), INTEGRATOR_DBG_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_GPIO_BASE), INTEGRATOR_GPIO_BASE, SZ_4K, MT_DEVICE }, - { PCI_MEMORY_VADDR, PHYS_PCI_MEM_BASE, SZ_16M, MT_DEVICE }, - { PCI_CONFIG_VADDR, PHYS_PCI_CONFIG_BASE, SZ_16M, MT_DEVICE }, - { PCI_V3_VADDR, PHYS_PCI_V3_BASE, SZ_64K, MT_DEVICE }, - { PCI_IO_VADDR, PHYS_PCI_IO_BASE, SZ_64K, MT_DEVICE } -}; - -void __init integrator_map_io(void) -{ - iotable_init(integrator_io_desc, ARRAY_SIZE(integrator_io_desc)); -} diff -Nru a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c --- a/arch/arm/mach-integrator/pci_v3.c Fri Feb 7 00:20:34 2003 +++ b/arch/arm/mach-integrator/pci_v3.c Wed Jun 4 02:21:01 2003 @@ -441,7 +441,7 @@ return 1; } -static void v3_irq(int irq, void *devid, struct pt_regs *regs) +static irqreturn_t v3_irq(int irq, void *devid, struct pt_regs *regs) { #ifdef CONFIG_DEBUG_LL unsigned long pc = instruction_pointer(regs); @@ -469,6 +469,7 @@ printascii(buf); } #endif + return IRQ_HANDLED; } int __init pci_v3_setup(int nr, struct pci_sys_data *sys) diff -Nru a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c --- a/arch/arm/mach-pxa/lubbock.c Thu May 1 15:07:26 2003 +++ b/arch/arm/mach-pxa/lubbock.c Wed Jun 4 15:17:11 2003 @@ -88,9 +88,36 @@ set_irq_type(IRQ_GPIO(0), IRQT_FALLING); } +static struct resource sa1111_resources[] = { + [0] = { + .start = 0x10000000, + .end = 0x10001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = LUBBOCK_SA1111_IRQ, + .end = LUBBOCK_SA1111_IRQ, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &sa1111_device, +}; + static int __init lubbock_init(void) { - return sa1111_init(0x10000000, LUBBOCK_SA1111_IRQ); + return platform_add_devices(devices, ARRAY_SIZE(devices)); } subsys_initcall(lubbock_init); diff -Nru a/arch/arm/mach-sa1100/adsbitsy.c b/arch/arm/mach-sa1100/adsbitsy.c --- a/arch/arm/mach-sa1100/adsbitsy.c Sun Nov 17 07:31:12 2002 +++ b/arch/arm/mach-sa1100/adsbitsy.c Wed Jun 4 15:17:11 2003 @@ -27,6 +27,36 @@ #include "generic.h" +static struct resource sa1111_resources[] = { + [0] = { + .start = 0x18000000, + .end = 0x18001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_GPIO0, + .end = IRQ_GPIO0, + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 sa1111_dmamask = 0xffffffffUL; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + .dma_mask = &sa1111_dmamask, + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &sa1111_device, +}; + static int __init adsbitsy_init(void) { int ret; @@ -50,7 +80,7 @@ /* * Probe for SA1111. */ - ret = sa1111_init(0x18000000, IRQ_GPIO0); + ret = platform_add_devices(devices, ARRAY_SIZE(devices)); if (ret < 0) return ret; diff -Nru a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c --- a/arch/arm/mach-sa1100/badge4.c Wed Nov 13 17:07:17 2002 +++ b/arch/arm/mach-sa1100/badge4.c Wed Jun 4 15:17:11 2003 @@ -35,6 +35,36 @@ #include "generic.h" +static struct resource sa1111_resources[] = { + [0] = { + .start = BADGE4_SA1111_BASE, + .end = BADGE4_SA1111_BASE + 0x00001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = BADGE4_IRQ_GPIO_SA1111, + .end = BADGE4_IRQ_GPIO_SA1111, + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 sa1111_dmamask = 0xffffffffUL; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + .dma_mask = &sa1111_dmamask; + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &sa1111_device, +}; + static int __init badge4_sa1111_init(void) { /* @@ -46,7 +76,7 @@ /* * Probe for SA1111. */ - return sa1111_init(BADGE4_SA1111_BASE, BADGE4_IRQ_GPIO_SA1111); + return platform_add_devices(devices, ARRAY_SIZE(devices)); } diff -Nru a/arch/arm/mach-sa1100/dma.c b/arch/arm/mach-sa1100/dma.c --- a/arch/arm/mach-sa1100/dma.c Sun Nov 17 07:31:12 2002 +++ b/arch/arm/mach-sa1100/dma.c Wed Jun 4 02:23:07 2003 @@ -42,7 +42,7 @@ static spinlock_t dma_list_lock; -static void dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs) { dma_regs_t *dma_regs = dev_id; sa1100_dma_t *dma = dma_chan + (((u_int)dma_regs >> 5) & 7); @@ -60,6 +60,7 @@ if (status & DCSR_DONEB) dma->callback(dma->data); } + return IRQ_HANDLED; } diff -Nru a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c --- a/arch/arm/mach-sa1100/generic.c Thu Mar 6 12:25:44 2003 +++ b/arch/arm/mach-sa1100/generic.c Wed Jun 4 15:17:11 2003 @@ -16,11 +16,13 @@ #include #include #include +#include #include #include #include #include +#include #include "generic.h" @@ -128,13 +130,88 @@ PMCR = PMCR_SF; } +static struct resource sa11x0udc_resources[] = { + [0] = { + .start = 0x80000000, + .end = 0x8000ffff, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device sa11x0udc_device = { + .name = "sa11x0-udc", + .id = 0, + .dev = { + .name = "Intel Corporation SA11x0 [UDC]", + }, + .num_resources = ARRAY_SIZE(sa11x0udc_resources), + .resource = sa11x0udc_resources, +}; + +static struct resource sa11x0mcp_resources[] = { + [0] = { + .start = 0x80060000, + .end = 0x8006ffff, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device sa11x0mcp_device = { + .name = "sa11x0-mcp", + .id = 0, + .dev = { + .name = "Intel Corporation SA11x0 [MCP]", + }, + .num_resources = ARRAY_SIZE(sa11x0mcp_resources), + .resource = sa11x0mcp_resources, +}; + +static struct resource sa11x0fb_resources[] = { + [0] = { + .start = 0xb0100000, + .end = 0xb010ffff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_LCD, + .end = IRQ_LCD, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device sa11x0fb_device = { + .name = "sa11x0-fb", + .id = 0, + .dev = { + .name = "Intel Corporation SA11x0 [LCD]", + }, + .num_resources = ARRAY_SIZE(sa11x0fb_resources), + .resource = sa11x0fb_resources, +}; + +static struct platform_device sa11x0pcmcia_device = { + .name = "sa11x0-pcmcia", + .id = 0, + .dev = { + .name = "Intel Corporation SA11x0 [PCMCIA]", + }, +}; + +static struct platform_device *sa11x0_devices[] __initdata = { + &sa11x0udc_device, + &sa11x0mcp_device, + &sa11x0pcmcia_device, + &sa11x0fb_device, +}; + static int __init sa1100_init(void) { pm_power_off = sa1100_power_off; - return 0; + + return platform_add_devices(sa11x0_devices, ARRAY_SIZE(sa11x0_devices)); } -core_initcall(sa1100_init); +arch_initcall(sa1100_init); void (*sa1100fb_backlight_power)(int on); void (*sa1100fb_lcd_power)(int on); diff -Nru a/arch/arm/mach-sa1100/graphicsmaster.c b/arch/arm/mach-sa1100/graphicsmaster.c --- a/arch/arm/mach-sa1100/graphicsmaster.c Sun Nov 17 07:31:12 2002 +++ b/arch/arm/mach-sa1100/graphicsmaster.c Wed Jun 4 15:17:12 2003 @@ -24,6 +24,36 @@ #include "generic.h" +static struct resource sa1111_resources[] = { + [0] = { + .start = 0x18000000, + .end = 0x18001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = ADS_EXT_IRQ(0), + .end = ADS_EXT_IRQ(0), + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 sa1111_dmamask = 0xffffffffUL; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + .dma_mask = &sa1111_dmamask, + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &sa1111_device, +}; + static int __init graphicsmaster_init(void) { int ret; @@ -40,7 +70,7 @@ /* * Probe for SA1111. */ - ret = sa1111_init(0x18000000, ADS_EXT_IRQ(0)); + ret = platform_add_devices(devices, ARRAY_SIZE(devices)); if (ret < 0) return ret; diff -Nru a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c --- a/arch/arm/mach-sa1100/jornada720.c Wed Jan 1 02:47:00 2003 +++ b/arch/arm/mach-sa1100/jornada720.c Wed Jun 4 15:17:12 2003 @@ -24,6 +24,36 @@ #define JORTUCR_VAL 0x20000400 +static struct resource sa1111_resources[] = { + [0] = { + .start = 0x40000000, + .end = 0x40001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_GPIO1, + .end = IRQ_GPIO1, + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 sa1111_dmamask = 0xffffffffUL; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + .dma_mask = &sa1111_dmamask, + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &sa1111_device, +}; + static int __init jornada720_init(void) { int ret = -ENODEV; @@ -43,7 +73,7 @@ PPSR &= ~(PPC_LDD3 | PPC_LDD4); PPDR |= PPC_LDD3 | PPC_LDD4; - ret = sa1111_init(0x40000000, IRQ_GPIO1); + ret = platform_add_devices(devices, ARRAY_SIZE(devices)); } return ret; } diff -Nru a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c --- a/arch/arm/mach-sa1100/neponset.c Wed Jan 1 06:44:14 2003 +++ b/arch/arm/mach-sa1100/neponset.c Wed Jun 4 15:17:12 2003 @@ -79,33 +79,6 @@ } } -static inline void __init neponset_init_irq(void) -{ - /* - * Install handler for GPIO25. - */ - set_irq_type(IRQ_GPIO25, IRQT_RISING); - set_irq_chained_handler(IRQ_GPIO25, neponset_irq_handler); - - /* - * We would set IRQ_GPIO25 to be a wake-up IRQ, but - * unfortunately something on the Neponset activates - * this IRQ on sleep (ethernet?) - */ -#if 0 - enable_irq_wake(IRQ_GPIO25); -#endif - - /* - * Setup other Neponset IRQs. SA1111 will be done by the - * generic SA1111 code. - */ - set_irq_handler(IRQ_NEPONSET_SMC9196, do_simple_IRQ); - set_irq_flags(IRQ_NEPONSET_SMC9196, IRQF_VALID | IRQF_PROBE); - set_irq_handler(IRQ_NEPONSET_USAR, do_simple_IRQ); - set_irq_flags(IRQ_NEPONSET_USAR, IRQF_VALID | IRQF_PROBE); -} - static void neponset_set_mctrl(struct uart_port *port, u_int mctrl) { u_int mdm_ctl0 = MDM_CTL_0; @@ -164,6 +137,42 @@ .get_mctrl = neponset_get_mctrl, }; +static int neponset_probe(struct device *dev) +{ + sa1100_register_uart_fns(&neponset_port_fns); + + /* + * Install handler for GPIO25. + */ + set_irq_type(IRQ_GPIO25, IRQT_RISING); + set_irq_chained_handler(IRQ_GPIO25, neponset_irq_handler); + + /* + * We would set IRQ_GPIO25 to be a wake-up IRQ, but + * unfortunately something on the Neponset activates + * this IRQ on sleep (ethernet?) + */ +#if 0 + enable_irq_wake(IRQ_GPIO25); +#endif + + /* + * Setup other Neponset IRQs. SA1111 will be done by the + * generic SA1111 code. + */ + set_irq_handler(IRQ_NEPONSET_SMC9196, do_simple_IRQ); + set_irq_flags(IRQ_NEPONSET_SMC9196, IRQF_VALID | IRQF_PROBE); + set_irq_handler(IRQ_NEPONSET_USAR, do_simple_IRQ); + set_irq_flags(IRQ_NEPONSET_USAR, IRQF_VALID | IRQF_PROBE); + + /* + * Disable GPIO 0/1 drivers so the buttons work on the module. + */ + NCR_0 = NCR_GP01_OFF; + + return 0; +} + /* * LDM power management. */ @@ -201,27 +210,63 @@ static struct device_driver neponset_device_driver = { .name = "neponset", - .bus = &system_bus_type, + .bus = &platform_bus_type, + .probe = neponset_probe, .suspend = neponset_suspend, .resume = neponset_resume, }; -static struct sys_device neponset_device = { - .name = "NEPONSET", +static struct resource neponset_resources[] = { + [0] = { + .start = 0x10000000, + .end = 0x17ffffff, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device neponset_device = { + .name = "neponset", .id = 0, - .root = NULL, .dev = { .name = "Neponset", - .bus_id = "neponset", - .bus = &system_bus_type, - .driver = &neponset_device_driver, + }, + .num_resources = ARRAY_SIZE(neponset_resources), + .resource = neponset_resources, +}; + +static struct resource sa1111_resources[] = { + [0] = { + .start = 0x40000000, + .end = 0x40001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_NEPONSET_SA1111, + .end = IRQ_NEPONSET_SA1111, + .flags = IORESOURCE_IRQ, }, }; +static u64 sa1111_dmamask = 0xffffffffUL; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + .dma_mask = &sa1111_dmamask, + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &neponset_device, + &sa1111_device, +}; + static int __init neponset_init(void) { - int ret; - driver_register(&neponset_device_driver); /* @@ -248,29 +293,7 @@ return -ENODEV; } - ret = sys_device_register(&neponset_device); - if (ret) - return ret; - - sa1100_register_uart_fns(&neponset_port_fns); - - neponset_init_irq(); - - /* - * Disable GPIO 0/1 drivers so the buttons work on the module. - */ - NCR_0 = NCR_GP01_OFF; - - /* - * Neponset has SA1111 connected to CS4. We know that after - * reset the chip will be configured for variable latency IO. - */ - /* FIXME: setup MSC2 */ - - /* - * Probe and initialise the SA1111. - */ - return sa1111_init(0x40000000, IRQ_NEPONSET_SA1111); + return platform_add_devices(devices, ARRAY_SIZE(devices)); } subsys_initcall(neponset_init); diff -Nru a/arch/arm/mach-sa1100/pfs168.c b/arch/arm/mach-sa1100/pfs168.c --- a/arch/arm/mach-sa1100/pfs168.c Mon Sep 30 13:03:55 2002 +++ b/arch/arm/mach-sa1100/pfs168.c Wed Jun 4 15:17:12 2003 @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -18,6 +19,35 @@ #include "generic.h" +static struct resource sa1111_resources[] = { + [0] = { + .start = 0x40000000, + .end = 0x40001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_GPIO25, + .end = IRQ_GPIO25, + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 sa1111_dmamask = 0xffffffffUL; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + .dma_mask = &sa1111_dmamask, + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &sa1111_device, +}; static int __init pfs168_init(void) { @@ -32,10 +62,7 @@ */ sa1110_mb_disable(); - /* - * Probe for SA1111. - */ - return sa1111_init(0x40000000, IRQ_GPIO25); + return platform_add_devices(devices, ARRAY_SIZE(devices)); } arch_initcall(pfs168_init); diff -Nru a/arch/arm/mach-sa1100/system3.c b/arch/arm/mach-sa1100/system3.c --- a/arch/arm/mach-sa1100/system3.c Thu Mar 6 08:48:29 2003 +++ b/arch/arm/mach-sa1100/system3.c Wed Jun 4 15:17:12 2003 @@ -373,6 +373,36 @@ } } +static struct resource sa1111_resources[] = { + [0] = { + .start = PT_SA1111_BASE, + .end = PT_SA1111_BASE + 0x00001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_SYSTEM3_SA1111, + .end = IRQ_SYSTEM3_SA1111, + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 sa1111_dmamask = 0xffffffffUL; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + .dma_mask = &sa1111_dmamask, + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &sa1111_device, +}; + static int __init system3_init(void) { int ret = 0; @@ -405,7 +435,7 @@ /* * Probe for a SA1111. */ - ret = sa1111_init(PT_SA1111_BASE, IRQ_SYSTEM3_SA1111); + ret = platform_add_devices(devices, ARRAY_SIZE(devices)); if (ret < 0) { printk( KERN_WARNING"PT Digital Board: no SA1111 found!\n" ); goto DONE; diff -Nru a/arch/arm/mach-sa1100/xp860.c b/arch/arm/mach-sa1100/xp860.c --- a/arch/arm/mach-sa1100/xp860.c Thu Feb 6 11:28:41 2003 +++ b/arch/arm/mach-sa1100/xp860.c Wed Jun 4 15:17:12 2003 @@ -30,6 +30,31 @@ while(1); } +static struct resource sa1111_resources[] = { + [0] = { + .start = 0x40000000, + .end = 0x40001fff, + .flags = IORESOURCE_MEM, + }, +}; + +static u64 sa1111_dmamask = 0xffffffffUL; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + .dma_mask = &sa1111_dmamask, + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &sa1111_device, +}; + /* * Note: I replaced the sa1111_init() without the full SA1111 initialisation * because this machine doesn't appear to use the DMA features. If this is @@ -39,19 +64,7 @@ { pm_power_off = xp860_power_off; - /* - * Probe for SA1111. - */ - ret = sa1111_probe(0x40000000); - if (ret < 0) - return ret; - - /* - * We found it. Wake the chip up. - */ - sa1111_wake(); - - return 0; + return platform_add_devices(devices, ARRAY_SIZE(devices)); } arch_initcall(xp860_init); diff -Nru a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c --- a/arch/arm/mm/consistent.c Tue Apr 29 07:00:53 2003 +++ b/arch/arm/mm/consistent.c Wed Jun 4 08:09:55 2003 @@ -10,7 +10,7 @@ * DMA uncached mapping support. */ #include -#include +#include #include #include #include @@ -145,6 +145,7 @@ struct vm_region *c; unsigned long order, flags; void *ret = NULL; + int res; if (!consistent_pte) { printk(KERN_ERR "consistent_alloc: not initialised\n"); @@ -177,14 +178,19 @@ if (!c) goto no_remap; - spin_lock_irqsave(&consistent_lock, flags); - vm_region_dump(&consistent_head, "before alloc"); - /* * Attempt to allocate a virtual address in the * consistent mapping region. */ - if (!vm_region_alloc(&consistent_head, c, size)) { + spin_lock_irqsave(&consistent_lock, flags); + vm_region_dump(&consistent_head, "before alloc"); + + res = vm_region_alloc(&consistent_head, c, size); + + vm_region_dump(&consistent_head, "after alloc"); + spin_unlock_irqrestore(&consistent_lock, flags); + + if (!res) { pte_t *pte = consistent_pte + CONSISTENT_OFFSET(c->vm_start); struct page *end = page + (1 << order); pgprot_t prot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | @@ -218,9 +224,6 @@ ret = (void *)c->vm_start; } - vm_region_dump(&consistent_head, "after alloc"); - spin_unlock_irqrestore(&consistent_lock, flags); - no_remap: if (ret == NULL) { kfree(c); @@ -229,6 +232,22 @@ no_page: return ret; } + +/* + * Since we have the DMA mask available to us here, we could try to do + * a normal allocation, and only fall back to a "DMA" allocation if the + * resulting bus address does not satisfy the dma_mask requirements. + */ +void * +dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, int gfp) +{ + if (dev == NULL || *dev->dma_mask != 0xffffffff) + gfp |= GFP_DMA; + + return consistent_alloc(gfp, size, handle, 0); +} + +EXPORT_SYMBOL(dma_alloc_coherent); /* * free a page as defined by the above mapping. diff -Nru a/arch/arm/mm/init.c b/arch/arm/mm/init.c --- a/arch/arm/mm/init.c Sun Apr 20 09:14:40 2003 +++ b/arch/arm/mm/init.c Wed May 28 06:36:31 2003 @@ -47,7 +47,7 @@ #define TABLE_SIZE ((TABLE_OFFSET + PTRS_PER_PTE) * sizeof(pte_t)) -struct mmu_gather mmu_gathers[NR_CPUS]; +DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; extern char _stext, _text, _etext, _end, __init_begin, __init_end; diff -Nru a/arch/cris/drivers/ethernet.c b/arch/cris/drivers/ethernet.c --- a/arch/cris/drivers/ethernet.c Mon Feb 24 10:33:47 2003 +++ b/arch/cris/drivers/ethernet.c Wed Jun 4 03:30:01 2003 @@ -292,37 +292,19 @@ */ static int __init -etrax_ethernet_init(struct net_device *dev) +etrax_ethernet_init(void) { - int i; + struct net_device *dev; + int i, err; int anOffset = 0; printk("ETRAX 100LX 10/100MBit ethernet v2.0 (c) 2000-2001 Axis Communications AB\n"); - dev->base_addr = (unsigned int)R_NETWORK_SA_0; /* just to have something to show */ - - printk("%s initialized\n", dev->name); - - /* make Linux aware of the new hardware */ - - if (!dev) { - printk(KERN_WARNING "%s: dev == NULL. Should this happen?\n", - cardname); - dev = init_etherdev(dev, sizeof(struct net_local)); - if (!dev) - panic("init_etherdev failed\n"); - } - - /* setup generic handlers and stuff in the dev struct */ - - ether_setup(dev); - - /* make room for the local structure containing stats etc */ - - dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); - if (dev->priv == NULL) + dev = alloc_etherdev(sizeof(struct net_local)); + if (!dev) return -ENOMEM; - memset(dev->priv, 0, sizeof(struct net_local)); + + dev->base_addr = (unsigned int)R_NETWORK_SA_0; /* just to have something to show */ /* now setup our etrax specific stuff */ @@ -340,10 +322,6 @@ dev->do_ioctl = e100_ioctl; dev->tx_timeout = e100_tx_timeout; - /* set the default MAC address */ - - e100_set_mac_address(dev, &default_mac); - /* Initialise the list of Etrax DMA-descriptors */ /* Initialise receive descriptors */ @@ -371,6 +349,16 @@ myLastRxDesc = &RxDescList[NBR_OF_RX_DESC - 1]; myPrevRxDesc = &RxDescList[NBR_OF_RX_DESC - 1]; + err = register_netdev(dev); + if (err) { + kfree(dev); + return err; + } + + /* set the default MAC address */ + + e100_set_mac_address(dev, &default_mac); + /* Initialize speed indicator stuff. */ current_speed = 10; @@ -1349,19 +1337,10 @@ } } -static struct net_device dev_etrax_ethernet; /* only got one */ - static int etrax_init_module(void) { - struct net_device *d = &dev_etrax_ethernet; - - d->init = etrax_ethernet_init; - - if (register_netdev(d) == 0) - return 0; - else - return -ENODEV; + return etrax_ethernet_init(); } module_init(etrax_init_module); diff -Nru a/arch/cris/drivers/lpslave/e100lpslavenet.c b/arch/cris/drivers/lpslave/e100lpslavenet.c --- a/arch/cris/drivers/lpslave/e100lpslavenet.c Mon Feb 24 10:33:56 2003 +++ b/arch/cris/drivers/lpslave/e100lpslavenet.c Wed Jun 4 03:30:01 2003 @@ -162,37 +162,19 @@ * (detachable devices only). */ static int __init -etrax_ethernet_lpslave_init(struct net_device *dev) +etrax_ethernet_lpslave_init(void) { - int i; + struct net_device *dev; + int i, err; int anOffset = 0; printk("Etrax/100 lpslave ethernet driver v0.3, (c) 1999 Axis Communications AB\n"); - dev->base_addr = 2; - - printk("%s initialized\n", dev->name); - - /* make Linux aware of the new hardware */ - - if (!dev) { - printk(KERN_WARNING "%s: dev == NULL. Should this happen?\n", - cardname); - dev = init_etherdev(dev, sizeof(struct net_local)); - if (!dev) - panic("init_etherdev failed\n"); - } - - /* setup generic handlers and stuff in the dev struct */ - - ether_setup(dev); - - /* make room for the local structure containing stats etc */ - - dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); - if (dev->priv == NULL) + dev = alloc_etherdev(sizeof(struct net_lock)); + if (!dev) return -ENOMEM; - memset(dev->priv, 0, sizeof(struct net_local)); + + dev->base_addr = 2; /* now setup our etrax specific stuff */ @@ -242,7 +224,11 @@ TxDescList[0].buf = virt_to_phys(&host_command); TxDescList[0].next = virt_to_phys(&TxDescList[1]); - return 0; + err = register_netdev(dev); + if (err) + kfree(dev); + + return err; } /* set MAC address of the interface. called from the core after a @@ -1017,19 +1003,10 @@ } #endif /* ETHDEBUG */ -static struct net_device dev_etrax_slave_ethernet; - static int etrax_init_module(void) { - struct net_device *d = &dev_etrax_slave_ethernet; - - d->init = etrax_ethernet_lpslave_init; - - if(register_netdev(d) == 0) - return 0; - else - return -ENODEV; + return etrax_ethernet_lpslave_init(); } module_init(etrax_init_module); diff -Nru a/arch/cris/drivers/serial.c b/arch/cris/drivers/serial.c --- a/arch/cris/drivers/serial.c Mon Apr 21 20:58:41 2003 +++ b/arch/cris/drivers/serial.c Mon May 26 15:29:21 2003 @@ -335,13 +335,12 @@ static DECLARE_TASK_QUEUE(tq_serial); -struct tty_driver serial_driver, callout_driver; +struct tty_driver serial_driver; static int serial_refcount; /* serial subtype definitions */ #ifndef SERIAL_TYPE_NORMAL #define SERIAL_TYPE_NORMAL 1 -#define SERIAL_TYPE_CALLOUT 2 #endif /* number of characters left in xmit buffer before we ask for more */ @@ -3017,8 +3016,6 @@ */ if (info->flags & ASYNC_NORMAL_ACTIVE) info->normal_termios = *tty->termios; - if (info->flags & ASYNC_CALLOUT_ACTIVE) - info->callout_termios = *tty->termios; /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. @@ -3063,8 +3060,7 @@ } wake_up_interruptible(&info->open_wait); } - info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE| - ASYNC_CLOSING); + info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); wake_up_interruptible(&info->close_wait); restore_flags(flags); @@ -3128,7 +3124,7 @@ shutdown(info); info->event = 0; info->count = 0; - info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE); + info->flags &= ~ASYNC_NORMAL_ACTIVE; info->tty = 0; wake_up_interruptible(&info->open_wait); } @@ -3166,44 +3162,18 @@ } /* - * If this is a callout device, then just make sure the normal - * device isn't being used. - */ - if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) { - if (info->flags & ASYNC_NORMAL_ACTIVE) - return -EBUSY; - if ((info->flags & ASYNC_CALLOUT_ACTIVE) && - (info->flags & ASYNC_SESSION_LOCKOUT) && - (info->session != current->session)) - return -EBUSY; - if ((info->flags & ASYNC_CALLOUT_ACTIVE) && - (info->flags & ASYNC_PGRP_LOCKOUT) && - (info->pgrp != current->pgrp)) - return -EBUSY; - info->flags |= ASYNC_CALLOUT_ACTIVE; - return 0; - } - - /* * If non-blocking mode is set, or the port is not enabled, * then make the check up front and then exit. */ if ((filp->f_flags & O_NONBLOCK) || (tty->flags & (1 << TTY_IO_ERROR))) { - if (info->flags & ASYNC_CALLOUT_ACTIVE) - return -EBUSY; info->flags |= ASYNC_NORMAL_ACTIVE; return 0; } - if (info->flags & ASYNC_CALLOUT_ACTIVE) { - if (info->normal_termios.c_cflag & CLOCAL) - do_clocal = 1; - } else { - if (tty->termios->c_cflag & CLOCAL) - do_clocal = 1; - } - + if (tty->termios->c_cflag & CLOCAL) + do_clocal = 1; + /* * Block waiting for the carrier detect and the line to become * free (i.e., not in use by the callout). While we are in @@ -3228,11 +3198,9 @@ while (1) { save_flags(flags); cli(); - if (!(info->flags & ASYNC_CALLOUT_ACTIVE)) { - /* assert RTS and DTR */ - e100_rts(info, 1); - e100_dtr(info, 1); - } + /* assert RTS and DTR */ + e100_rts(info, 1); + e100_dtr(info, 1); restore_flags(flags); set_current_state(TASK_INTERRUPTIBLE); if (tty_hung_up_p(filp) || @@ -3247,8 +3215,7 @@ #endif break; } - if (!(info->flags & ASYNC_CALLOUT_ACTIVE) && - !(info->flags & ASYNC_CLOSING) && do_clocal) + if (!(info->flags & ASYNC_CLOSING) && do_clocal) /* && (do_clocal || DCD_IS_ASSERTED) */ break; if (signal_pending(current)) { @@ -3358,16 +3325,10 @@ } if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) { - if (tty->driver->subtype == SERIAL_TYPE_NORMAL) - *tty->termios = info->normal_termios; - else - *tty->termios = info->callout_termios; + *tty->termios = info->normal_termios; change_speed(info); } - info->session = current->session; - info->pgrp = current->pgrp; - #ifdef SERIAL_DEBUG_OPEN printk("rs_open ttyS%d successful...\n", info->line); #endif @@ -3538,23 +3499,8 @@ serial_driver.read_proc = rs_read_proc; #endif - /* - * The callout device is just like normal device except for - * major number and the subtype code. - */ - callout_driver = serial_driver; - callout_driver.name = "cua"; - callout_driver.major = TTYAUX_MAJOR; - callout_driver.subtype = SERIAL_TYPE_CALLOUT; -#if (LINUX_VERSION_CODE >= 131343) - callout_driver.read_proc = 0; - callout_driver.proc_entry = 0; -#endif - if (tty_register_driver(&serial_driver)) panic("Couldn't register serial driver\n"); - if (tty_register_driver(&callout_driver)) - panic("Couldn't register callout driver\n"); /* do some initializing for the separate ports */ @@ -3574,7 +3520,6 @@ info->blocked_open = 0; info->tqueue.routine = do_softint; info->tqueue.data = info; - info->callout_termios = callout_driver.init_termios; info->normal_termios = serial_driver.init_termios; init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); diff -Nru a/arch/cris/drivers/serial.h b/arch/cris/drivers/serial.h --- a/arch/cris/drivers/serial.h Tue Feb 5 07:24:37 2002 +++ b/arch/cris/drivers/serial.h Mon May 26 15:29:21 2003 @@ -78,8 +78,6 @@ int type; /* PORT_ETRAX */ int count; /* # of fd on device */ int blocked_open; /* # of blocked opens */ - long session; /* Session of opening process */ - long pgrp; /* pgrp of opening process */ struct circ_buf xmit; struct circ_buf recv; unsigned char *flag_buf; @@ -87,7 +85,6 @@ struct tq_struct tqueue; struct async_icount icount; /* error-statistics etc.*/ struct termios normal_termios; - struct termios callout_termios; #ifdef DECLARE_WAITQUEUE wait_queue_head_t open_wait; wait_queue_head_t close_wait; diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig --- a/arch/i386/Kconfig Sun May 4 23:38:39 2003 +++ b/arch/i386/Kconfig Tue Jun 3 20:54:21 2003 @@ -1135,7 +1135,7 @@ source "drivers/pcmcia/Kconfig" -source "drivers/hotplug/Kconfig" +source "drivers/pci/hotplug/Kconfig" endmenu diff -Nru a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c --- a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c Wed Apr 30 16:09:13 2003 +++ b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c Wed Jun 4 06:33:26 2003 @@ -186,7 +186,7 @@ **/ static __init struct pci_dev *gx_detect_chipset(void) { - struct pci_dev *gx_pci; + struct pci_dev *gx_pci = NULL; /* check if CPU is a MediaGX or a Geode. */ if ((current_cpu_data.x86_vendor != X86_VENDOR_NSC) && @@ -196,7 +196,7 @@ } /* detect which companion chip is used */ - pci_for_each_dev(gx_pci) { + while ((gx_pci = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, gx_pci)) != NULL) { if ((pci_match_device (gx_chipset_tbl, gx_pci)) != NULL) { return gx_pci; } diff -Nru a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S --- a/arch/i386/kernel/entry.S Fri May 16 15:04:55 2003 +++ b/arch/i386/kernel/entry.S Sun May 25 13:56:18 2003 @@ -508,6 +508,15 @@ ENTRY(nmi) cmpl $sysenter_entry,(%esp) je nmi_stack_fixup + pushl %eax + movl %esp,%eax + /* Do not access memory above the end of our stack page, + * it might not exist. + */ + andl $0x1fff,%eax + cmpl $0x1fec,%eax + popl %eax + jae nmi_stack_correct cmpl $sysenter_entry,12(%esp) je nmi_debug_stack_check nmi_stack_correct: diff -Nru a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c --- a/arch/i386/kernel/io_apic.c Wed May 14 23:43:55 2003 +++ b/arch/i386/kernel/io_apic.c Sun Jun 1 14:12:46 2003 @@ -352,9 +352,7 @@ unsigned long allowed_mask; unsigned int new_cpu; - if (irqbalance_disabled == IRQBALANCE_CHECK_ARCH && NO_BALANCE_IRQ) - return; - else if (irqbalance_disabled) + if (irqbalance_disabled) return; allowed_mask = cpu_online_map & irq_affinity[irq]; @@ -614,6 +612,9 @@ struct cpuinfo_x86 *c; c = &boot_cpu_data; + /* When not overwritten by the command line ask subarchitecture. */ + if (irqbalance_disabled == IRQBALANCE_CHECK_ARCH) + irqbalance_disabled = NO_BALANCE_IRQ; if (irqbalance_disabled) return 0; diff -Nru a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c --- a/arch/i386/kernel/setup.c Mon May 19 11:26:52 2003 +++ b/arch/i386/kernel/setup.c Thu May 29 22:42:35 2003 @@ -35,6 +35,7 @@ #include #include #include +#include #include