[PATCH] Patch for 2.1.41 without printk patch

Wolfram Kleff (kleff@informatik.uni-bonn.de)
Sat, 31 May 1997 00:26:10 +0200 (MET DST)


This is the patch for 2.1.41 without the controversial printk patch.

diff -u --recursive --new-file linux-2.1.41/Makefile linux/Makefile
--- linux-2.1.41/Makefile Tue May 27 14:01:16 1997
+++ linux/Makefile Tue May 27 14:01:16 1997
@@ -88,7 +88,7 @@
# standard CFLAGS
#

-CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+CFLAGS = -Wall -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -O2 -fomit-frame-pointer

ifdef CONFIG_CPP
CFLAGS := $(CFLAGS) -x c++
diff -u --recursive --new-file linux-2.1.41/arch/i386/defconfig linux/arch/i386/defconfig
--- linux-2.1.41/arch/i386/defconfig Tue May 27 14:01:16 1997
+++ linux/arch/i386/defconfig Tue May 27 14:01:16 1997
@@ -12,12 +12,12 @@
#
CONFIG_MODULES=y
# CONFIG_MODVERSIONS is not set
-# CONFIG_KERNELD is not set
+CONFIG_KERNELD=y

#
# General setup
#
-# CONFIG_MATH_EMULATION is not set
+CONFIG_MATH_EMULATION=y
CONFIG_NET=y
CONFIG_PCI=y
# CONFIG_MCA is not set
@@ -25,10 +25,7 @@
CONFIG_SYSCTL=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-CONFIG_M686=y
+CONFIG_M386=y
# CONFIG_VIDEO_SELECT is not set
# CONFIG_PNP_PARPORT is not set

@@ -126,7 +123,7 @@
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_AM53C974 is not set
-CONFIG_SCSI_BUSLOGIC=y
+# CONFIG_SCSI_BUSLOGIC is not set
CONFIG_SCSI_OMIT_FLASHPOINT=y
# CONFIG_SCSI_DTC3280 is not set
# CONFIG_SCSI_EATA_DMA is not set
@@ -157,15 +154,9 @@
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NE2000 is not set
# CONFIG_NET_ISA is not set
-CONFIG_NET_EISA=y
-# CONFIG_PCNET32 is not set
-# CONFIG_APRICOT is not set
-# CONFIG_CS89x0 is not set
-# CONFIG_DE4X5 is not set
-# CONFIG_DEC_ELCP is not set
-# CONFIG_DGRS is not set
-CONFIG_EEXPRESS_PRO100=y
+# CONFIG_NET_EISA is not set
# CONFIG_NET_POCKET is not set
# CONFIG_FDDI is not set
# CONFIG_DLCI is not set
@@ -216,6 +207,7 @@
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
+# CONFIG_VT_CONSOLE_COLOR is not set
CONFIG_SERIAL=y
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
diff -u --recursive --new-file linux-2.1.41/arch/i386/kernel/irq.c linux/arch/i386/kernel/irq.c
--- linux-2.1.41/arch/i386/kernel/irq.c Tue May 27 14:01:16 1997
+++ linux/arch/i386/kernel/irq.c Tue May 27 14:01:16 1997
@@ -222,7 +222,7 @@
math_error();
}

-static struct irqaction irq13 = { math_error_irq, 0, 0, "math error", NULL, NULL };
+static struct irqaction irq13 = { math_error_irq, 0, 0, "FPU math error", NULL, NULL };

/*
* IRQ2 is cascade interrupt to second interrupt controller
diff -u --recursive --new-file linux-2.1.41/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c
--- linux-2.1.41/arch/i386/kernel/setup.c Tue May 27 14:01:16 1997
+++ linux/arch/i386/kernel/setup.c Tue May 27 14:01:16 1997
@@ -2,6 +2,8 @@
* linux/arch/i386/kernel/setup.c
*
* Copyright (C) 1995 Linus Torvalds
+ *
+ * correct AMD CPU detection 1997-05-26, Wolfram Kleff
*/

