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/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/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/Makefile b/Makefile --- a/Makefile Mon May 26 17:57:52 2003 +++ b/Makefile Fri May 30 04:31:16 2003 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 5 SUBLEVEL = 70 -EXTRAVERSION = +EXTRAVERSION = -bk4 # *DOCUMENTATION* # To see a list of typical targets execute "make help" 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/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/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/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/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 Thu May 29 22:42:38 2003 @@ -352,10 +352,16 @@ 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 == IRQBALANCE_CHECK_ARCH) + irqbalance_disabled = NO_BALANCE_IRQ; + if (irqbalance_disabled) { + static int warned; + if (warned == 0) { + printk("irqbalance disabled\n"); + warned = 1; + } return; + } allowed_mask = cpu_online_map & irq_affinity[irq]; new_cpu = move(cpu, allowed_mask, now, 1); 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