diff -ur --exclude CVS --exclude .cvsignore linux-2.6.9/Documentation/kernel-parameters.txt corrupt-2.6.9/Documentation/kernel-parameters.txt --- linux-2.6.9/Documentation/kernel-parameters.txt 2004-10-18 17:55:36.000000000 -0400 +++ corrupt-2.6.9/Documentation/kernel-parameters.txt 2004-10-18 20:01:12.000000000 -0400 @@ -636,48 +636,39 @@ maui= [HW,OSS] Format: , - max_loop= [LOOP] Maximum number of loopback devices that can - be mounted - Format: <1-256> + max_dprobe.conf': - maxcpus= [SMP] Maximum number of processors that an SMP kernel - should make use of + options ftape ft_probe_fc10=1 ft_tracing=4 - max_scsi_luns= [SCSI] +******************************************************************************* - max_scsi_report_luns= - [SCSI] Maximum number of LUNs received - Should be between 1 and 16384. +D. Support and contacts + ==================== + +i_luns= [SCSI] - mca-pentium [BUGS=IA-32] + max_scsi_report_luns= + [SCSI] Maximum number ere is + absolutely no warranty for this software. However, you [BUGS=IA-32] mcatest= [IA-64] mcd= [HW,CD] - Format: ,, - - mcdx= [HW,CD] - - mce [IA-32] Machine Check Exception + Format: , - Specifies range of consoles to be captured by the MDA. - - mem=nn[KMG] [KNL,BOOT] Force usage of a specific amount of memory - Amount of memory to be used when the kernel is not able - to see the whole system memory or for test. - - mem=nopentium [BUGS=IA-32] Disable usage of 4MB pages for kernel + md= [HW] RAID subsystems devices and le. There you'll find also + the relevant mailing list to use asfirst>, + Specifies range of consoles to be captured by tcent documentation, related work and + development versions of nt of memory + Amount of memory to be used when the kernel is nBFM claus EOD config + LocalWords: datarate LocalWords BOT MTBSFentium [BUGS=IA-32] Disable usage of 4MB pages for kernel memory. memmap=exactmap [KNL,IA-32] Enable setting of an exact E820 memory map, as specified by the user. - Such memmap=exactmap lines can be constructed based on - BIOS output or other requirements. See the memmap=nn@ss + Such memmap=exactdma setdensity DBGLVL insmod lilo LI nux ader conf txt + LocalWorquirements. See the memmap=nn@ss option description. memmap=nn[KMG]@ss[KMG] @@ -754,8 +745,8 @@ noalign [KNL,ARM] - noapic [SMP,APIC] Tells the kernel not to make use of any - APIC that may be present on the system. + noapic [SMP,APIC] Tells the kernel to not make use of any + IOAPICs that may be present in the system. noasync [HW,M68K] Disables async and sync negotiation for all devices. @@ -763,13 +754,13 @@ nobats [PPC] Do not use BATs for mapping kernel lowmem on "Classic" PPC cores. - nocache [ARM] - + noapic [SMP,APIC] Tells the kernel not to make use of any + APIC that may be present on the system. nodisconnect [HW,SCSI,M68K] Disables SCSI disconnects. noexec [IA-64] - noexec [i386] + noexec [i386, x86_64] noexec=on: enable non-executable mappings (default) noexec=off: disable nn-executable mappings @@ -778,7 +769,7 @@ nohighio [BUGS=IA-32] Disable highmem block I/O. nohlt [BUGS=ARM] - + noexec [i386] no-hlt [BUGS=IA-32] Tells the kernel that the hlt instruction doesn't work correctly and not to use it. @@ -925,15 +916,15 @@ pd. [PARIDE] See Documentation/paride.txt. + pdcchassis= [PARISC,HW] Disable/Enable PDC Chassis Status codes at + boot time. + Format: { 0 | 1 } + See arch/parisc/kernel/pdc_chassis.c + pf. [PARIDE] See Documentation/paride.txt. pg. [PARIDE] - See Documentation/paride.txt. - - pirq= [SMP,APIC] Manual mp-table setup - See Documentation/i386/IO-APIC.txt. - plip= [PPT,NET] Parallel port network link Format: { parport | timid | 0 } See also Documentation/parport.txt. @@ -1060,8 +1051,6 @@ scsi_logging= [SCSI] - scsihosts= [SCSI] - serialnumber [BUGS=IA-32] sf16fm= [HW] SF16FMI radio driver for Linux @@ -1071,6 +1060,8 @@ [SCSI] sgalaxy= [HW,OSS] + scsihosts= [SCSI] + Format: ,,,, shapers= [NET] @@ -1244,7 +1235,7 @@ st0x= [HW,SCSI] See header of drivers/scsi/seagate.c. - sti= [HW] + sti= [PARISC,HW] Format: Set the STI (builtin display/keyboard on the HP-PARISC machines) console (graphic card) which should be used @@ -1253,7 +1244,7 @@ sti_font= [HW] See comment in drivers/video/console/sticore.c. - + sti= [HW] stifb= [HW] Format: bpp:[:[:...]] @@ -1266,9 +1257,6 @@ sym53c416= [HW,SCSI] See header of drivers/scsi/sym53c416.c. - sym53c8xx= [HW,SCSI] - See Documentation/scsi/ncr53c8xx.txt. - t128= [HW,SCSI] See header of drivers/scsi/t128.c. @@ -1278,6 +1266,9 @@ Set number of hash buckets for TCP connection tipar= [HW] + sym53c8xx= [HW,SCSI] + See Documentation/scsi/ncr53c8xx.txt. + See header of drivers/char/tipar.c. tiusb= [HW,USB] Texas Instruments' USB GraphLink (aka SilverLink) @@ -1311,6 +1302,8 @@ uart6850= [HW,OSS] Format: , + + usb-handoff [HW] Enable early USB BIOS -> OS handoff video= [FB] Frame buffer configuration See Documentation/fb/modedb.txt. @@ -1318,8 +1311,6 @@ vga= [BOOT,IA-32] Select a particular video mode See Documentation/i386/boot.txt and Documentation/svga.txt. Use vga=ask for menu. - This is actually a boot loader parameter; the value is - passed to the kernel using a special protocol. vmalloc=nn[KMG] [KNL,BOOT] forces the vmalloc area to have an exact size of . This can be used to increase the diff -ur --exclude CVS --exclude .cvsignore linux-2.6.9/arch/arm/configs/bast_defconfig corrupt-2.6.9/arch/arm/configs/bast_defconfig --- linux-2.6.9/arch/arm/configs/bast_defconfig 2004-10-18 17:53:51.000000000 -0400 +++ corrupt-2.6.9/arch/arm/configs/bast_defconfig 2004-08-14 13:10:25.000000000 -0400 @@ -655,61 +655,7 @@ # CONFIG_PARTITION_ADVANCED=y CONFIG_ACORN_PARTITION=y -CONFIG_ACORN_PARTITION_CUMANA=y -CONFIG_ACORN_PARTITION_EESOX=y -CONFIG_ACORN_PARTITION_ICS=y -CONFIG_ACORN_PARTITION_ADFS=y -CONFIG_ACORN_PARTITION_POWERTEC=y -CONFIG_ACORN_PARTITION_RISCIX=y -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -# CONFIG_MINIX_SUBPARTITION is not set -CONFIG_SOLARIS_X86_PARTITION=y -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -# CONFIG_NLS_CODEPAGE_437 is not set -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -# CONFIG_NLS_ISO8859_1 is not set -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set +CONFIG_ACORN_PARTITION_CUG_NLS_ISO8859_5 is not set # CONFIG_NLS_ISO8859_6 is not set # CONFIG_NLS_ISO8859_7 is not set # CONFIG_NLS_ISO8859_9 is not set @@ -721,27 +667,99 @@ # CONFIG_NLS_UTF8 is not set # -# Profiling support +# Console drivers # -# CONFIG_PROFILING is not set +CONFIG_PC_KEYMAP=y +# CONFIG_VGA_CONSOLE is not set # -# Graphics support +# Frame-buffer support # CONFIG_FB=y +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FB_ACORN is not set +# CONFIG_FB_CLPS711X is not set +# CONFIG_FB_CYBER2000 is not set +CONFIG_FB_SA1100=y +# CONFIG_FB_E1355 is not set # CONFIG_FB_VIRTUAL is not set +# CONFIG_FBCON_ADVANCED is not set +CONFIG_FBCON_CFB2=y +CONFIG_FBCON_CFB4=y +CONFIG_FBCON_CFB8=y +CONFIG_FBCON_CFB16=y +CONFIG_FBCON_FONTWIDTH8_ONLY=y +CONFIG_FBCON_FONTS=y +# CONFIG_FONT_8x8 is not set +CONFIG_FONT_8x16=y +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set # -# Console display driver support +# Sound # -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE is not set +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_UHCI is not set +# CONFIG_USB_UHCI_ALT is not set +CONFIG_USB_OHCI=y +CONFIG_USB_OHCI_NOPCI=y +# CONFIG_USB_AUDIO is not set +# CONFIG_USB_BLUETOOTH is not set +# CONFIG_USB_STORAGE is not set +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_HID is not set +# CONFIG_USB_KBD is not set +CONFIG_USB_MOUSE=y +# CONFIG_USB_WACOM is not set +# CONFIG_USB_DC2XX is not set +# CONFIG_USB_MDC800 is not setEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +# CONFIG_NLSt +# CONFIG_USB_IBMCAM is not set +# CONFIG_USB_OV511 is not set +# CONFIG_USB_PWC is not set +# CONFIG_USB_SE401 is not set +# CONFINFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +B_PLUSB is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_CATC is not set +# CONFIG_USB_NET1080 is not set +# CONFIG_USB_USBNET is not set +# CONFIG_USB_USS720 is not set + +# +# USB Serial Co is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is O500 is not set + +# +# Bluetooth support +# +# CONFIG_BT is not set # -# Logo configuration +# Kernel hacking # +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_ERRORS=y +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_INFO is not setnot set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +#t +# CONFIG_DEBUG_LL is not set +# CONFIG_DEBUG_DC21285_PORT is no # CONFIG_LOGO is not set # diff -ur --exclude CVS --exclude .cvsignore linux-2.6.9/arch/arm/mach-omap/dma.c corrupt-2.6.9/arch/arm/mach-omap/dma.c --- linux-2.6.9/arch/arm/mach-omap/dma.c 2004-10-18 17:55:24.000000000 -0400 +++ corrupt-2.6.9/arch/arm/mach-omap/dma.c 2004-09-13 11:22:03.000000000 -0400 @@ -17,41 +17,24 @@ #include #include #include -#include -#include - -#include -#include -#include -#include -#include - -#define OMAP_DMA_ACTIVE 0x01 - -#define OMAP_DMA_CCR_EN (1 << 7) - -#define OMAP_FUNC_MUX_ARM_BASE (0xfffe1000 + 0xec) - -static int enable_1510_mode = 0; - -struct omap_dma_lch { - int next_lch; - int dev_id; - u16 saved_csr; - u16 enabled_irqs; - const char *dev_name; - void (* callback)(int lch, u16 ch_status, void *data); - void *data; - long flags; -}; - -static int dma_chan_count; +#includ, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * #define OMAP_DMA_CCR_EN (1 << 7) + +#define OMAP_FUNC_MUX_ARM_BASOR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 675 Mass Ave, Cambridge, MA 02139, USA. + */ -static spinlock_t dma_chan_lock; -static struct omap_dma_lch dma_chan[OMAP_LOGICAL_DMA_CH_COUNT]; +#ifndef __ARCH_ARM_MACH_OMAP_COMMON_H +#define __ARCH_ARM_MACH_OMAP_COMMON_H -const static u8 dma_irq[OMAP_LOGICAL_DMA_CH_COUNT] = { - INT_DMA_CH0_6, INT_DMA_CH1_7, INT_DMA_CH2_8, INT_DMA_CH3, +struct sys_timeINT_DMA_CH1_7, INT_DMA_CH2_8, INT_DMA_CH3, INT_DMA_CH4, INT_DMA_CH5, INT_1610_DMA_CH6, INT_1610_DMA_CH7, INT_1610_DMA_CH8, INT_1610_DMA_CH9, INT_1610_DMA_CH10, INT_1610_DMA_CH11, INT_1610_DMA_CH12, INT_1610_DMA_CH13, diff -ur --exclude CVS --exclude .cvsignore linux-2.6.9/arch/i386/kernel/cpu/cyrix.c corrupt-2.6.9/arch/i386/kernel/cpu/cyrix.c --- linux-2.6.9/arch/i386/kernel/cpu/cyrix.c 2004-10-18 17:53:43.000000000 -0400 +++ corrupt-2.6.9/arch/i386/kernel/cpu/cyrix.c 2004-04-15 14:03:59.000000000 -0400 @@ -280,8 +280,10 @@ /* GXm supports extended cpuid levels 'ala' AMD */ if (c->cpuid_level == 2) { - /* Enable cxMMX extensions (GX1 Datasheet 54) */ - setCx86(CX86_CCR7, getCx86(CX86_CCR7)|1); + /* Enable cxMMX extensions ak write ordering + */ + lo|=31; + wrmsr(MSR_IDT_MCR_); /* GXlv/GXm/GX1 */ if((dir1 >= 0x50 && dir1 <= 0x54) || dir1 >= 0x63) @@ -296,53 +298,59 @@ } break; - case 5: /* 6x86MX/M II */ - if (dir1 > 7) - { - dir0_msn++; /* M II */ + combining on non-stack, non-string + write combining on stri/* M II */ /* Enable MMX extensions (App note 108) */ setCx86(CX86_CCR7, getCx86(CX86_CCR7)|1); } else { - c->coma_bug = 1; /* 6x86MX, it has the bug. */ - } - tmp = (!(dir0_lsn & 7) || dir0_lsn & 1) ? 2 : 0; - Cx86_cb[tmp] = cyrix_model_mult2[dir0_lsn & 7]; + c->coma_#endif + break; + case 10: + name="4"; + /* no info on the WC4 yet */ + break; + default: + name="??"; + } + + rdmsmult2[dir0_lsn & 7]; p = Cx86_cb+tmp; - if (((dir1 & 0x0f) > 4) || ((dir1 & 0xf0) == 0x20)) - (c->x86_model)++; - /* Emulate MTRRs using Cyrix's ARRs. */ - set_bit(X86_FEATURE_CYRIX_ARR, c->x86_capability); + if (((dir1 & 0x if (newlo!=lo) { + printk(KERN_INFO "Centaur FCR was 0x%X now 0x%X\n", lo, newlo ); + wrmsr(MSR_IDT_FCR1, newlo, hi ); + }ARR, c->x86_capability); break; case 0xf: /* Cyrix 486 without DEVID registers */ switch (dir0_lsn) { case 0xd: /* either a 486SLC or DLC w/o DEVID */ dir0_msn = 0; - p = Cx486_name[(c->hard_math) ? 1 : 0]; - break; - - case 0xe: /* a 486S A step */ + p = Cx486_nt(X86_FEATURE_CX8, c->x86_capability); + /* Set 3DNow! on Winch step */ dir0_msn = 0; p = Cx486S_name[0]; break; } - break; + URE_3DNOW, c->x86_capability); + /* See if we can find out some more. */ + if ( cpuid_eax(0x80000000) >= 0x80000005 ) { + /* Yes, we can. */ + cpuid(0x80000005,&aa,&bb,&cc,&dd); + /* Add L1 data and code cache sizes. */ + c->x86_cache_size = (cc>>24)+(dd>>24); + } + sprintf( c->x86_model_id, "WinChip %s", name ); + break; - default: /* unknown (shouldn't happen, we know everyone ;-) */ - dir0_msn = 7; - break; + case 6: + init_c3(c); + break; } - strcpy(buf, Cx86_model[dir0_msn & 7]); - if (p) strcat(buf, p); - return; } -/* - * Cyrix CPUs without cpuid or with cpuid not yet enabled can be detected - * by the fact that they preserve the flags across the division of 5/2. - * PII and PPro exhibit this behavior too, but they have cpuid available. +staticpuid available. */ /* @@ -353,25 +361,29 @@ { unsigned int test; - __asm__ __volatile__( - "sahf\n\t" /* clear flags (%eax = 0x0005) */ + __a= 8))) + size >>= 8; + + /* VIA also screwed up Nehemiah stepping 05) */ "div %b2\n\t" /* divide 5 by 2 */ "lahf" /* store flags into %ah */ : "=a" (test) - : "0" (5), "q" (2) - : "cc"); + : "0" (5), "q"==6) && (c->x86_model==9) && (c->x86_mask==1) && (size==65)) + size -=1; - /* AH is 0x02 on Cyrix after the divide.. */ - return (unsigned char) (test >> 8) == 0x02; + return size; } -static void cyrix_identify(struct cpuinfo_x86 * c) +static struct cpu_dev centaur_cpu_devyrix_identify(struct cpuinfo_x86 * c) { /* Detect Cyrix with disabled CPUID */ if ( c->x86 == 4 && test_cyrix_52div() ) { - unsigned char dir0, dir1; - - strcpy(c->x86_vendor_id, "CyrixInstead"); + uncache, +}; + +int __init centaur_init_cpu(void) +{ + cpu_devs[X86_VENead"); c->x86_vendor = X86_VENDOR_CYRIX; /* Actually enable cpuid on the older cyrix */ diff -ur --exclude CVS --exclude .cvsignore linux-2.6.9/arch/i386/math-emu/fpu_proto.h corrupt-2.6.9/arch/i386/math-emu/fpu_proto.h --- linux-2.6.9/arch/i386/math-emu/fpu_proto.h 2004-10-18 17:55:07.000000000 -0400 +++ corrupt-2.6.9/arch/i386/math-emu/fpu_proto.h 2004-09-13 11:22:12.000000000 -0400 @@ -111,23 +111,29 @@ /* reg_constant.c */ extern void fconst(void); /* reg_ld_str.c */ -extern int FPU_load_extended(long double __user *s, int stnr); -extern int FPU_load_double(double __user *dfloat, FPU_REG *loaded_data); +extern int FPU_load_extended(long double __user *s, imail billm@vaxc.cc.monash.edu.au | + | REG *loaded_data); extern int FPU_load_single(float __user *single, FPU_REG *loaded_data); extern int FPU_load_int64(long long __user *_s); -extern int FPU_load_int32(long __user *_s, FPU_REG *loaded_data); -extern int FPU_load_int16(short __user *_s, FPU_REG *loaded_data); +extern int FPU_load_int32(long __user *_s, FPU_REG *EMBLY__ +#define _Const_(x) $##x +#else +#define _Const_(x) x +#endiG *loaded_data); extern int FPU_load_bcd(u_char __user *s); extern int FPU_store_extended(FPU_REG *st0_ptr, u_char st0_tag, long double __user *d); -extern int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double __user *dfloat); -extern int FPU_store_single(FPU_REG *st0_ptr, u_char st0_tag, float __user *single); -extern int FPU_store_int64(FPU_REG *st0_ptr, u_char st0_tag, long long __user *d); -extern int FPU_store_int32(FPU_REG *st0_ptr, u_char st0_tag, long __user *d); -extern int FPU_store_int16(FPU_REG *st0_ptr, u_char st0_tag, short __user *d); +extern int FPU_store_double(FPU_REGerflow Const_(0x0010) /* underflow mask */ +#define CW_Overflow Const_(0x0008) /* overflow mask */ +#define CW_ZeroDiv Const_(0x00ingle); +extern int FPU_store_int64(FPU_REG *st0_ptr, u_char st0_ /* denormalized operand mask */ +#define CW_Invalid Const_(0x0001) /* invalid operation mask */ + +#define CW_Exceptions _Const_t16(FPU_REG *st0_ptr, u_char st0_tag, short __user *d); extern int FPU_store_bcd(FPU_REG *st0_ptr, u_char st0_tag, u_char __user *d); extern int FPU_round_to_int(FPU_REG *r, u_char tag); -extern u_char __user *fldenv(fpu_addr_modes addr_modes, u_char __user *s); +exterfect only the following: + ADD, SUB(R), MUL, DIV(R), and SQRT * *s); extern void frstor(fpu_addr_modes addr_modes, u_char __user *data_address); extern u_char __user *fstenv(fpu_addr_modes addr_modes, u_char __user *d); extern void fsave(fpu_addr_modes addr_modes, u_char __user *data_address); diff -ur --exclude CVS --exclude .cvsignore linux-2.6.9/arch/i386/math-emu/reg_norm.S corrupt-2.6.9/arch/i386/math-emu/reg_norm.S --- linux-2.6.9/arch/i386/math-emu/reg_norm.S 2004-10-18 17:55:28.000000000 -0400 +++ corrupt-2.6.9/arch/i386/math-emu/reg_norm.S 2003-07-29 13:00:26.000000000 -0400 @@ -1,146 +1,114 @@ -/*---------------------------------------------------------------------------+ - | reg_norm.S | +/*------------------------------------ | + | | + | ltiply one FPU_REG by another, put the result in a destination F | + | Copyright (C) 1992,1993,1994,1995,1997 | + | Copyright (C) 1992,1993,1997 Parker St, Ormond, Vic 3163, | + | Auetzenthen, 22 Parker St, Ormond, Vic 3163, Australia | + | E-mail billm@suburbia.net | | | - | Copyright (C) 1992,1993,1994,1995,1997 | - | W. Metzenthen, 22 Parker St, Ormond, Vic 3163, | - | Australia. E-mail billm@suburbia.net | - | | - | Normalize the value in a FPU_REG. | - | | - | Call from C as: | - | int FPU_normalize(FPU_REG *n) | - | | - | int FPU_normalize_nuo(FPU_REG *n) | - | | - | Return value is the tag of the answer, or-ed with FPU_Exception if | - | one was raised, or -1 on internal error. | + | Returns the tag of the result if no exceptions or errors occurred. | | | + +-------------------------------------------------------------------------- | ------------------+ + | The destination may be any FPU_REG, including one of the source FPU_REGs. | +---------------------------------------------------------------------------*/ -#include "fpu_emu.h" - - -.text -ENTRY(FPU_normalize) - pushl %ebp - movl %esp,%ebp - pushl %ebx +#include "fpis the tag of the answer, or-ed with FPU_Exception if | + | de "fpu_system.h" - movl PARAM1,%ebx - movl SIGH(%ebx),%edx - movl SIGL(%ebx),%eax +/* + Multiply two registers to give a register result. + The sources are st(deststnr) and (b,tagb,signb). + The destination is st(deststnr). + */ +/* This routine must be ca---------------------------------------*/ - orl %edx,%edx /* ms bits */ - js L_done /* Already normalized */ +#include "fpu_emu.h" +t *b, u_char tagb, int deststnr, int control_w) +{ + FPU_REG *a = &st(deststnr); + FPU_REG *dest = a; + u_char taga = FPU_gettagi(deststnr); + u_char saved_sign = getsign(dest); + u_char sign =ized */ jnz L_shift_1 /* Shift left 1 - 31 bits */ - orl %eax,%eax - jz L_zero /* The contents are zero */ + orl %eax,% + { + /* Both regs Valid, this should be the most common case. */ + + tag = FPU_u_mul(a, b, dest, control_w, sign, exponent(a) + exponent(b)); + if ( tag < 0 ) + { + setsign(dest, saved_sign); + return tag; + } + FPU_settagi(deststnr, tag); + return tag; + } - movl %eax,%edx - xorl %eax,%eax - subw $32,EXP(%ebx) /* This can cause an underflow */ - -/* We need to shift left by 1 - 31 bits */ -L_shift_1: - bsrl %edx,%ecx /* get the required shift in %ecx */ - subl $31,%ecx - negl %ecx - shld %cl,%eax,%edx - shl %cl,%eax - subw %cx,EXP(%ebx) /* This can cause an underflow */ + if ( taga == TAG_Special ) + tag* This can cause an underflow */ movl %edx,SIGH(%ebx) - movl %eax,SIGL(%ebx) - -L_done: - cmpw EXP_OVER,EXP(%ebx) - jge L_overflow + movl %eSpecial(b); + if ( ((taga == TAG_Valid) && (tagb == TW_Denormal cmpw EXP_UNDER,EXP(%ebx) jle L_underflow L_exit_valid: - movl TAG_Valid,%eax - - /* Convert the exponent to 80x87 form. */ - addw EXTENDED_Ebias,EXP(%ebx) - andw $0x7fff,EXP(%ebx) - -L_exit: - popl %ebx - leave - ret - - -L_zero: - movw $0,EXP(%ebx) - movl TAG_Zero,%eax - jmp L_exit - -L_underflow: - /* Convert the exponent to 80x87 form. */ - addw EXTENDED_Ebias,EXP(%ebx) - push %ebx - call arith_underflow - pop %ebx - jmp L_exit - -L_overflow: - /* Convert the exponent to 80x87 form. */ - addw EXTENDED_Ebias,EXP(%ebx) - push %ebx + movl| ((taga == TW_Denormal) && (tagb == TW_Denormal)) ) + { + FPU_REG x, y; + if ( denormal_operand() < 0 ) + return FPU_Exception; + + FPU_to_exp16(a, &x); + FPU_to_exp16(b, &y); + tag = FPU_u_mul(&x, &y, dest, control_w, sign, + exponent16(&x) + exponent16(&y)); + if ( tag < 0 ) + { + setsign(dest, saved_sign); + return tag; + } + FPU_settagi(deststnr, tag); + return tag; + } + else if ( (taga <= TW_Denorm call arith_overflow pop %ebx jmp L_exit -/* Normalise without reporting underflow or overflow */ -ENTRY(FPU_normalize_nuo) - pushl %ebp - movl %esp,%ebp - pushl %ebx - - movl PARAM1,%ebx - - movl SIGH(%ebx),%edx - movl SIGL(%ebx),%eax - - orl %edx,%edx /* ms bits */ +/* Normalise withormal) || (taga == TW_Denormal)) + && (denormal_operand() < 0) ) + return FPU_Exception; + + /* Must have either both arguments == zero, or + one valid and the other zero. + The result is ts */ js L_exit_nuo_valid /* Already normalized */ - jnz L_nuo_shift_1 /* Shift left 1 - 31 bits */ - - orl %eax,%eax - jz L_exit_nuo_zero /* The contents are zero */ - - movl %eax,%edx - xorl %eax,%eax - subw $32,EXP(%ebx) /* This can cause an underflow */ - -/* We need to shift left by 1 - 31 bits */ + jnz L_nuo_sststnr); + /* The 80486 book says that the answer is +0, but a real + 80486 behaves this way. + IEEE-754 apparently says it should be this way. */ + setsign(dest, sign); + return TWe need to shift left by 1 - 31 bits */ L_nuo_shift_1: - bsrl %edx,%ecx /* get the required shift in %ecx */ - subl $31,%ecx - negl %ecx + bsrl %ede if ( (taga == TW_NaN) || (tagb == TW_NaN) ) + { + return %ecx shld %cl,%eax,%edx shl %cl,%eax - subw %cx,EXP(%ebx) /* This can cause an underflow */ - - movl %edx,SIGH(%ebx) - movl %eax,SIGL(%ebx) - -L_exit_nuo_valid: - movl TAG_Valid,%eax - - popl %ebx - leave - ret - -L_exit_nuo_zero: - movl TAG_Zero,%eax - movw EXP_UNDER,EXP(%ebx) + subw %cx,EXP(%ebx) /* Tga == TW_Infinity) && (tagb == TAG_Zero)) + || ((tagb == TW_Infinity) && (taga == TAG_Zero)) ) + { + return arith_invalid(deststnr); /* Zero*Infinity is invalid */ + } + else if ( ,EXP(%ebx) popl %ebx leave diff -ur --exclude CVS --exclude .cvsignore linux-2.6.9/arch/i386/mm/fault.c corrupt-2.6.9/arch/i386/mm/fault.c --- linux-2.6.9/arch/i386/mm/fault.c 2004-10-18 17:53:06.000000000 -0400 +++ corrupt-2.6.9/arch/i386/mm/fault.c 2004-10-11 17:40:46.000000000 -0400 @@ -423,105 +423,97 @@ * had been triggered by is_prefetch fixup_exception would have * handled it. */ - if (is_prefetch(regs, address, error_code)) - return; + if (is_prefetch(regsd = numnodes - 1; nid >= 0; nid--) { + if (nid) + memset(NODE_DATA(nid), 0, sizeof(pg_data_t)); + NODE_DATA(nid)->pgdat_next = pgdat_list; + pgdat_list = NODE_DATA(nid); + } -/* - * Oops. The kernel tried to access some bad page. We'll have to - * terminate things with extreme prejudice. - */ - - bust_spinlocks(1); - -#ifdef CONFIG_X86_PAE - if (error_code & 16) { - pte_t *pte = lookup_address(address); + for (nid = 0; nid < numnodes; nid++) { + unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0}; + unsigned long *zholes_size; + unsigned int max_dma; + + unsigned long low = max_low_pfn; + unsigned long start = node_start_pfn[nid]; + unsigned long high = node_end_pfn[nid]; - if (pte && pte_present(*pte) && !pte_exec_kernel(*pte)) - printk(KERN_CRIT "kernel tried to execute NX-protected page - exploit attempt? (uid: %d)\n", current->uid); - } -#endif - if (address < PAGE_SIZE) - printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference"); + max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_ULL pointer dereference"); else printk(KERN_ALERT "Unable to handle kernel paging request"); - printk(" at virtual address %08lx\n",address); - printk(KERN_ALERT " printing eip:\n"); - printk("%08lx\n", regs->eip); - asm("movl %%cr3,%0":"=r" (page)); - page = ((unsigned long *) __va(page))[address >> 22]; - printk(KERN_ALERT "*pde = %08lx\n", page); - /* - * We must not directly access the pte in the highpte - * case, the page table might be allocated in highmem. - * And lets rather not kmap-atomic the pte, just in case - * it's allocated already. - */ -#ifndef CONFIG_HIGHPTE + printk(" at virtual address %08 } else { + if (low < max_dma) + zones_size[ZONE_DMA] = low; + else { + BUG_ON(max_dma > low); + BUG_ON(low > high); + zones_size[ZONE_DMA] = max_dma; + zones_size[ZONE_NORMAL] = low - max_dma; +#ifdef CONFIG_HIGHMEM + zones_size[ZONE_HIGHMEM] = high - low; +#endif + } + } + zholes_size = get_zholes_size(nted in highmem. + * And lets rather not kmap-atomic the pte, justhe + * normal bootmem allocator, but other nodes come from theE if (page & 1) { page &= PAGE_MASK; - address &= 0x003ff000; - page = ((unsigned long *) __va(page))[address >> PAGE_SHIFT]; - printk(KERN_ALERT "*pte = %08lx\n", page); + address &= 0x003ff000;init_node(nid, NODE_DATA(nid), + zones_size, start, zholes_size); + else { + unsigned long lmem_map; + lmem_map = (unsigned long)node_remap_start_vaddr[nid]; + lmem_map += sizeof(pg_data/* + * We ran out of memory, or some other thing happened to us t->node_mem_map = (struct page *)lmem_map; + free_area_init_node(nid, NODE_DATA(nid), zones_size, + start, zholes_size); + } } -#endif - die("Oops", regs, error_code); - bust_spinlocks(0); - do_exit(SIGKILL); - -/* - * We ran out of memory, or some other thing happened to us that made - * us unable to handle the page fault gracefully. - */ -out_of_memory: - up_read(&mm->mmap_sem); - if (tsk->pid == 1) { - yield(); - down_read(&mm->mmap_sem); - goto survive; - } - printk("VM: killing process %s\n", tsk->comm); - if (error_code & 4) - do_exit(SIGKILL); - goto no_context; + return; +} -do_sigbus: - up_read(&mm->mmap_sem); +void __init set_highmem_pages_init(int bad_ppro) +{ +#ifdef CONFIG_HIGHMEM + struct zone *zone; + + for_each_zone(zone) { + unsigned long node_pfn, node_high_size, zone_start_pfn; + _sem); /* Kernel mode? Handle exceptions or die */ - if (!(error_code & 4)) - goto no_context; + if (!(erronue; - /* User space => ok to do another page fault */ - if (is_prefetch(regs, address, error_code)) - return; - - tsk->thread.cr2 = address; - tsk->thread.error_code = error_code; - tsk->thread.trap_no = 14; - info.si_signo = SIGBUS; - info.si_errno = 0; - info.si_code = BUS_ADRERR; - info.si_addr = (void __user *)address; - force_sig_info(SIGBUS, &info, tsk); - return; + printk("Initializing %s for node %d\n", zone->name, + zone->zone_pgdat->node_id); -vmalloc_fault: - { - /* - * Synchronize this task's top level page-table - * with the 'reference' page table. - * - * Do _not_ use "tsk" here. We might be inside - * an interrupt in the middle of a task switch.. - */ - int index = pgd_index(address); - unsigned long pgd_paddr; - pgd_t *pgd, *pgd_k; - pmd_t *pmd, *pmd_k; - pte_t *pte_k; + node_high_size = zone->spanned_pages; + zone_mem_map = zone->zone_mem_map; + zone_start_pfn = zone->zone_start_pfn; + + for (node_pfn = 0; node_pfn < node_high_size; node_pfn++) { + one_highpage_init((struct page *)(zone_mem_map + node_pfn), + zone_start_pfn + node_pfn, bad_ppro); + } + } + totalram_pages += totalhigh_pages; +#endif +} - asm("movl %%cr3,%0":"=r" (pgd_paddr)); +void __init set_max_mapnr_init(void) +{ +#ifdef CONFIG_HIGHMEM + struct zone *high0 = &NODE_DATA(0)->node_zones[ZONE_HIGHMEM]; + if (high0->spanned_pages > 0) + highmem_start_page = high0->zone_mem_map; + else + highmem_start_page = pfn_to_page(max_low_pfn+1); + num_physpages = highend_pfn; +#else + num_physpages = max_low_pfn; +#endiaddr)); pgd = index + (pgd_t *)__va(pgd_paddr); pgd_k = init_mm.pgd + index; diff -ur --exclude CVS --exclude .cvsignore linux-2.6.9/arch/ia64/kernel/iosapic.c corrupt-2.6.9/arch/ia64/kernel/iosapic.c --- linux-2.6.9/arch/ia64/kernel/iosapic.c 2004-10-18 17:54:08.000000000 -0400 +++ corrupt-2.6.9/arch/ia64/kernel/iosapic.c 2004-10-11 17:40:47.000000000 -0400 @@ -639,107 +639,135 @@ printk(KERN_INFO "PLATFORM int %s (0x%x): GSI %u (%s, %s) -> CPU %d (0x%04x) vector %d\n", int_type < ARRAY_SIZE(name) ? name[int_type] : "unknown", int_type, gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"), - (polarity == IOSAPIC_POL_HIGH ? "high" : "low"), - cpu_logical_id(dest), dest, vector); + setf.sig f9=r9 // certain to stall, so issue it _after_ ldf8... + ;; + xmpy.lu f10=f9,f8 // calculate low 64 bits of 128-bit product (4 cyc) + xmpy.hu f11=f9,f8 // calculate high 64 bits of 128-r a legacy ISA IRQ override. + * Note that the gsi_base and IOSAP11 + ;; + shrp r8=r9,r8,IA64_NSEC_PER_CYC_SHIFT + br.ret.sptk.many c_override_isa_irq (unsigned int isa_irq, unsigned int gsi, + e + .save rp, r0 // this is the end of the call-chain + .body + or; + unsigned int dest = hard_smp_processor_id(); - set_rte(vector, dest, mask); - return vector; -} + vector = isabr.call.sptk.many rp = kernel_thread_helper;; + mov out0 = r8 + br.call.sptk.many rp = sys_exit;; +1: br.sptk.few 1b // not reached +END(start_kernel_thread) +#ifdef CONFIG_IA64_BRL_EMU /* - * ACPI calls this when it finds an entry for a legacy ISA IRQ override. - * Note that the gsi_base and IOSAPIC address must be set in iosapic_init(). + * Assembly routines used by brl_emu.c to set preserved register state. */ -void __init -iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi, - unsigned long polarity, - unsigned long trigger) -{ - int vector; - unsigned int dest = hard_smp_processor_id(); - - vector = isa_irq_to_vector(isa_irq); - - register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, polarity, trigger); - - DBG("ISA: IRQ %u -> GSI %u (%s,%s) -> CPU %d (0x%04x) vector %d\n", - isa_irq, gsi, trigger == IOSAPIC_EDGE ? "edge" : "level", - polarity == IOSAPIC_POL_HIGH ? "high" : "low", - cpu_logical_id(dest), dest, vector); - - set_rte(vector, dest, 1); -} - -void __init -iosapic_system_init (int system_pcat_compat) -{ - int vector; - - for (vector = 0; vector < IA64_NUM_VECTORS; ++vector) - iosapic_intr_info[vector].rte_index = -1; /* mark as unused */ - - pcat_compat = system_pcat_compat; - if (pcat_compat) { - /* - * Disable the compatibility mode interrupts (8259 style), needs IN/OUT support - * enabled. - */ - printk(KERN_INFO "%s: Disabling PC-AT compatible 8259 interrupts\n", __FUNCTION__); - outb(0xff, 0xA1); - outb(0xff, 0x21); - } -} - -void __init -iosapic_init (unsigned long phys_addr, unsigned int gsi_base) -{ - int num_rte; - unsigned int isa_irq, ver; - char __iomem *addr; - addr = ioremap(phys_addr, 0); - ver = iosapic_version(addr); +#define SET_REG(reg) \ + GLOBAL_ENTRY(ia64_set_##reg); \ + alloc r16=ar.pfs,1,0,0,0; \ + mov reg=r32; \ + ;; \ + br.ret.sptk.many rp; \ + END(ia64_set_##reg) + +SET_REG(b1); +vector < IA64_NUM_VECTORS; ++vector) + iosapic_intr_info[vector]ONFIG_IA64_BRL_EMU */ +#ifdef CONFIG_SMP /* - * The MAX_REDIR register holds the highest input pin - * number (starting from 0). - * We add 1 so that we can use it for number of pins (= RTEs) - */ - num_rte = ((ver >> 16) & 0xff) + 1; - - iosapic_lists[num_iosapic].addr = addr; - iosapic_lists[num_iosapic].gsi_base = gsi_base; - iosapic_lists[num_iosapic].num_rte = num_rte; -#ifdef CONFIG_NUMA - iosapic_lists[num_iosapic].node = MAX_NUMNODES; -#endif - num_iosapic++; - - if ((gsi_base == 0) && pcat_compat) { + * This routine hat_compat; + if (pcat_compat) { /* - * Map the legacy ISA devices into the IOSAPIC data. Some of these may - * get reprogrammed later on with data from the ACPI Interrupt Source - * Override table. + * Disable the compatibilitonvention to avoid converting leaf routines into interior routind. */ - for (isa_irq = 0; isa_irq < 16; ++isa_irq) - iosapic_override_isa_irq(isa_irq, isa_irq, IOSAPIC_POL_HIGH, IOSAPIC_EDGE); - } -} - + printk(KERN_INFO "%s: Disabling PC-AT compatible 8259estrictions: + * + * - do not use gp relative variables, this code is called from the kernel + * and from modules, r1 is undefined. + * - do not use stacked registers, the caller owns them. + * - do not use the scratch stack space, the caller owns it. + * - do not use any registers other than the ones listed below + * + * Inputs: + * ar.pfs - saved CFM of caller + * ar.ccv - 0 (and available for use) + * r27 - flags from spin_lock_ir(ver >> 16) & 0xff) + 1; + + iosapic_lists[num_iosapic].addr = add. + * r29 - available for use. + * r30 - available forts[num_iosapic].num_rte = num_rte; #ifdef CONFIG_NUMA -void __init -map_iosapic_to_node(unsigned int gsi_base, int node) + iosapic_l6 - return address + * p14 - available for use. + * p15 - used to track flag status. + * + * If you patch this code to use more registers, do not forget to update + * the clobberprogrammed later on with data from the ACPI Interrupt Source + __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3) + +GLOBAL_ENTRY(ia64_spinlock_contention_pre3_4) + .prologue + .save ar.pfs, r0 // this code effectively has a zero frame size + .save rp, r28apic_to_node(unsigned int gsi_base, int node) { int index; index = find_iosapic(gsi_base); if (index < 0) { printk(KERN_WARNING "%s: No IOSAPIC for GSI %u\n", - __FUNCTION__, gsi_base); - return; - } - iosapic_lists[index].node = node; - return; -} -#endif + __FUNCTION__, gsi_enable interrupts if they were on + // DavidM says that srlz.d is slow and is not required in this case +.wait: + // exponential backoff, kdb, lockmeter etc. go in here + hint @pause + ld4 r30=107 1 + char *addr; /* base address of IOSAPIC */ +d117 1 +a117 1the word + nop 0 + ;; + cmp4.ne p14,p0=r30,r0 +(p14) br.cond.sptk.fer *addr; +d240 1 +a240 1 + char *addr; +d264 1 +a264 1 + char *addr; +dhem + br.cond.sptk.few b6 // lock is now free, try to acquire +ENDddr) +d460 1 +a460 1 + char *iosapic_address; +d699 1 +a699 1 + char *lock_contention) + .prologue + .altrp b6 + .body + tbit.nz p15,p0=r27,IA64_PSR_I_BIT + ;; +.wait: +(p15) ssm psr.i // reenable interrupts if they were on + // DavidM says that srlz.d is slow and if IOSAPIC */ +d182 1 +a182 1 + char __iomem *addr; +d240 1 +a240 1 + c, lockmeter etc. go in here + hint @pause + ld4 r30=[r31] // don0 1 + char __iomem *addr; +d415 1 +a415 1 +iosapic_version (char __i cmp4.ne p14,p0=r30,r0 + mov r30 = 1 +(p14) br.cond.sptk.few .wait +a699 1 + char __iomem *addr; diff -ur --exclude CVS --exclude .cvsignore linux-2.6.9/arch/m32r/kernel/setup_usrv.c corrupt-2.6.9/arch/m32r/kernel/setup_usrv.c --- linux-2.6.9/arch/m32r/kernel/setup_usrv.c 2004-10-18 17:54:38.000000000 -0400 +++ corrupt-2.6.9/arch/m32r/kernel/setup_usrv.c 2004-10-11 17:40:49.000000000 -0400 @@ -119,19 +119,14 @@ disable_m32700ut_pld_irq(irq); } -static void end_m32700ut_pld_irq(unsigned int irq) -{ - enable_m32700ut_pld_irq(irq); - end_mappi_irq(M32R_IRQ_INT1); +static void end_m32700ut_pld_irq(unsigned int iove_wait_queue_locked(&sem->wait, &wait); + wake_up_locked(&sem->1); } -static unsigned int startup_m32700ut_pld_irq(unsigned int irq) -{ - enable_m32700ut_pld_irq(irq); - return 0; +static unsigned int startup_m32700ut_pld_irq(unsigned intate = TASK_RUNNING; } -static void shutdown_m32700ut_pld_irq(unsigned int irq) +asmlinkage int __sched __down_interruptib shutdown_m32700ut_pld_irq(unsigned int irq) { unsigned long port; unsigned int pldirq; @@ -146,9 +141,11 @@ "USRV-PLD-IRQ", startup_m32700ut_pld_irq, shutdown_m32700ut_pld_irq, - enable_m32700ut_pld_irq, - disable_m32700ut_pld_irq, - mask_and_ack_m32700ut_pld, + enable_sleepers; + + /* + * With signals pending, this turns into + * 0ut_pld, end_m32700ut_pld_irq }; @@ -163,45 +160,53 @@ once++; /* MFT2 : system timer */ - irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_MFT2].handler = &mappi_irq_type; + irq_desc[M32R_IRQ_MFT2].status al = -EINTR; + sem->sleepers = 0; + atomic_add(sleepers, &sem-pe; irq_desc[M32R_IRQ_MFT2].action = 0; - irq_desc[M32R_IRQ_MFT2].depth = 1; - icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; - disable_mappi_irq(M32R_IRQ_MFT2); + irq_desc[M32R_IRQ_MFT2They aren't + * playing, because we own the spinlock in + * waisable_mappi_irq(M32R_IRQ_MFT2); #if defined(CONFIG_SERIAL_M32R_SIO) /* SIO0_R : uart receive data */ - irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO0_R].handler = &mappi_irq_type; - irq_desc[M32R_IRQ_SIO0_R].action = 0; - irq_desc[M32R_IRQ_SIO0_R].depth = 1; - icu_data[M32R_IRQ_SIO0_R].icucr = 0; - disable_mappi_irq(M32R_IRQ_SIO0_R); - - /* SIO0_S : uart send data */ + irq_desc[M32R_IRQ_SIO0_&sem->count)) { + sem->sleepers = 0; + break; + } + sem->sleepers = 1; /* us - see -1 above */ + spin_unlock_irqrestore(&sem->[M32R_IRQ_SIO0_R].depth = 1; + icu_data[M32R_IRQ_SIO0_R].icucr = t.lock, flags); + tsk->state = TASK_INTERRUPTIBLE; + } + remove_wadata */ irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; irq_desc[M32R_IRQ_SIO0_S].handler = &mappi_irq_type; irq_desc[M32R_IRQ_SIO0_S].action = 0; irq_desc[M32R_IRQ_SIO0_S].depth = 1; - icu_data[M32R_IRQ_SIO0_S].icucr = 0; - disable_mappi_irq(M32R_IRQ_SIO0_S); + icre we correct for + * having decremented the count. + * + * We coulIO0_S); /* SIO1_R : uart receive data */ - irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO1_R].handler = &mappi_irq_type; + irq_desc[M32R_IRQ_SIre cases, + * but then it wouldn't work on a 386. + */ +asmlinkage = &mappi_irq_type; irq_desc[M32R_IRQ_SIO1_R].action = 0; irq_desc[M32R_IRQ_SIO1_R].depth = 1; icu_data[M32R_IRQ_SIO1_R].icucr = 0; disable_mappi_irq(M32R_IRQ_SIO1_R); - /* SIO1_S : uart send data */ - irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO1_S].handler = &mappi_irq_type; - irq_desc[M32R_IRQ_SIO1_S].action = 0; - irq_desc[M32R_IRQ_SIO1_S].depth = 1; - icu_data[M32R_IRQ_SIO1_S].icucr = 0; - disable_mappi_irq(M32R_IRQ_SIO1_S); + /* SIO1_S : uart seeverybody else" and us into it. They aren't + * playing, becauseq_desc[M32R_IRQ_SIO1_S].handler = &mappi_irq_type; + irq_desc[M32ic_add_negative(sleepers, &sem->count)) { + wake_up_locked(&sem->wait); + } + + spin_unlock_irqrestore(&sem->wait.lock, flags); + reQ_SIO1_S); #endif /* CONFIG_SERIAL_M32R_SIO */ /* INT#67-#71: CFC#0 IREQ on PLD */ diff -ur --exclude CVS --exclude .cvsignore linux-2.6.9/arch/m68k/apollo/dn_debug.c corrupt-2.6.9/arch/m68k/apollo/dn_debug.c --- linux-2.6.9/arch/m68k/apollo/dn_debug.c 2004-10-18 17:53:06.000000000 -0400 +++ corrupt-2.6.9/arch/m68k/apollo/dn_debug.c 2004-05-23 19:51:41.000000000 -0400 @@ -1,22 +1,28 @@ -#define DN_DEBUG_BUFFER_BASE 0x82800000 -#define DN_DEBUG_BUFFER_SIZE 8*1024*1024 - -static char *current_dbg_ptr=DN_DEBUG_BUFFER_BASE; +#define DN_DEBUG_BUFFER_BASE 0x82800000nst char *str) +{ + while (*str) { + if (*str == '\n') { +dbg_ptr=DN_DEBUG_BUFFER_BASE; int dn_deb_printf(const char *fmt, ...) { va_list args; int i; - if(current_dbg_ptr<(DN_DEBUG_BUFFER_BASE + DN_DEBUG_BUFFER_SIZE)) { - va_start(args,fmt); - i=vsprintf(current_dbg_ptr,fmt,args); - va_end(args); - current_dbg_ptr+=i; - - return i; - } - else - return 0; + if(current_dbg_ptr<(DN_DEBUG_ sio01.rhrb_thrb = (unsigned char)*str++; + while (!(sio01.srb_csrb & 0x4)) + ; + } } + +void config_apollo(void) { + + int i; + + dn_setup_model(); + + mach_sched_init=dn_sched_init; /* */ + mach_init_IRQ=dn_init_IRQ; + mach_default_handler=NULLa20 1 + else diff -ur --exclude CVS --exclude .cvsignore linux-2.6.9/arch/m68k/fpsp040/srem_mod.S corrupt-2.6.9/arch/m68k/fpsp040/srem_mod.S --- linux-2.6.9/arch/m68k/fpsp040/srem_mod.S 2004-10-18 17:53:06.000000000 -0400 +++ corrupt-2.6.9/arch/m68k/fpsp040/srem_mod.S 2004-05-23 19:51:42.000000000 -0400 @@ -256,37 +256,57 @@ scs %d6 | ...set Carry if 2(R) overflows addql #1,%a1 | ...k := k+1 subql #1,%d0 | ...j := j - 1 -|..At this point, R=(Carry,D1,D2) = 2^(k-L)X - QY, j+k=L, j >= 0, R < 2Y. +|..At this point, R=(Carry,D1,D2) = 2^(k-L)X - QY, j+k=L, j >= 0, R a t_frcinx - bras Mod_Loop + .global slog10 +slog10: +|--entry point for Log10(X), X is normalized -PostLoop: -|..k = L, j = 0, Carry = 0, R = (D1,D2) = X - QY, R < Y. + movel (%a0),%d0 + blt invalid + movel %d1,-ovel L_SCR1(%a6),%d0 | ...new biased exp%sp)+,%fpcr + fmulx INV_L10,%fp0 + bra t_frcinx -|..normalize R. - movel L_SCR1(%a6),%d0 | ...new biased expo of R - tstl %d1 - bnes HiR_not0 + + .global slog20 HiR_0: movel %d2,%d1 - clrl %d2 - subil #32,%d0 - clrl %d6 - bfffo %d1{#0:#32},%d6 - lsll %d6,%d1 - subl %d6,%d0 | ...(D0,D1,D2) is normalized -| ...with bias $7FFD - bras Get_Mod - -HiR_not0: - clrl %d6 - bfffo %d1{#0:#32},%d6 - bmis Get_Mod | ...already normalized - subl %d6,%d0 - lsll %d6,%d1 - movel %d2,%d7 | ...a copy of D2 - lsll %d6,%d2 + clrl (%a0),%d0 + blt invalid + movel %d1,-(%sp) + clrl %d1 + bsr slo bfffo %d1{#0:#32},%d6 + lsll %d62,%fp0 + bra t_frcinx + + .global slog2 +slog2: +|--entry point for Log2(X), X is normalized + movel (%a0),%d0 + blt invalid + + movel 8(%a0),%d0 + bnes continue | ...X is not 2^k + + movel 4(%a0),%d0 + andl #0x7FFFFFFF,%d0 + tstl %d0 + bnes continue + +|--X = 2^k. + movew (%a0),%d0 + andl #0x00007FFF,%d0 + subl #0x3FFF,%d0 + fmovel %d1,%fpcr + fmovel %d0,%fp0 + bra t_frcinx + +continue: + movel %d1,-(%sp) + clrl %d1 + bsr slogn | ...log(X), X normal. %d6,%d2 negl %d6 addil #32,%d6 lsrl %d6,%d7 diff -ur --exclude CVS --exclude .cvsignore linux-2.6.9/arch/m68k/ifpsp060/ilsp.sa corrupt-2.6.9/arch/m68k/ifpsp060/ilsp.sa --- linux-2.6.9/arch/m68k/ifpsp060/ilsp.sa 2004-10-18 17:54:30.000000000 -0400 +++ corrupt-2.6.9/arch/m68k/ifpsp060/ilsp.sa 2003-07-29 13:00:30.000000000 -0400 @@ -88,14 +88,14 @@ dc.l $fffc242e,$00083036,$0161000c,$32360162 dc.l $000c0002,$48c048c1,$60000092,$4e56fffc dc.l $48e73800,$42eefffc,$242e0008,$20360161 - dc.l $000c2236,$0162000c,$00046000,$00704e56 - dc.l $fffc48e7,$380042ee,$fffc242e,$00081036 - dc.l $0161000c,$12360162,$000c0001,$49c049c1 - dc.l $49c26000,$00484e56,$fffc48e7,$380042ee - dc.l $fffc242e,$00083036,$0161000c,$32360162 - dc.l $000c0002,$48c048c1,$48c26000,$00204e56 - dc.l $fffc48e7,$380042ee,$fffc242e,$00082036 - dc.l $0161000c,$22360162,$000c0004,$948042c3 - dc.l $02030004,$9280b282,$42c48604,$02030005 - dc.l $382efffc,$0204001a,$880344c4,$4cdf001c - dc.l $4e5e4e75,$00000000,$00000000,$00000000 + dc.l $000c2236,$0162000c,$00046000,$00704e56 + dc.l $fffc48e7,$380042ee,$fffc242e,$00081036 + dc.l $0161000c,$12360162,$000c0001,$49c049c1 + dc.l $49c26000,$00484e56,$fffc48e7,$380042ee + dc.l $fffc242e,$00083036,$0161000c,$32360162 + dc.l $000c0002,$48c048c1,$48c26000,$00204e56 + dc.l $fffc48e7,$380042ee,$fffc242e,$00082036 + dc.l $0161000c,$22360162,$000c0004,$948042c3 + dc.l $02030004,$9280b282,$42c48604,$02030005 + dc.l $382efffc,$0204001a,$880344c4,$4cdf001c + dc.l $4e5e4e75,$00000000,$00000000,$00000000 diff -ur --exclude CVS --exclude .cvsignore linux-2.6.9/arch/m68knommu/kernel/setup.c corrupt-2.6.9/arch/m68knommu/kernel/setup.c --- linux-2.6.9/arch/m68knommu/kernel/setup.c 2004-10-18 17:54:38.000000000 -0400 +++ corrupt-2.6.9/arch/m68knommu/kernel/setup.c 2004-07-20 18:05:29.000000000 -0400 @@ -247,12 +247,8 @@ /* * Get kmalloc into gear. */ - paging_init(); -} - -int get_cpuinfo(char * buffer) -{ - char *cpu, *mmu, *fpu; + paging_inic = regs->pc; + dump->regs.fmtvec = (regs->format << 12) | regs->pu; u_long clockfreq; cpu = CPU; @@ -266,12 +262,11 @@ #endif return(sprintf(buffer, "CPU:\t\t%s\n" - "MMU:\t\t%s\n" - "FPU:\t\t%s\n" - "Clocking:\t%lu.%1luMHz\n" - "BogoMips:\t%lu.%02lu\n" - "Calibration:\t%lu loops\n", - cpu, mmu, fpu, + "MMU:\t\t%s\nCURRENT PROCESS:\n\n"); + printk(KERN_EMERG "COMM=%s PID=%d\n", current->comm, current->pid); + + if (current->mm) { + printk(KERN mmu, fpu, clockfreq/1000000,(clockfreq/100000)%10, (loops_per_jiffy*HZ)/500000,((loops_per_jiffy*HZ)/5000)%100, (loops_per_jiffy*HZ))); @@ -287,58 +282,47 @@ char *cpu, *mmu, *fpu; u_long clockfreq; - cpu = CPU; - mmu = "none"; - fpu = "none"; - -#ifdef CONFIG_COLDFIRE + current->mm->start_stack, + (int)(((unsigned long) current) + KTDFIRE clockfreq = (loops_per_jiffy*HZ)*3; #else - clockfreq = (loops_per_jiffy*HZ)*16; -#endif - - seq_printf(m, "CPU:\t\t%s\n" - "MMU:\t\t%s\n" - "FPU:\t\t%s\n" - "Clocking:\t%lu.%1luMHz\n" - "BogoMips:\t%lu.%02lu\n" - "Calibration:\t%lu loops\n", + clockfreintk(KERN_EMERG "SR: %08lx SP: %08lx\n", (long) fp->sr, (long) fp); + printk(KERN_EMERG "d0: %08lx d1: %08lx d2: %08lx d3: %08lx\n", + fp->d0, fp->d1, fp->d2, fp->d3); + printk(KERN_%lu loops\n", cpu, mmu, fpu, - clockfreq/1000000,(clockfreq/100000)%10, - (loops_per_jiffy*HZ)/500000,((loops_per_jiffy*HZ)/5000)%100, - (loops_per_jiffy*HZ)); - - return 0; -} - -static void *c_start(struct seq_file *m, loff_t *pos) + clockfreq/1000000,(clockf->d4, fp->d5, fp->a0, fp->a1); + printk(KERN_EMERG "\nUSP: %08x TRAPFRAME: %08x\n", (unsigned int) rdusp(), + (unsigned int) fptic void *c_start(struct seq_file *m, loff_t *pos) { return *pos < NR_CPUS ? ((void *) 0x12345678) : NULL; } -static void *c_next(struct seq_file *m, void *v, loff_t *pos) -{ - ++*pos; - return c_start(m, pos); +static void *c_ne i += 4) { + if ((i % 0x10) == 0) + printk(KERN_EMERG "\n%08x: c_start(m, pos); } -static void c_stop(struct seq_file *m, void *v) -{ -} +static void c_stop(struct seq_file *m, void } + printk(KERN_EMERG "\n"); -struct seq_operations cpuinfo_op = { - .start = c_start, + printk(KERN_EMERG "\nKERNEL STACK: .next = c_next, .stop = c_stop, .show = show_cpuinfo, }; void arch_gettod(int *year, int *mon, int *day, int *hour, - int *min, int *sec) -{ - if (mach_gettod) - mach_gettod(year, mon, day, hour, min, sec); - else - *year = *mon = *day = *hour = *min = *sec = 0; -} - + int printk(KERN_EMERG "\n%08x: ", (int) (tp + i)); + printk(KERN_EMERG "%08x ", (int) *sp++); + } + printk(KERN_EMERG "\n"); + printk(KERN_EMERG "\n"); + + printk(KERN_EMERG "\nUSER STACK:"); + tp = (unsigned char *) (rdusp() - 0x10); + for (sp = (unsigned long *) tp, i = 0; (i < 0x80); i += 4) { + if ((i % 0x10) == 0) + printk(KERN_EMERG "\n%08x: ", (int) (tp + i)); + printk(KERN_EMERG "%0f defined(CONFIG_M528x) + #define CPU "COLDFIRE(m5280/5282)"