/*
@@ -233,14 +235,23 @@
return NULL;
}

-static const char * i586model(unsigned int nr)
+static const char * i586model(unsigned int nr, const char *vendor)
{
- static const char *model[] = {
+ static const char *intel_model[] = {
"0", "Pentium 60/66","Pentium 75+","OverDrive PODP5V83",
"Pentium MMX"
};
- if (nr < sizeof(model)/sizeof(char *))
- return model[nr];
+ static const char *amd_model[] = {
+ "AMD-K5-PR75/90/100", "AMD-K5-PR120/133","AMD-K5-PR166",
+ "AMD-K5-PR200"
+ };
+ if (vendor && strcmp(vendor,"AuthenticAMD")==0) {
+ if (nr < sizeof(amd_model)/sizeof(char *))
+ return amd_model[nr];
+ } else {
+ if (nr < sizeof(intel_model)/sizeof(char *))
+ return intel_model[nr];
+ }
return NULL;
}

@@ -254,7 +265,7 @@
return NULL;
}

-static const char * getmodel(int x86, int model)
+static const char * getmodel(int x86, int model, const char *vendor)
{
const char *p = NULL;
static char nbuf[12];
@@ -263,7 +274,7 @@
p = i486model(model);
break;
case 5:
- p = i586model(model);
+ p = i586model(model,vendor);
break;
case 6:
p = i686model(model);
@@ -311,7 +322,7 @@
CPUN,
CD(x86)+'0',
CD(have_cpuid) ?
- getmodel(CD(x86), CD(x86_model)) :
+ getmodel(CD(x86), CD(x86_model), CD(x86_vendor_id)) :
"unknown",
CD(x86_vendor_id));

diff -u --recursive --new-file linux-2.1.41/drivers/char/rtc.c linux/drivers/char/rtc.c
--- linux-2.1.41/drivers/char/rtc.c Tue May 27 14:01:16 1997
+++ linux/drivers/char/rtc.c Tue May 27 14:01:16 1997
@@ -536,11 +536,11 @@
{
unsigned long flags;

- printk("Real Time Clock Driver v%s\n", RTC_VERSION);
- if(request_irq(RTC_IRQ, rtc_interrupt, SA_INTERRUPT, "rtc", NULL))
+ printk(KERN_INFO "Real Time Clock Driver v%s\n", RTC_VERSION);
+ if(request_irq(RTC_IRQ, rtc_interrupt, SA_INTERRUPT, "Real Time Clock", NULL))
{
/* Yeah right, seeing as irq 8 doesn't even hit the bus. */
- printk("rtc: IRQ %d is not free.\n", RTC_IRQ);
+ printk(KERN_ERR "rtc: IRQ %d is not free.\n", RTC_IRQ);
return -EIO;
}
misc_register(&rtc_dev);
@@ -802,4 +802,3 @@
rtc_irq_data = 0;
restore_flags(flags);
}
-
diff -u --recursive --new-file linux-2.1.41/drivers/isdn/isdn_audio.c linux/drivers/isdn/isdn_audio.c
--- linux-2.1.41/drivers/isdn/isdn_audio.c Tue May 27 14:01:16 1997
+++ linux/drivers/isdn/isdn_audio.c Tue May 27 14:01:16 1997
@@ -247,7 +247,7 @@
{'*', '0', '#', 'D'}
};

-#if ((CPU == 386) || (CPU == 486) || (CPU == 586))
+#ifdef __i386__
static inline void
isdn_audio_tlookup(const void *table, void *buff, unsigned long n)
{
diff -u --recursive --new-file linux-2.1.41/drivers/net/Config.in linux/drivers/net/Config.in
--- linux-2.1.41/drivers/net/Config.in Tue May 27 14:01:16 1997
+++ linux/drivers/net/Config.in Tue May 27 14:01:16 1997
@@ -40,6 +40,7 @@
fi
tristate 'SMC 9194 support' CONFIG_SMC9194
fi
+ tristate 'NE2000/NE1000 support' CONFIG_NE2000
bool 'Other ISA cards' CONFIG_NET_ISA
if [ "$CONFIG_NET_ISA" = "y" ]; then
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
@@ -59,7 +60,6 @@
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'ICL EtherTeam 16i/32 support' CONFIG_ETH16I
fi
- tristate 'NE2000/NE1000 support' CONFIG_NE2000
tristate 'NI5210 support' CONFIG_NI52
tristate 'NI6510 support' CONFIG_NI65
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
diff -u --recursive --new-file linux-2.1.41/include/asm-i386/bugs.h linux/include/asm-i386/bugs.h
--- linux-2.1.41/include/asm-i386/bugs.h Tue May 27 14:01:16 1997
+++ linux/include/asm-i386/bugs.h Tue May 27 14:01:16 1997
@@ -49,8 +49,8 @@

if (!hard_math) {
#ifndef CONFIG_MATH_EMULATION
- printk("No coprocessor found and no math emulation present.\n");
- printk("Giving up.\n");
+ printk(KERN_EMERG "No coprocessor found and no math emulation present.\n");
+ printk(KERN_EMERG "Giving up.\n");
for (;;) ;
#endif
return;
@@ -64,7 +64,7 @@
* So the irq13 will happen eventually, but the exception 16
* should get there first..
*/
- printk("Checking 386/387 coupling... ");
+ printk(KERN_INFO "Checking 386/387 coupling...");
timer_table[COPRO_TIMER].expires = jiffies+50;
timer_table[COPRO_TIMER].fn = copro_timeout;
timer_active |= 1<<COPRO_TIMER;
@@ -77,7 +77,7 @@
if (fpu_error)
return;
if (!ignore_irq13) {
- printk("Ok, fpu using old IRQ13 error reporting\n");
+ printk("OK, FPU using old IRQ13 error reporting\n");
return;
}
__asm__("fninit\n\t"
@@ -92,7 +92,7 @@
: "=m" (*&fdiv_bug)
: "m" (*&x), "m" (*&y));
if (!fdiv_bug) {
- printk("Ok, fpu using exception 16 error reporting.\n");
+ printk("OK, FPU using exception 16 error reporting.\n");
return;

}
@@ -101,13 +101,13 @@

static void check_hlt(void)
{
- printk("Checking 'hlt' instruction... ");
+ printk(KERN_INFO "Checking 'hlt' instruction...");
if (!hlt_works_ok) {
printk("disabled\n");
return;
}
__asm__ __volatile__("hlt ; hlt ; hlt ; hlt");
- printk("Ok.\n");
+ printk("OK\n");
}

static void check_tlb(void)
@@ -118,8 +118,8 @@
* They will fault when they hit an invlpg instruction.
*/
if (x86 == 3) {
- printk("CPU is a 386 and this kernel was compiled for 486 or better.\n");
- printk("Giving up.\n");
+ printk(KERN_EMERG "CPU is a 386 and this kernel was compiled for 486 or better.\n");
+ printk(KERN_EMERG "Giving up.\n");
for (;;) ;
}
#endif
diff -u --recursive --new-file linux-2.1.41/include/asm-i386/uaccess.h linux/include/asm-i386/uaccess.h
--- linux-2.1.41/include/asm-i386/uaccess.h Tue May 27 14:01:16 1997
+++ linux/include/asm-i386/uaccess.h Tue May 27 14:01:16 1997
@@ -6,6 +6,9 @@
*/
#include <linux/sched.h>
#include <asm/segment.h>
+#ifdef __KERNEL__
+#include <linux/config.h>
+#endif

#define VERIFY_READ 0
#define VERIFY_WRITE 1
@@ -43,7 +46,7 @@

extern int __verify_write(const void *, unsigned long);

-#if CPU > 386
+#ifndef CONFIG_M386
#define __access_ok(type,addr,size) \
(__kernel_ok || __user_ok(addr,size))
#else
diff -u --recursive --new-file linux-2.1.41/include/linux/config.h linux/include/linux/config.h
--- linux-2.1.41/include/linux/config.h Tue May 27 14:01:16 1997
+++ linux/include/linux/config.h Tue May 27 14:01:16 1997
@@ -1,7 +1,9 @@
#ifndef _LINUX_CONFIG_H
#define _LINUX_CONFIG_H

+#ifdef __KERNEL__
#include <linux/autoconf.h>
+#endif

/*
* Defines for what uname() should return
diff -u --recursive --new-file linux-2.1.41/init/main.c linux/init/main.c
--- linux-2.1.41/init/main.c Tue May 27 14:01:16 1997
+++ linux/init/main.c Tue May 27 14:01:16 1997
@@ -584,7 +584,7 @@

loops_per_sec = (1<<12);

- printk("Calibrating delay loop.. ");
+ printk(KERN_INFO "Calibrating delay loop: ");
while (loops_per_sec <<= 1) {
/* wait for "start of" clock tick */
ticks = jiffies;
@@ -615,7 +615,7 @@
/* finally, adjust loops per second in terms of seconds instead of clocks */
loops_per_sec *= HZ;
/* Round the value and print it */
- printk("ok - %lu.%02lu BogoMIPS\n",
+ printk("%lu.%02lu BogoMIPS\n",
(loops_per_sec+2500)/500000,
((loops_per_sec+2500)/5000) % 100);
}