You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(135) |
Nov
(123) |
Dec
(83) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(244) |
Feb
(72) |
Mar
(221) |
Apr
(91) |
May
(104) |
Jun
(93) |
Jul
(78) |
Aug
(1) |
Sep
(1) |
Oct
(29) |
Nov
(98) |
Dec
(20) |
| 2003 |
Jan
|
Feb
(21) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(18) |
Sep
(18) |
Oct
(23) |
Nov
(12) |
Dec
(6) |
| 2004 |
Jan
(2) |
Feb
(32) |
Mar
|
Apr
(12) |
May
(11) |
Jun
(11) |
Jul
|
Aug
(9) |
Sep
|
Oct
(15) |
Nov
|
Dec
|
| 2005 |
Jan
|
Feb
(2) |
Mar
(11) |
Apr
(6) |
May
(1) |
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
(2) |
Mar
|
Apr
(25) |
May
(2) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(13) |
Oct
|
Nov
(2) |
Dec
(2) |
| 2011 |
Jan
|
Feb
|
Mar
(10) |
Apr
(10) |
May
(1) |
Jun
(6) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
|
From: James S. <jsi...@us...> - 2001-12-26 21:08:35
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/sh
In directory usw-pr-cvs1:/tmp/cvs-serv21051/arch/sh
Modified Files:
config.in
Log Message:
Synced to 2.5.1. The USB stuff has changed thus breaking the HID stuff.
Index: config.in
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/sh/config.in,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- config.in 2001/10/29 00:10:59 1.15
+++ config.in 2001/12/26 21:08:33 1.16
@@ -189,7 +189,7 @@
if [ "$CONFIG_PCI_GODIRECT" = "y" -o "$CONFIG_PCI_GOANY" = "y" ]; then
define_bool CONFIG_PCI_DIRECT y
fi
- define_bool CONFIG_SH_PCIDMA_NONCOHERENT n
+ bool 'Cache and PCI noncoherent' CONFIG_SH_PCIDMA_NONCOHERENT n
fi
source drivers/pci/Config.in
|
|
From: James S. <jsi...@us...> - 2001-12-26 21:08:35
|
Update of /cvsroot/linuxconsole/ruby/linux/Documentation/DocBook In directory usw-pr-cvs1:/tmp/cvs-serv21051/Documentation/DocBook Modified Files: Makefile kernel-api.tmpl Log Message: Synced to 2.5.1. The USB stuff has changed thus breaking the HID stuff. Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/Documentation/DocBook/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile 2001/11/13 19:38:21 1.6 +++ Makefile 2001/12/26 21:08:32 1.7 @@ -108,7 +108,9 @@ $(TOPDIR)/drivers/video/modedb.c \ $(TOPDIR)/fs/devfs/base.c \ $(TOPDIR)/fs/locks.c \ + $(TOPDIR)/fs/bio.c \ $(TOPDIR)/include/asm-i386/bitops.h \ + $(TOPDIR)/include/linux/usb.h \ $(TOPDIR)/kernel/pm.c \ $(TOPDIR)/kernel/ksyms.c \ $(TOPDIR)/kernel/kmod.c \ Index: kernel-api.tmpl =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/Documentation/DocBook/kernel-api.tmpl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- kernel-api.tmpl 2001/10/15 01:13:16 1.3 +++ kernel-api.tmpl 2001/12/26 21:08:32 1.4 @@ -204,8 +204,83 @@ </chapter> <chapter id="usb"> - <title>USB Devices</title> + <title>USB Devices</title> + + <para>Drivers for USB devices talk to the "usbcore" APIs, and are + exposed through driver frameworks such as block, character, + or network devices. + There are two types of public "usbcore" APIs: those intended for + general driver use, and those which are only public to drivers that + are part of the core. + The drivers that are part of the core are involved in managing a USB bus. + They include the "hub" driver, which manages trees of USB devices, and + several different kinds of "host controller" driver (HCD), which control + individual busses. + </para> + + <para>The device model seen by USB drivers is relatively complex. + </para> + + <itemizedlist> + + <listitem><para>USB supports four kinds of data transfer + (control, bulk, interrupt, and isochronous). Two transfer + types use bandwidth as it's available (control and bulk), + while the other two types of transfer (interrupt and isochronous) + are scheduled to provide guaranteed bandwidth. + </para></listitem> + + <listitem><para>The device description model includes one or more + "configurations" per device, only one of which is active at a time. + </para></listitem> + + <listitem><para>Configurations have one or more "interface", each + of which may have "alternate settings". Interfaces may be + standardized by USB "Class" specifications, or may be specific to + a vendor or device.</para> + + <para>USB device drivers actually bind to interfaces, not devices. + Think of them as "interface drivers", though you + may not see many devices where the distinction is important. + Most USB devices are simple, with only one configuration, + one interface, and one alternate setting. + </para></listitem> + + <listitem><para>Interfaces have one or more "endpoints", each of + which supports one type and direction of data transfer such as + "bulk out" or "interrupt in". The entire configuration may have + up to sixteen endpoints in each direction, allocated as needed + among all the interfaces. + </para></listitem> + + <listitem><para>Data transfer on USB is packetized; each endpoint + has a maximum packet size. + Drivers must often be aware of conventions such as flagging the end + of bulk transfers using "short" (including zero length) packets. + </para></listitem> + + <listitem><para>The Linux USB API supports synchronous calls for + control and bulk messaging. + It also supports asynchnous calls for all kinds of data transfer, + using request structures called "URBs" (USB Request Blocks). + </para></listitem> + + </itemizedlist> + + <para>Accordingly, the USB Core API exposed to device drivers + covers quite a lot of territory. You'll probably need to consult + the USB 2.0 specification, available online from www.usb.org at + no cost, as well as class or device specifications. + </para> + + <sect1><title>Data Types and Macros</title> +!Iinclude/linux/usb.h + </sect1> + + <sect1><title>USB Core APIs</title> !Edrivers/usb/usb.c + </sect1> + </chapter> <chapter id="uart16x50"> |
|
From: James S. <jsi...@us...> - 2001-12-26 21:08:35
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/i386/kernel
In directory usw-pr-cvs1:/tmp/cvs-serv21051/arch/i386/kernel
Modified Files:
setup.c
Log Message:
Synced to 2.5.1. The USB stuff has changed thus breaking the HID stuff.
Index: setup.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/i386/kernel/setup.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- setup.c 2001/12/26 17:28:11 1.31
+++ setup.c 2001/12/26 21:08:32 1.32
@@ -154,6 +154,7 @@
extern void mcheck_init(struct cpuinfo_x86 *c);
extern int root_mountflags;
extern char _text, _etext, _edata, _end;
+extern int blk_nohighio;
static int disable_x86_serial_nr __initdata = 1;
static int disable_x86_fxsr __initdata = 0;
@@ -779,7 +780,7 @@
void __init setup_arch(char **cmdline_p)
{
unsigned long bootmap_size, low_mem_size;
- unsigned long start_pfn, max_pfn, max_low_pfn;
+ unsigned long start_pfn, max_low_pfn;
int i;
#ifdef CONFIG_VISWS
@@ -1055,6 +1056,14 @@
__setup("notsc", tsc_setup);
#endif
+static int __init highio_setup(char *str)
+{
+ printk("i386: disabling HIGHMEM block I/O\n");
+ blk_nohighio = 1;
+ return 1;
+}
+__setup("nohighio", highio_setup);
+
static int __init get_model_name(struct cpuinfo_x86 *c)
{
unsigned int *v;
|
|
From: James S. <jsi...@us...> - 2001-12-26 21:08:35
|
Update of /cvsroot/linuxconsole/ruby/linux In directory usw-pr-cvs1:/tmp/cvs-serv21051 Modified Files: Makefile Log Message: Synced to 2.5.1. The USB stuff has changed thus breaking the HID stuff. Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/Makefile,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- Makefile 2001/12/26 17:28:10 1.42 +++ Makefile 2001/12/26 21:08:32 1.43 @@ -1,6 +1,6 @@ VERSION = 2 -PATCHLEVEL = 5 -SUBLEVEL = 0 +PATCHLEVEL = 5 +SUBLEVEL = 1 EXTRAVERSION = -ruby KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) @@ -160,7 +160,7 @@ DRIVERS-$(CONFIG_SSI) += drivers/ssi/ssi.o DRIVERS-$(CONFIG_L3) += drivers/l3/l3.o -DRIVERS-$(CONFIG_UART) += drivers/serial/uart.o +DRIVERS-$(CONFIG_UART) += drivers/serial/uart.o DRIVERS-$(CONFIG_SOUND) += drivers/sound/sounddrivers.o DRIVERS-$(CONFIG_PCI) += drivers/pci/driver.o DRIVERS-$(CONFIG_MTD) += drivers/mtd/mtdlink.o @@ -260,8 +260,8 @@ boot: vmlinux @$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C arch/$(ARCH)/boot -vmlinux: include/linux/version.h $(CONFIGURATION) init/main.o init/version.o linuxsubdirs - $(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o \ +vmlinux: include/linux/version.h $(CONFIGURATION) init/main.o init/version.o init/do_mounts.o linuxsubdirs + $(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o init/do_mounts.o \ --start-group \ $(CORE_FILES) \ $(DRIVERS) \ @@ -336,6 +336,9 @@ $(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(ARCH)"' -c -o init/version.o init/version.c init/main.o: init/main.c include/config/MARKER + $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -c -o $*.o $< + +init/do_mounts.o: init/do_mounts.c include/config/MARKER $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -c -o $*.o $< fs lib mm ipc kernel drivers net: dummy |
|
From: James S. <jsi...@us...> - 2001-12-26 20:31:39
|
Update of /cvsroot/linuxconsole/ruby/linux/kernel In directory usw-pr-cvs1:/tmp/cvs-serv13793 Modified Files: Makefile Log Message: Synced to 2.5.1 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/kernel/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile 2001/10/15 01:13:17 1.3 +++ Makefile 2001/12/26 20:31:36 1.4 @@ -9,12 +9,13 @@ O_TARGET := kernel.o -export-objs = signal.o sys.o kmod.o context.o ksyms.o pm.o exec_domain.o printk.o +export-objs = signal.o sys.o kmod.o context.o ksyms.o pm.o exec_domain.o \ + printk.o device.o obj-y = sched.o fork.o exec_domain.o panic.o printk.o \ module.o exit.o itimer.o info.o time.o softirq.o resource.o \ sysctl.o acct.o capability.o ptrace.o timer.o user.o \ - signal.o sys.o kmod.o context.o + signal.o sys.o kmod.o context.o device.o ifndef CONFIG_ARM obj-y += dma.o |
|
From: James S. <jsi...@us...> - 2001-12-26 20:29:26
|
Update of /cvsroot/linuxconsole/ruby/linux/kernel
In directory usw-pr-cvs1:/tmp/cvs-serv13145
Modified Files:
printk.c
Log Message:
Hm. Somehow I put the orginal printk.c here. Now we have the proper one.
Index: printk.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/kernel/printk.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- printk.c 2001/12/26 17:28:12 1.23
+++ printk.c 2001/12/26 20:29:23 1.24
@@ -14,6 +14,9 @@
* man...@co...
* Rewrote bits to get rid of console_lock
* 01Mar01 Andrew Morton <an...@uo...>
+ * Added finer grain locking for the console system. Also made it more
+ * VT independent.
+ * 11-28-2001 James Simmons <jsi...@tr...>
*/
#include <linux/mm.h>
@@ -24,18 +27,10 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/interrupt.h> /* For in_interrupt() */
-#include <linux/config.h>
#include <asm/uaccess.h>
-#ifdef CONFIG_MULTIQUAD
-#define LOG_BUF_LEN (65536)
-#elif defined(CONFIG_SMP)
-#define LOG_BUF_LEN (32768)
-#else
#define LOG_BUF_LEN (16384) /* This must be a power of two */
-#endif
-
#define LOG_BUF_MASK (LOG_BUF_LEN-1)
/* printk's without a loglevel use this.. */
@@ -56,11 +51,9 @@
int oops_in_progress;
/*
- * console_sem protects the console_drivers list, and also
- * provides serialisation for access to the entire console
- * driver system.
+ * console_lock protects the console_drivers list
*/
-static DECLARE_MUTEX(console_sem);
+static spinlock_t console_lock = SPIN_LOCK_UNLOCKED;
struct console *console_drivers;
/*
@@ -85,9 +78,6 @@
struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES];
static int preferred_console = -1;
-/* Flag: console code may call schedule() */
-static int console_may_schedule;
-
/*
* Setup a list of consoles. Called from init/main.c
*/
@@ -294,28 +284,29 @@
/*
* Call the console drivers on a range of log_buf
*/
-static void __call_console_drivers(unsigned long start, unsigned long end)
+static void __call_console_drivers(struct console *con, unsigned long start, unsigned long end)
{
- struct console *con;
+ /* Make sure that we print immediately */
+ if (oops_in_progress)
+ init_MUTEX(&con->lock);
- for (con = console_drivers; con; con = con->next) {
- if ((con->flags & CON_ENABLED) && con->write)
- con->write(con, &LOG_BUF(start), end - start);
- }
+ down(&con->lock);
+ con->write(con, &LOG_BUF(start), end - start);
+ up(&con->lock);
}
/*
* Write out chars from start to end - 1 inclusive
*/
-static void _call_console_drivers(unsigned long start, unsigned long end, int msg_log_level)
+static void _call_console_drivers(struct console *con, unsigned long start, unsigned long end, int msg_log_level)
{
- if (msg_log_level < console_loglevel && console_drivers && start != end) {
+ if (msg_log_level < console_loglevel && con && start != end) {
if ((start & LOG_BUF_MASK) > (end & LOG_BUF_MASK)) {
/* wrapped write */
- __call_console_drivers(start & LOG_BUF_MASK, LOG_BUF_LEN);
- __call_console_drivers(0, end & LOG_BUF_MASK);
+ __call_console_drivers(con, start & LOG_BUF_MASK, LOG_BUF_LEN);
+ __call_console_drivers(con, 0, end & LOG_BUF_MASK);
} else {
- __call_console_drivers(start, end);
+ __call_console_drivers(con, start, end);
}
}
}
@@ -325,7 +316,7 @@
* log_buf[start] to log_buf[end - 1].
* The console_sem must be held.
*/
-static void call_console_drivers(unsigned long start, unsigned long end)
+static void call_console_drivers(struct console *con, unsigned long start, unsigned long end)
{
unsigned long cur_index, start_print;
static int msg_level = -1;
@@ -361,14 +352,14 @@
*/
msg_level = default_message_loglevel;
}
- _call_console_drivers(start_print, cur_index, msg_level);
+ _call_console_drivers(con, start_print, cur_index, msg_level);
msg_level = -1;
start_print = cur_index;
break;
}
}
}
- _call_console_drivers(start_print, end, msg_level);
+ _call_console_drivers(con, start_print, end, msg_level);
}
static void emit_log_char(char c)
@@ -398,33 +389,42 @@
*/
asmlinkage int printk(const char *fmt, ...)
{
- va_list args;
- unsigned long flags;
- int printed_len;
- char *p;
- static char printk_buf[1024];
- static int log_level_unknown = 1;
+ static struct {
+ char buf[1024];
+ unsigned long semi_random;
+ } printk_buf;
+ static int log_level_unknown = 1;
+ unsigned long sr_copy;
+ unsigned long flags;
+ struct console *con;
+ int printed_len;
+ va_list args;
+ char *p;
if (oops_in_progress) {
/* If a crash is occurring, make sure we can't deadlock */
spin_lock_init(&logbuf_lock);
- /* And make sure that we print immediately */
- init_MUTEX(&console_sem);
+ spin_lock_init(&console_lock);
}
/* This stops the holder of console_sem just where we want him */
spin_lock_irqsave(&logbuf_lock, flags);
/* Emit the output into the temporary buffer */
+ printk_buf.semi_random += jiffies;
+ sr_copy = printk_buf.semi_random;
va_start(args, fmt);
- printed_len = vsnprintf(printk_buf, sizeof(printk_buf), fmt, args);
+ printed_len = vsnprintf(printk_buf.buf, sizeof(printk_buf.buf), fmt, args);
va_end(args);
+ if (sr_copy != printk_buf.semi_random)
+ panic("buffer overrun in printk()");
+
/*
* Copy the output into log_buf. If the caller didn't provide
* appropriate log level tags, we insert them here
*/
- for (p = printk_buf; *p; p++) {
+ for (p = printk_buf.buf; *p; p++) {
if (log_level_unknown) {
if (p[0] != '<' || p[1] < '0' || p[1] > '7' || p[2] != '>') {
emit_log_char('<');
@@ -437,23 +437,22 @@
if (*p == '\n')
log_level_unknown = 1;
}
+ spin_unlock_irqrestore(&logbuf_lock, flags);
- if (!down_trylock(&console_sem)) {
- /*
- * We own the drivers. We can drop the spinlock and let
- * release_console_sem() print the text
- */
- spin_unlock_irqrestore(&logbuf_lock, flags);
- console_may_schedule = 0;
- release_console_sem();
- } else {
+ spin_lock(&console_lock);
+ for (con = console_drivers; con; con = con->next) {
/*
- * Someone else owns the drivers. We drop the spinlock, which
- * allows the semaphore holder to proceed and to call the
- * console drivers with the output which we just produced.
+ * We own the drivers list. We can drop the lock and
+ * let release_console_sem() print the text
*/
- spin_unlock_irqrestore(&logbuf_lock, flags);
+ spin_unlock(&console_lock);
+ if ((con->flags & CON_ENABLED) && con->write) {
+ if (!down_trylock(&con->lock))
+ release_console_sem(con->device(con));
+ }
+ spin_lock(&console_lock);
}
+ spin_unlock(&console_lock);
return printed_len;
}
EXPORT_SYMBOL(printk);
@@ -462,24 +461,41 @@
* acquire_console_sem - lock the console system for exclusive use.
*
* Acquires a semaphore which guarantees that the caller has
- * exclusive access to the console system and the console_drivers list.
+ * exclusive access to a console system.
*
* Can sleep, returns nothing.
*/
-void acquire_console_sem(void)
+void acquire_console_sem(kdev_t device)
{
+ struct console *con;
+
if (in_interrupt())
BUG();
- down(&console_sem);
- console_may_schedule = 1;
+
+ spin_lock(&console_lock);
+ /* Look for new messages */
+ for (con = console_drivers; con; con = con->next) {
+ if (con->device(con) == device)
+ break;
+ }
+ spin_unlock(&console_lock);
+
+ if (con) {
+ down(&con->lock);
+ //driver->may_schedule = 1;
+ }
}
EXPORT_SYMBOL(acquire_console_sem);
/**
* release_console_sem - unlock the console system
*
- * Releases the semaphore which the caller holds on the console system
- * and the console driver list.
+ * Releases the semaphore which the caller holds that is shared between
+ * the TTY and console system. This function is the most complex. It can
+ * be called by a driver that only has a console i.e lp console and no
+ * tty, the tty system that has no console associated with it, or the final
+ * type which is hardware driven by both a console driver and tty driver.
+ * We have to handle all 3 cases.
*
* While the semaphore was held, console output may have been buffered
* by printk(). If this is the case, release_console_sem() emits
@@ -489,28 +505,48 @@
*
* release_console_sem() may be called from any context.
*/
-void release_console_sem(void)
+void release_console_sem(kdev_t device)
{
- unsigned long flags;
+ struct tty_driver *driver = get_tty_driver(device);
unsigned long _con_start, _log_end;
unsigned long must_wake_klogd = 0;
+ unsigned long flags;
+ struct console *con;
- for ( ; ; ) {
- spin_lock_irqsave(&logbuf_lock, flags);
- must_wake_klogd |= log_start - log_end;
- if (con_start == log_end)
- break; /* Nothing to print */
- _con_start = con_start;
- _log_end = log_end;
- con_start = log_end; /* Flush */
+ if (driver && driver->console)
+ con = driver->console;
+ else {
+ spin_lock(&console_lock);
+ for (con = console_drivers; con; con = con->next) {
+ if (con->device(con) == device)
+ break;
+ }
+ spin_unlock(&console_lock);
+ }
+
+ if (con) {
+ for ( ; ; ) {
+ spin_lock_irqsave(&logbuf_lock, flags);
+ must_wake_klogd |= log_start - log_end;
+ if (con_start == log_end)
+ break; /* Nothing to print */
+ _con_start = con_start;
+ _log_end = log_end;
+ con_start = log_end; /* Flush */
+ spin_unlock_irqrestore(&logbuf_lock, flags);
+ call_console_drivers(con, _con_start, _log_end);
+ }
spin_unlock_irqrestore(&logbuf_lock, flags);
- call_console_drivers(_con_start, _log_end);
+ if (must_wake_klogd && !oops_in_progress)
+ wake_up_interruptible(&log_wait);
+ up(&con->lock);
+ return;
}
- console_may_schedule = 0;
- up(&console_sem);
- spin_unlock_irqrestore(&logbuf_lock, flags);
- if (must_wake_klogd && !oops_in_progress)
- wake_up_interruptible(&log_wait);
+
+ if (driver) {
+ driver->may_schedule = 0;
+ up(driver->tty_lock);
+ }
}
/** console_conditional_schedule - yield the CPU if required
@@ -521,9 +557,9 @@
*
* Must be called within acquire_console_sem().
*/
-void console_conditional_schedule(void)
+void console_conditional_schedule(struct tty_driver *driver)
{
- if (console_may_schedule && current->need_resched) {
+ if (driver->may_schedule && current->need_resched) {
set_current_state(TASK_RUNNING);
schedule();
}
@@ -535,18 +571,6 @@
}
EXPORT_SYMBOL(console_print);
-void console_unblank(void)
-{
- struct console *c;
-
- acquire_console_sem();
- for (c = console_drivers; c != NULL; c = c->next)
- if ((c->flags & CON_ENABLED) && c->unblank)
- c->unblank();
- release_console_sem();
-}
-EXPORT_SYMBOL(console_unblank);
-
/*
* The console driver calls this routine during kernel initialization
* to register the console printing procedure with printk() and to
@@ -555,8 +579,8 @@
*/
void register_console(struct console * console)
{
- int i;
unsigned long flags;
+ int i;
/*
* See if we want to use this console driver. If we
@@ -602,7 +626,7 @@
* Put this console in the list - keep the
* preferred driver at the head of the list.
*/
- acquire_console_sem();
+ spin_lock(&console_lock);
if ((console->flags & CON_CONSDEV) || console_drivers == NULL) {
console->next = console_drivers;
console_drivers = console;
@@ -610,15 +634,19 @@
console->next = console_drivers->next;
console_drivers->next = console;
}
+ spin_unlock(&console_lock);
+
+ init_MUTEX(&console->lock);
+
if (console->flags & CON_PRINTBUFFER) {
/*
- * release_cosole_sem() will print out the buffered messages for us.
+ * release_console_sem() will print out the buffered messages for us.
*/
spin_lock_irqsave(&logbuf_lock, flags);
con_start = log_start;
spin_unlock_irqrestore(&logbuf_lock, flags);
}
- release_console_sem();
+ release_console_sem(console->device(console));
}
EXPORT_SYMBOL(register_console);
@@ -627,7 +655,9 @@
struct console *a,*b;
int res = 1;
- acquire_console_sem();
+ release_console_sem(console->device(console));
+
+ spin_lock(&console_lock);
if (console_drivers == console) {
console_drivers=console->next;
res = 0;
@@ -649,8 +679,7 @@
if (console_drivers == NULL)
preferred_console = -1;
-
- release_console_sem();
+ spin_unlock(&console_lock);
return res;
}
EXPORT_SYMBOL(unregister_console);
|
|
From: James S. <jsi...@us...> - 2001-12-26 17:31:36
|
Update of /cvsroot/linuxconsole/ruby/linux/fs In directory usw-pr-cvs1:/tmp/cvs-serv6592 Removed Files: Config.in Makefile Log Message: In 2.5.X we have devicefs so hopefully we can use it instead. --- Config.in DELETED --- --- Makefile DELETED --- |
|
From: James S. <jsi...@us...> - 2001-12-26 17:30:41
|
Update of /cvsroot/linuxconsole/ruby In directory usw-pr-cvs1:/tmp/cvs-serv6450 Removed Files: AGAINST-2.4.14 Log Message: --- AGAINST-2.4.14 DELETED --- |
|
From: James S. <jsi...@us...> - 2001-12-26 17:30:07
|
Update of /cvsroot/linuxconsole/ruby In directory usw-pr-cvs1:/tmp/cvs-serv6272 Added Files: AGAINST-2.5.0 Log Message: Synced to 2.5.0. Don't use. The default 2.5.0 has a nasty bug in it. --- NEW FILE: AGAINST-2.5.0 --- |
|
From: James S. <jsi...@us...> - 2001-12-26 17:28:16
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video
In directory usw-pr-cvs1:/tmp/cvs-serv5113/drivers/video
Modified Files:
Config.in aty128fb.c fbcon.c fbgen.c fm2fb.c macfb.c pvr2fb.c
sa1100fb.c sgivwfb.c vesafb.c vfb.c
Log Message:
Synced to 2.5.0. Don't use. The default 2.5.0 has a nasty bug in it.
Index: Config.in
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/Config.in,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- Config.in 2001/11/23 04:10:15 1.55
+++ Config.in 2001/12/26 17:28:11 1.56
@@ -80,10 +80,10 @@
fi
fi
if [ "$CONFIG_PPC" = "y" ]; then
- bool ' Open Firmware frame buffer device support' CONFIG_FB_OF
- bool ' Apple "control" display support' CONFIG_FB_CONTROL
- bool ' Apple "platinum" display support' CONFIG_FB_PLATINUM
- bool ' Apple "valkyrie" display support' CONFIG_FB_VALKYRIE
+ dep_bool ' Open Firmware frame buffer device support' CONFIG_FB_OF $CONFIG_ALL_PPC
+ dep_bool ' Apple "control" display support' CONFIG_FB_CONTROL $CONFIG_ALL_PPC
+ dep_bool ' Apple "platinum" display support' CONFIG_FB_PLATINUM $CONFIG_ALL_PPC
+ dep_bool ' Apple "valkyrie" display support' CONFIG_FB_VALKYRIE $CONFIG_ALL_PPC
bool ' IMS Twin Turbo display support' CONFIG_FB_IMSTT
bool ' Chips 65550 display support' CONFIG_FB_CT65550
bool ' S3 Trio display support' CONFIG_FB_S3TRIO
Index: aty128fb.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/aty128fb.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- aty128fb.c 2001/12/02 07:02:03 1.21
+++ aty128fb.c 2001/12/26 17:28:11 1.22
@@ -207,7 +207,7 @@
static char *mode __initdata = NULL;
static int nomtrr __initdata = 0;
-static const char *mode_option __initdata = NULL;
+static char *mode_option __initdata = NULL;
/* PLL constants */
struct aty128_constants {
@@ -711,7 +711,7 @@
crtc->pitch = var->xres_virtual >> 3;
crtc->offset = 0;
- crtc->offset_cntl = 0;
+ crtc->offset_cntl = 0x00010000;
crtc->bpp = var->bits_per_pixel;
return 0;
}
@@ -1086,7 +1086,7 @@
if (!options || !*options)
return 0;
- while ((this_opt = strsep(&options, ","))) {
+ while ((this_opt = strsep(&options, ",")) != NULL) {
if (!strncmp(this_opt, "font:", 5)) {
char *p;
int i;
@@ -1711,6 +1711,7 @@
#ifdef MODULE
MODULE_AUTHOR("(c)1999-2000 Brad Douglas <br...@ne...>");
MODULE_DESCRIPTION("FBDev driver for ATI Rage128 / Pro cards");
+MODULE_LICENSE("GPL");
MODULE_PARM(noaccel, "i");
MODULE_PARM_DESC(noaccel, "Disable hardware acceleration (0 or 1=disabled) (default=0)");
MODULE_PARM(mode, "s");
Index: fbcon.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/fbcon.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- fbcon.c 2001/12/23 00:04:18 1.60
+++ fbcon.c 2001/12/26 17:28:11 1.61
@@ -170,7 +170,7 @@
if (!options || !*options)
return 0;
- while ((this_opt = strsep(&options, ","))) {
+ while ((this_opt = strsep(&options, ",")) != NULL) {
if (!strncmp(this_opt, "font:", 5))
strcpy(fontname, this_opt+5);
}
Index: fbgen.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/fbgen.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- fbgen.c 2001/11/14 17:25:07 1.25
+++ fbgen.c 2001/12/26 17:28:11 1.26
@@ -134,7 +134,7 @@
return 0;
}
- while ((this_opt = strsep(&options, ","))) {
+ while ((this_opt = strsep(&options, ",")) != NULL) {
if (!*this_opt) {
continue;
}
Index: fm2fb.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/fm2fb.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- fm2fb.c 2001/10/29 00:11:00 1.7
+++ fm2fb.c 2001/12/26 17:28:11 1.8
@@ -315,7 +315,7 @@
if (!options || !*options)
return 0;
- while (this_opt = strsep(&options, ",")) {
+ while ((this_opt = strsep(&options, ",")) != NULL) {
if (!strncmp(this_opt, "pal", 3))
fm2fb_mode = FM2FB_MODE_PAL;
else if (!strncmp(this_opt, "ntsc", 4))
Index: macfb.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/macfb.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- macfb.c 2001/10/29 00:11:00 1.8
+++ macfb.c 2001/12/26 17:28:11 1.9
@@ -848,7 +848,7 @@
if (!options || !*options)
return;
- while (this_opt = strsep(&options, ",")) {
+ while ((this_opt = strsep(&options, ",")) != NULL) {
if (!*this_opt) continue;
if (! strcmp(this_opt, "inverse"))
Index: pvr2fb.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/pvr2fb.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- pvr2fb.c 2001/11/02 17:34:53 1.1
+++ pvr2fb.c 2001/12/26 17:28:11 1.2
@@ -1046,7 +1046,7 @@
if (!options || !*options)
return 0;
- while ((this_opt = strsep(&options, ","))) {
+ while ((this_opt = strsep(&options, ",")) != NULL) {
if (!*this_opt)
continue;
if (!strcmp(this_opt, "inverse")) {
Index: sa1100fb.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/sa1100fb.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- sa1100fb.c 2001/11/06 21:56:05 1.18
+++ sa1100fb.c 2001/12/26 17:28:11 1.19
@@ -2370,7 +2370,7 @@
if (!options || !*options)
return 0;
- while (this_opt = strsep(&options, ",")) {
+ while ((this_opt = strsep(&options, ",")) != NULL) {
if (!strncmp(this_opt, "bpp:", 4))
current_par.max_bpp =
Index: sgivwfb.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/sgivwfb.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- sgivwfb.c 2001/10/29 22:58:43 1.11
+++ sgivwfb.c 2001/12/26 17:28:11 1.12
@@ -611,7 +611,7 @@
if (!options || !*options)
return 0;
- while (this_opt = strsep(&options, ",")) {
+ while ((this_opt = strsep(&options, ",")) != NULL) {
}
return 0;
}
Index: vesafb.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/vesafb.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- vesafb.c 2001/11/23 01:25:45 1.18
+++ vesafb.c 2001/12/26 17:28:11 1.19
@@ -187,8 +187,8 @@
if (!options || !*options)
return 0;
-
- while ((this_opt = strsep(&options, ","))) {
+
+ while ((this_opt = strsep(&options, ",")) != NULL) {
if (!*this_opt) continue;
if (! strcmp(this_opt, "inverse"))
@@ -232,10 +232,11 @@
FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
if (!request_mem_region(video_base, video_size, "vesafb")) {
- printk(KERN_ERR
+ printk(KERN_WARNING
"vesafb: abort, cannot reserve video memory at 0x%lx\n",
video_base);
- return -EBUSY;
+ /* We cannot make this fatal. Sometimes this comes from magic
+ spaces our resource handlers simply don't know about */
}
printk("Got requested region (framebuffer)\n");
@@ -369,3 +370,5 @@
* c-basic-offset: 8
* End:
*/
+
+MODULE_LICENSE("GPL");
Index: vfb.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/vfb.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- vfb.c 2001/11/14 22:01:52 1.31
+++ vfb.c 2001/12/26 17:28:12 1.32
@@ -365,7 +365,7 @@
if (!options || !*options)
return 1;
- while (this_opt = strsep(&options, ",")) {
+ while ((this_opt = strsep(&options, ",")) != NULL) {
if (!*this_opt)
continue;
if (!strncmp(this_opt, "disable", 7))
|
|
From: James S. <jsi...@us...> - 2001-12-26 17:28:16
|
Update of /cvsroot/linuxconsole/ruby/linux/include/asm-ppc
In directory usw-pr-cvs1:/tmp/cvs-serv5113/include/asm-ppc
Modified Files:
machdep.h
Log Message:
Synced to 2.5.0. Don't use. The default 2.5.0 has a nasty bug in it.
Index: machdep.h
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/include/asm-ppc/machdep.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- machdep.h 2001/10/08 09:55:39 1.2
+++ machdep.h 2001/12/26 17:28:12 1.3
@@ -1,5 +1,5 @@
/*
- * BK Id: %F% %I% %G% %U% %#%
+ * BK Id: SCCS/s.machdep.h 1.25 11/13/01 21:26:07 paulus
*/
#ifdef __KERNEL__
#ifndef _PPC_MACHDEP_H
@@ -14,13 +14,13 @@
struct pt_regs;
struct pci_bus;
struct pci_dev;
+struct seq_file;
struct machdep_calls {
void (*setup_arch)(void);
- /* Optional, may be NULL. */
- int (*setup_residual)(char *buffer);
/* Optional, may be NULL. */
- int (*get_cpuinfo)(char *buffer);
+ int (*show_cpuinfo)(struct seq_file *m);
+ int (*show_percpuinfo)(struct seq_file *m, int i);
/* Optional, may be NULL. */
unsigned int (*irq_cannonicalize)(unsigned int irq);
void (*init_IRQ)(void);
|
|
From: James S. <jsi...@us...> - 2001-12-26 17:28:16
|
Update of /cvsroot/linuxconsole/ruby/linux/include/asm-ia64 In directory usw-pr-cvs1:/tmp/cvs-serv5113/include/asm-ia64 Modified Files: page.h Log Message: Synced to 2.5.0. Don't use. The default 2.5.0 has a nasty bug in it. Index: page.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/include/asm-ia64/page.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- page.h 2001/09/02 23:21:37 1.1 +++ page.h 2001/12/26 17:28:12 1.2 @@ -55,12 +55,15 @@ #ifdef CONFIG_IA64_GENERIC # include <asm/machvec.h> # define virt_to_page(kaddr) (mem_map + platform_map_nr(kaddr)) +# define page_to_phys(page) XXX fix me #elif defined (CONFIG_IA64_SGI_SN1) # ifndef CONFIG_DISCONTIGMEM # define virt_to_page(kaddr) (mem_map + MAP_NR_DENSE(kaddr)) +# define page_to_phys(page) XXX fix me # endif #else # define virt_to_page(kaddr) (mem_map + MAP_NR_DENSE(kaddr)) +# define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT) #endif #define VALID_PAGE(page) ((page - mem_map) < max_mapnr) |
|
From: James S. <jsi...@us...> - 2001-12-26 17:28:16
|
Update of /cvsroot/linuxconsole/ruby/linux/kernel
In directory usw-pr-cvs1:/tmp/cvs-serv5113/kernel
Modified Files:
printk.c
Log Message:
Synced to 2.5.0. Don't use. The default 2.5.0 has a nasty bug in it.
Index: printk.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/kernel/printk.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- printk.c 2001/12/23 04:59:46 1.22
+++ printk.c 2001/12/26 17:28:12 1.23
@@ -14,9 +14,6 @@
* man...@co...
* Rewrote bits to get rid of console_lock
* 01Mar01 Andrew Morton <an...@uo...>
- * Added finer grain locking for the console system. Also made it more
- * VT independent.
- * 11-28-2001 James Simmons <jsi...@tr...>
*/
#include <linux/mm.h>
@@ -27,10 +24,18 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/interrupt.h> /* For in_interrupt() */
+#include <linux/config.h>
#include <asm/uaccess.h>
+#ifdef CONFIG_MULTIQUAD
+#define LOG_BUF_LEN (65536)
+#elif defined(CONFIG_SMP)
+#define LOG_BUF_LEN (32768)
+#else
#define LOG_BUF_LEN (16384) /* This must be a power of two */
+#endif
+
#define LOG_BUF_MASK (LOG_BUF_LEN-1)
/* printk's without a loglevel use this.. */
@@ -51,9 +56,11 @@
int oops_in_progress;
/*
- * console_lock protects the console_drivers list
+ * console_sem protects the console_drivers list, and also
+ * provides serialisation for access to the entire console
+ * driver system.
*/
-static spinlock_t console_lock = SPIN_LOCK_UNLOCKED;
+static DECLARE_MUTEX(console_sem);
struct console *console_drivers;
/*
@@ -78,6 +85,9 @@
struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES];
static int preferred_console = -1;
+/* Flag: console code may call schedule() */
+static int console_may_schedule;
+
/*
* Setup a list of consoles. Called from init/main.c
*/
@@ -284,29 +294,28 @@
/*
* Call the console drivers on a range of log_buf
*/
-static void __call_console_drivers(struct console *con, unsigned long start, unsigned long end)
+static void __call_console_drivers(unsigned long start, unsigned long end)
{
- /* Make sure that we print immediately */
- if (oops_in_progress)
- init_MUTEX(&con->lock);
+ struct console *con;
- down(&con->lock);
- con->write(con, &LOG_BUF(start), end - start);
- up(&con->lock);
+ for (con = console_drivers; con; con = con->next) {
+ if ((con->flags & CON_ENABLED) && con->write)
+ con->write(con, &LOG_BUF(start), end - start);
+ }
}
/*
* Write out chars from start to end - 1 inclusive
*/
-static void _call_console_drivers(struct console *con, unsigned long start, unsigned long end, int msg_log_level)
+static void _call_console_drivers(unsigned long start, unsigned long end, int msg_log_level)
{
- if (msg_log_level < console_loglevel && con && start != end) {
+ if (msg_log_level < console_loglevel && console_drivers && start != end) {
if ((start & LOG_BUF_MASK) > (end & LOG_BUF_MASK)) {
/* wrapped write */
- __call_console_drivers(con, start & LOG_BUF_MASK, LOG_BUF_LEN);
- __call_console_drivers(con, 0, end & LOG_BUF_MASK);
+ __call_console_drivers(start & LOG_BUF_MASK, LOG_BUF_LEN);
+ __call_console_drivers(0, end & LOG_BUF_MASK);
} else {
- __call_console_drivers(con, start, end);
+ __call_console_drivers(start, end);
}
}
}
@@ -316,7 +325,7 @@
* log_buf[start] to log_buf[end - 1].
* The console_sem must be held.
*/
-static void call_console_drivers(struct console *con, unsigned long start, unsigned long end)
+static void call_console_drivers(unsigned long start, unsigned long end)
{
unsigned long cur_index, start_print;
static int msg_level = -1;
@@ -352,14 +361,14 @@
*/
msg_level = default_message_loglevel;
}
- _call_console_drivers(con, start_print, cur_index, msg_level);
+ _call_console_drivers(start_print, cur_index, msg_level);
msg_level = -1;
start_print = cur_index;
break;
}
}
}
- _call_console_drivers(con, start_print, end, msg_level);
+ _call_console_drivers(start_print, end, msg_level);
}
static void emit_log_char(char c)
@@ -389,42 +398,33 @@
*/
asmlinkage int printk(const char *fmt, ...)
{
- static struct {
- char buf[1024];
- unsigned long semi_random;
- } printk_buf;
- static int log_level_unknown = 1;
- unsigned long sr_copy;
- unsigned long flags;
- struct console *con;
- int printed_len;
- va_list args;
- char *p;
+ va_list args;
+ unsigned long flags;
+ int printed_len;
+ char *p;
+ static char printk_buf[1024];
+ static int log_level_unknown = 1;
if (oops_in_progress) {
/* If a crash is occurring, make sure we can't deadlock */
spin_lock_init(&logbuf_lock);
- spin_lock_init(&console_lock);
+ /* And make sure that we print immediately */
+ init_MUTEX(&console_sem);
}
/* This stops the holder of console_sem just where we want him */
spin_lock_irqsave(&logbuf_lock, flags);
/* Emit the output into the temporary buffer */
- printk_buf.semi_random += jiffies;
- sr_copy = printk_buf.semi_random;
va_start(args, fmt);
- printed_len = vsnprintf(printk_buf.buf, sizeof(printk_buf.buf), fmt, args);
+ printed_len = vsnprintf(printk_buf, sizeof(printk_buf), fmt, args);
va_end(args);
- if (sr_copy != printk_buf.semi_random)
- panic("buffer overrun in printk()");
-
/*
* Copy the output into log_buf. If the caller didn't provide
* appropriate log level tags, we insert them here
*/
- for (p = printk_buf.buf; *p; p++) {
+ for (p = printk_buf; *p; p++) {
if (log_level_unknown) {
if (p[0] != '<' || p[1] < '0' || p[1] > '7' || p[2] != '>') {
emit_log_char('<');
@@ -437,22 +437,23 @@
if (*p == '\n')
log_level_unknown = 1;
}
- spin_unlock_irqrestore(&logbuf_lock, flags);
- spin_lock(&console_lock);
- for (con = console_drivers; con; con = con->next) {
+ if (!down_trylock(&console_sem)) {
/*
- * We own the drivers list. We can drop the lock and
- * let release_console_sem() print the text
+ * We own the drivers. We can drop the spinlock and let
+ * release_console_sem() print the text
*/
- spin_unlock(&console_lock);
- if ((con->flags & CON_ENABLED) && con->write) {
- if (!down_trylock(&con->lock))
- release_console_sem(con->device(con));
- }
- spin_lock(&console_lock);
+ spin_unlock_irqrestore(&logbuf_lock, flags);
+ console_may_schedule = 0;
+ release_console_sem();
+ } else {
+ /*
+ * Someone else owns the drivers. We drop the spinlock, which
+ * allows the semaphore holder to proceed and to call the
+ * console drivers with the output which we just produced.
+ */
+ spin_unlock_irqrestore(&logbuf_lock, flags);
}
- spin_unlock(&console_lock);
return printed_len;
}
EXPORT_SYMBOL(printk);
@@ -461,41 +462,24 @@
* acquire_console_sem - lock the console system for exclusive use.
*
* Acquires a semaphore which guarantees that the caller has
- * exclusive access to a console system.
+ * exclusive access to the console system and the console_drivers list.
*
* Can sleep, returns nothing.
*/
-void acquire_console_sem(kdev_t device)
+void acquire_console_sem(void)
{
- struct console *con;
-
if (in_interrupt())
BUG();
-
- spin_lock(&console_lock);
- /* Look for new messages */
- for (con = console_drivers; con; con = con->next) {
- if (con->device(con) == device)
- break;
- }
- spin_unlock(&console_lock);
-
- if (con) {
- down(&con->lock);
- //driver->may_schedule = 1;
- }
+ down(&console_sem);
+ console_may_schedule = 1;
}
EXPORT_SYMBOL(acquire_console_sem);
/**
* release_console_sem - unlock the console system
*
- * Releases the semaphore which the caller holds that is shared between
- * the TTY and console system. This function is the most complex. It can
- * be called by a driver that only has a console i.e lp console and no
- * tty, the tty system that has no console associated with it, or the final
- * type which is hardware driven by both a console driver and tty driver.
- * We have to handle all 3 cases.
+ * Releases the semaphore which the caller holds on the console system
+ * and the console driver list.
*
* While the semaphore was held, console output may have been buffered
* by printk(). If this is the case, release_console_sem() emits
@@ -505,48 +489,28 @@
*
* release_console_sem() may be called from any context.
*/
-void release_console_sem(kdev_t device)
+void release_console_sem(void)
{
- struct tty_driver *driver = get_tty_driver(device);
+ unsigned long flags;
unsigned long _con_start, _log_end;
unsigned long must_wake_klogd = 0;
- unsigned long flags;
- struct console *con;
- if (driver && driver->console)
- con = driver->console;
- else {
- spin_lock(&console_lock);
- for (con = console_drivers; con; con = con->next) {
- if (con->device(con) == device)
- break;
- }
- spin_unlock(&console_lock);
- }
-
- if (con) {
- for ( ; ; ) {
- spin_lock_irqsave(&logbuf_lock, flags);
- must_wake_klogd |= log_start - log_end;
- if (con_start == log_end)
- break; /* Nothing to print */
- _con_start = con_start;
- _log_end = log_end;
- con_start = log_end; /* Flush */
- spin_unlock_irqrestore(&logbuf_lock, flags);
- call_console_drivers(con, _con_start, _log_end);
- }
+ for ( ; ; ) {
+ spin_lock_irqsave(&logbuf_lock, flags);
+ must_wake_klogd |= log_start - log_end;
+ if (con_start == log_end)
+ break; /* Nothing to print */
+ _con_start = con_start;
+ _log_end = log_end;
+ con_start = log_end; /* Flush */
spin_unlock_irqrestore(&logbuf_lock, flags);
- if (must_wake_klogd && !oops_in_progress)
- wake_up_interruptible(&log_wait);
- up(&con->lock);
- return;
- }
-
- if (driver) {
- driver->may_schedule = 0;
- up(driver->tty_lock);
+ call_console_drivers(_con_start, _log_end);
}
+ console_may_schedule = 0;
+ up(&console_sem);
+ spin_unlock_irqrestore(&logbuf_lock, flags);
+ if (must_wake_klogd && !oops_in_progress)
+ wake_up_interruptible(&log_wait);
}
/** console_conditional_schedule - yield the CPU if required
@@ -557,9 +521,9 @@
*
* Must be called within acquire_console_sem().
*/
-void console_conditional_schedule(struct tty_driver *driver)
+void console_conditional_schedule(void)
{
- if (driver->may_schedule && current->need_resched) {
+ if (console_may_schedule && current->need_resched) {
set_current_state(TASK_RUNNING);
schedule();
}
@@ -571,6 +535,18 @@
}
EXPORT_SYMBOL(console_print);
+void console_unblank(void)
+{
+ struct console *c;
+
+ acquire_console_sem();
+ for (c = console_drivers; c != NULL; c = c->next)
+ if ((c->flags & CON_ENABLED) && c->unblank)
+ c->unblank();
+ release_console_sem();
+}
+EXPORT_SYMBOL(console_unblank);
+
/*
* The console driver calls this routine during kernel initialization
* to register the console printing procedure with printk() and to
@@ -579,8 +555,8 @@
*/
void register_console(struct console * console)
{
+ int i;
unsigned long flags;
- int i;
/*
* See if we want to use this console driver. If we
@@ -626,7 +602,7 @@
* Put this console in the list - keep the
* preferred driver at the head of the list.
*/
- spin_lock(&console_lock);
+ acquire_console_sem();
if ((console->flags & CON_CONSDEV) || console_drivers == NULL) {
console->next = console_drivers;
console_drivers = console;
@@ -634,19 +610,15 @@
console->next = console_drivers->next;
console_drivers->next = console;
}
- spin_unlock(&console_lock);
-
- init_MUTEX(&console->lock);
-
if (console->flags & CON_PRINTBUFFER) {
/*
- * release_console_sem() will print out the buffered messages for us.
+ * release_cosole_sem() will print out the buffered messages for us.
*/
spin_lock_irqsave(&logbuf_lock, flags);
con_start = log_start;
spin_unlock_irqrestore(&logbuf_lock, flags);
}
- release_console_sem(console->device(console));
+ release_console_sem();
}
EXPORT_SYMBOL(register_console);
@@ -655,9 +627,7 @@
struct console *a,*b;
int res = 1;
- release_console_sem(console->device(console));
-
- spin_lock(&console_lock);
+ acquire_console_sem();
if (console_drivers == console) {
console_drivers=console->next;
res = 0;
@@ -679,7 +649,8 @@
if (console_drivers == NULL)
preferred_console = -1;
- spin_unlock(&console_lock);
+
+ release_console_sem();
return res;
}
EXPORT_SYMBOL(unregister_console);
|
|
From: James S. <jsi...@us...> - 2001-12-26 17:28:15
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video/tdfx
In directory usw-pr-cvs1:/tmp/cvs-serv5113/drivers/video/tdfx
Modified Files:
3dfxfb.c
Log Message:
Synced to 2.5.0. Don't use. The default 2.5.0 has a nasty bug in it.
Index: 3dfxfb.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/tdfx/3dfxfb.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- 3dfxfb.c 2001/10/15 01:13:17 1.14
+++ 3dfxfb.c 2001/12/26 17:28:12 1.15
@@ -1254,7 +1254,7 @@
if(!options || !*options)
return;
- while((this_opt = strsep(&options, ","))) {
+ while ((this_opt = strsep(&options, ",")) != NULL) {
if(!*this_opt)
continue;
if(!strcmp(this_opt, "inverse")) {
|
|
From: James S. <jsi...@us...> - 2001-12-26 17:28:15
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char
In directory usw-pr-cvs1:/tmp/cvs-serv5113/drivers/char
Modified Files:
Config.in Makefile
Log Message:
Synced to 2.5.0. Don't use. The default 2.5.0 has a nasty bug in it.
Index: Config.in
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/Config.in,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- Config.in 2001/12/22 17:04:47 1.34
+++ Config.in 2001/12/26 17:28:11 1.35
@@ -23,6 +23,9 @@
tristate ' Dual serial port support' CONFIG_DUALSP_SERIAL
fi
fi
+ if [ "$CONFIG_ACPI" = "y" ]; then
+ bool ' Support for serial ports defined by ACPI tables' CONFIG_SERIAL_ACPI
+ fi
dep_mbool 'Extended dumb serial driver options' CONFIG_SERIAL_EXTENDED $CONFIG_SERIAL
if [ "$CONFIG_SERIAL_EXTENDED" = "y" ]; then
bool ' Support more than 4 serial ports' CONFIG_SERIAL_MANY_PORTS
@@ -61,23 +64,22 @@
tristate ' Specialix SX (and SI) card support' CONFIG_SX
tristate ' Specialix RIO system support' CONFIG_RIO
if [ "$CONFIG_RIO" != "n" ]; then
- bool ' Support really old RIO/PCI cards' CONFIG_RIO_OLDPCI
+ bool ' Support really old RIO/PCI cards' CONFIG_RIO_OLDPCI
fi
bool ' Stallion multiport serial support' CONFIG_STALDRV
if [ "$CONFIG_STALDRV" = "y" ]; then
- tristate ' Stallion EasyIO or EC8/32 support' CONFIG_STALLION
- tristate ' Stallion EC8/64, ONboard, Brumby support' CONFIG_ISTALLION
+ tristate ' Stallion EasyIO or EC8/32 support' CONFIG_STALLION
+ tristate ' Stallion EC8/64, ONboard, Brumby support' CONFIG_ISTALLION
fi
if [ "$CONFIG_MIPS" = "y" ]; then
- bool ' TMPTX3912/PR31700 serial port support' CONFIG_SERIAL_TX3912
- dep_bool ' Console on TMPTX3912/PR31700 serial port' CONFIG_SERIAL_TX3912_CONSOLE $CONFIG_SERIAL_TX3912
- bool ' Enable Au1000 UART Support' CONFIG_AU1000_UART
- if [ "$CONFIG_AU1000_UART" = "y" ]; then
+ bool ' TMPTX3912/PR31700 serial port support' CONFIG_SERIAL_TX3912
+ dep_bool ' Console on TMPTX3912/PR31700 serial port' CONFIG_SERIAL_TX3912_CONSOLE $CONFIG_SERIAL_TX3912
+ bool ' Enable Au1000 UART Support' CONFIG_AU1000_UART
+ if [ "$CONFIG_AU1000_UART" = "y" ]; then
bool ' Enable Au1000 serial console' CONFIG_AU1000_SERIAL_CONSOLE
- fi
+ fi
fi
fi
-
if [ "$CONFIG_IT8712" = "y" ]; then
bool 'Enable Qtronix 990P Keyboard Support' CONFIG_QTRONIX_KEYBOARD
if [ "$CONFIG_QTRONIX_KEYBOARD" = "y" ]; then
@@ -91,6 +93,7 @@
if [ "$CONFIG_EXPERIMENTAL" = "y" -a "$CONFIG_ZORRO" = "y" ]; then
tristate 'Commodore A2232 serial support (EXPERIMENTAL)' CONFIG_A2232
fi
+
bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
@@ -104,9 +107,10 @@
fi
source drivers/i2c/Config.in
+
#if [ "$CONFIG_ARM" = "y" ]; then
# source drivers/l3/Config.in
-#fi
+#fi
tristate 'QIC-02 tape support' CONFIG_QIC02_TAPE
if [ "$CONFIG_QIC02_TAPE" != "n" ]; then
@@ -142,17 +146,12 @@
dep_tristate ' NetWinder WB83C977 watchdog' CONFIG_977_WATCHDOG $CONFIG_ARCH_NETWINDER
dep_tristate ' SA1100 watchdog' CONFIG_SA1100_WATCHDOG $CONFIG_ARCH_SA1100
fi
+ tristate ' Eurotech CPU-1220/1410 Watchdog Timer' CONFIG_EUROTECH_WDT
tristate ' IB700 SBC Watchdog Timer' CONFIG_IB700_WDT
+ tristate ' Intel i810 TCO timer / Watchdog' CONFIG_I810_TCO
+ tristate ' Mixcom Watchdog' CONFIG_MIXCOMWD
tristate ' SBC-60XX Watchdog Timer' CONFIG_60XX_WDT
tristate ' W83877F (EMACS) Watchdog Timer' CONFIG_W83877F_WDT
- tristate ' Mixcom Watchdog' CONFIG_MIXCOMWD
- tristate ' Intel i810 TCO timer / Watchdog' CONFIG_I810_TCO
- if [ "$CONFIG_FOOTBRIDGE" = "y" ]; then
- tristate ' DC21285 watchdog' CONFIG_21285_WATCHDOG
- if [ "$CONFIG_ARCH_NETWINDER" = "y" ]; then
- tristate ' NetWinder WB83C977 watchdog' CONFIG_977_WATCHDOG
- fi
- fi
tristate ' ZF MachZ Watchdog' CONFIG_MACHZ_WDT
fi
endmenu
Index: Makefile
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/Makefile,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- Makefile 2001/11/23 04:10:15 1.32
+++ Makefile 2001/12/26 17:28:11 1.33
@@ -42,6 +42,7 @@
obj-$(CONFIG_VT) += vt.o vt_ioctl.o decvte.o vc_screen.o consolemap.o consolemap_deftbl.o selection.o keyboard.o defkeymap.o
obj-$(CONFIG_SERIAL) += $(SERIAL)
+obj-$(CONFIG_SERIAL_ACPI) += acpi_serial.o
obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o
obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o
|
|
From: James S. <jsi...@us...> - 2001-12-26 17:28:15
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers In directory usw-pr-cvs1:/tmp/cvs-serv5113/drivers Modified Files: Makefile Log Message: Synced to 2.5.0. Don't use. The default 2.5.0 has a nasty bug in it. Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/Makefile,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- Makefile 2001/11/23 04:10:15 1.24 +++ Makefile 2001/12/26 17:28:11 1.25 @@ -10,7 +10,7 @@ message/i2o message/fusion scsi md ieee1394 pnp isdn atm \ fc4 net/hamradio i2c l3 acpi bluetooth serial -subdir-y := parport char block net sound misc media cdrom video +subdir-y := parport char block net sound misc media cdrom hotplug video subdir-m := $(subdir-y) |
|
From: James S. <jsi...@us...> - 2001-12-26 17:28:15
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/sparc64
In directory usw-pr-cvs1:/tmp/cvs-serv5113/arch/sparc64
Modified Files:
config.in
Log Message:
Synced to 2.5.0. Don't use. The default 2.5.0 has a nasty bug in it.
Index: config.in
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/sparc64/config.in,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- config.in 2001/10/06 16:11:13 1.19
+++ config.in 2001/12/26 17:28:11 1.20
@@ -175,8 +175,17 @@
bool ' Collect statistics to report in /proc' CONFIG_AIC7XXX_OLD_PROC_STATS
fi
fi
- dep_tristate 'NCR53C8XX SCSI support' CONFIG_SCSI_NCR53C8XX $CONFIG_SCSI
- dep_tristate 'SYM53C8XX SCSI support' CONFIG_SCSI_SYM53C8XX $CONFIG_SCSI
+ dep_tristate 'SYM53C8XX Version 2 SCSI support' CONFIG_SCSI_SYM53C8XX_2 $CONFIG_SCSI
+ if [ "$CONFIG_SCSI_SYM53C8XX_2" != "n" ]; then
+ int ' DMA addressing mode' CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE 1
+ int ' default tagged command queue depth' CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS 16
+ int ' maximum number of queued commands' CONFIG_SCSI_SYM53C8XX_MAX_TAGS 64
+ bool ' use normal IO' CONFIG_SCSI_SYM53C8XX_IOMAPPED
+ fi
+ if [ "$CONFIG_SCSI_SYM53C8XX_2" != "y" ]; then
+ dep_tristate 'NCR53C8XX SCSI support' CONFIG_SCSI_NCR53C8XX $CONFIG_SCSI
+ dep_tristate 'SYM53C8XX SCSI support' CONFIG_SCSI_SYM53C8XX $CONFIG_SCSI
+ fi
if [ "$CONFIG_SCSI_NCR53C8XX" != "n" -o "$CONFIG_SCSI_SYM53C8XX" != "n" ]; then
int 'default tagged command queue depth' CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS 8
int 'maximum number of queued commands' CONFIG_SCSI_NCR53C8XX_MAX_TAGS 32
@@ -195,7 +204,7 @@
dep_tristate 'Qlogic ISP SCSI support' CONFIG_SCSI_QLOGIC_ISP $CONFIG_SCSI
dep_tristate 'Qlogic ISP FC SCSI support' CONFIG_SCSI_QLOGIC_FC $CONFIG_SCSI
if [ "$CONFIG_SCSI_QLOGIC_FC" != "n" ]; then
- define_bool CONFIG_SCSI_QLOGIC_FC_FIRMWARE y
+ define_bool CONFIG_SCSI_QLOGIC_FC_FIRMWARE y
fi
fi
@@ -205,7 +214,9 @@
source drivers/fc4/Config.in
-source drivers/message/fusion/Config.in
+if [ "$CONFIG_PCI" = "y" ]; then
+ source drivers/message/fusion/Config.in
+fi
source drivers/ieee1394/Config.in
|
|
From: James S. <jsi...@us...> - 2001-12-26 17:28:14
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/ppc In directory usw-pr-cvs1:/tmp/cvs-serv5113/arch/ppc Modified Files: config.in Log Message: Synced to 2.5.0. Don't use. The default 2.5.0 has a nasty bug in it. Index: config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/config.in,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- config.in 2001/11/13 19:38:22 1.21 +++ config.in 2001/12/26 17:28:11 1.22 @@ -1,4 +1,4 @@ -# BK Id: SCCS/s.config.in 1.43 10/16/01 15:18:50 trini +# BK Id: SCCS/s.config.in 1.45 11/08/01 07:57:40 paulus # # For a description of the syntax of this configuration file, # see Documentation/kbuild/config-language.txt. @@ -6,6 +6,7 @@ define_bool CONFIG_UID16 n define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y +define_bool CONFIG_HAVE_DEC_LOCK y mainmenu_name "Linux/PowerPC Kernel Configuration" |
|
From: James S. <jsi...@us...> - 2001-12-26 17:28:14
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/ppc/kernel
In directory usw-pr-cvs1:/tmp/cvs-serv5113/arch/ppc/kernel
Modified Files:
apus_setup.c chrp_setup.c pmac_setup.c prep_setup.c
Log Message:
Synced to 2.5.0. Don't use. The default 2.5.0 has a nasty bug in it.
Index: apus_setup.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/kernel/apus_setup.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- apus_setup.c 2001/10/06 16:11:12 1.4
+++ apus_setup.c 2001/12/26 17:28:11 1.5
@@ -1,5 +1,5 @@
/*
- * BK Id: SCCS/s.apus_setup.c 1.20 09/08/01 15:47:42 paulus
+ * BK Id: SCCS/s.apus_setup.c 1.24 11/13/01 21:26:07 paulus
*/
/*
* linux/arch/ppc/kernel/apus_setup.c
@@ -24,6 +24,7 @@
#include <linux/hdreg.h>
#include <linux/blk.h>
#include <linux/pci.h>
+#include <linux/seq_file.h>
#ifdef CONFIG_APUS
#include <asm/logging.h>
@@ -218,24 +219,20 @@
}
int
-apus_get_cpuinfo(char *buffer)
+apus_show_cpuinfo(struct seq_file *m)
{
-#ifdef CONFIG_APUS
extern int __map_without_bats;
extern unsigned long powerup_PCI_present;
- int len;
- len = sprintf(buffer, "machine\t\t: Amiga\n");
- len += sprintf(buffer+len, "bus speed\t: %d%s", __bus_speed,
- (__speed_test_failed) ? " [failed]\n" : "\n");
- len += sprintf(buffer+len, "using BATs\t: %s\n",
- (__map_without_bats) ? "No" : "Yes");
- len += sprintf(buffer+len, "ram speed\t: %dns\n",
- (__60nsram) ? 60 : 70);
- len += sprintf(buffer+len, "PCI bridge\t: %s\n",
- (powerup_PCI_present) ? "Yes" : "No");
- return len;
-#endif
+ seq_printf(m, "machine\t\t: Amiga\n");
+ seq_printf(m, "bus speed\t: %d%s", __bus_speed,
+ (__speed_test_failed) ? " [failed]\n" : "\n");
+ seq_printf(m, "using BATs\t: %s\n",
+ (__map_without_bats) ? "No" : "Yes");
+ seq_printf(m, "ram speed\t: %dns\n", (__60nsram) ? 60 : 70);
+ seq_printf(m, "PCI bridge\t: %s\n",
+ (powerup_PCI_present) ? "Yes" : "No");
+ return 0;
}
static void get_current_tb(unsigned long long *time)
@@ -348,7 +345,6 @@
#endif
}
-
/*********************************************************** FLOPPY */
#if defined(CONFIG_AMIGA_FLOPPY)
__init
@@ -982,8 +978,7 @@
ISA_DMA_THRESHOLD = 0x00ffffff;
ppc_md.setup_arch = apus_setup_arch;
- ppc_md.setup_residual = NULL;
- ppc_md.get_cpuinfo = apus_get_cpuinfo;
+ ppc_md.show_cpuinfo = apus_show_cpuinfo;
ppc_md.irq_cannonicalize = apus_irq_cannonicalize;
ppc_md.init_IRQ = apus_init_IRQ;
ppc_md.get_irq = apus_get_irq;
Index: chrp_setup.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/kernel/chrp_setup.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- chrp_setup.c 2001/10/06 16:11:12 1.3
+++ chrp_setup.c 2001/12/26 17:28:11 1.4
@@ -1,5 +1,5 @@
/*
- * BK Id: SCCS/s.chrp_setup.c 1.36 09/08/01 15:47:42 paulus
+ * BK Id: SCCS/s.chrp_setup.c 1.38 11/13/01 21:26:07 paulus
*/
/*
* linux/arch/ppc/kernel/setup.c
@@ -37,6 +37,7 @@
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/ide.h>
+#include <linux/seq_file.h>
#include <asm/mmu.h>
#include <asm/processor.h>
@@ -68,8 +69,8 @@
void rtas_display_progress(char *, unsigned short);
void rtas_indicator_progress(char *, unsigned short);
void btext_progress(char *, unsigned short);
-
extern unsigned long pmac_find_end_of_memory(void);
+
extern kdev_t boot_dev;
extern PTE *Hash, *Hash_end;
extern unsigned long Hash_size, Hash_mask;
@@ -97,9 +98,9 @@
};
int __chrp
-chrp_get_cpuinfo(char *buffer)
+chrp_show_cpuinfo(struct seq_file *m)
{
- int i, len, sdramen;
+ int i, sdramen;
unsigned int t;
struct device_node *root;
const char *model = "";
@@ -107,11 +108,10 @@
root = find_path_device("/");
if (root)
model = get_property(root, "model", NULL);
- len = sprintf(buffer,"machine\t\t: CHRP %s\n", model);
+ seq_printf(m, "machine\t\t: CHRP %s\n", model);
/* longtrail (goldengate) stuff */
- if ( !strncmp( model, "IBM,LongTrail", 13 ) )
- {
+ if (!strncmp(model, "IBM,LongTrail", 13)) {
/* VLSI VAS96011/12 `Golden Gate 2' */
/* Memory banks */
sdramen = (in_le32((unsigned *)(GG2_PCI_CONFIG_BASE+
@@ -146,17 +146,17 @@
model = "Reserved";
break;
}
- len += sprintf(buffer+len, "memory bank %d\t: %s %s\n", i, model,
- gg2_memtypes[sdramen ? 1 : ((t>>1) & 3)]);
+ seq_printf(m, "memory bank %d\t: %s %s\n", i, model,
+ gg2_memtypes[sdramen ? 1 : ((t>>1) & 3)]);
}
/* L2 cache */
t = in_le32((unsigned *)(GG2_PCI_CONFIG_BASE+GG2_PCI_CC_CTRL));
- len += sprintf(buffer+len, "board l2\t: %s %s (%s)\n",
- gg2_cachesizes[(t>>7) & 3],
- gg2_cachetypes[(t>>2) & 3],
- gg2_cachemodes[t & 3]);
+ seq_printf(m, "board l2\t: %s %s (%s)\n",
+ gg2_cachesizes[(t>>7) & 3],
+ gg2_cachetypes[(t>>2) & 3],
+ gg2_cachemodes[t & 3]);
}
- return len;
+ return 0;
}
/*
@@ -263,13 +263,6 @@
*/
sio_init();
- /*
- * Setup the console operations
- */
-#ifdef CONFIG_DUMMY_CONSOLE
- conswitchp = &dummy_con;
-#endif
-
/* Get the event scan rate for the rtas so we know how
* often it expects a heartbeat. -- Cort
*/
@@ -328,13 +321,8 @@
chrp_irq_cannonicalize(u_int irq)
{
if (irq == 2)
- {
return 9;
- }
- else
- {
- return irq;
- }
+ return irq;
}
void __init chrp_init_IRQ(void)
@@ -471,8 +459,8 @@
isa_io_base = CHRP_ISA_IO_BASE; /* default value */
ppc_md.setup_arch = chrp_setup_arch;
- ppc_md.setup_residual = NULL;
- ppc_md.get_cpuinfo = chrp_get_cpuinfo;
+ ppc_md.show_percpuinfo = of_show_percpuinfo;
+ ppc_md.show_cpuinfo = chrp_show_cpuinfo;
ppc_md.irq_cannonicalize = chrp_irq_cannonicalize;
#ifndef CONFIG_POWER4
ppc_md.init_IRQ = chrp_init_IRQ;
Index: pmac_setup.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/kernel/pmac_setup.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pmac_setup.c 2001/10/06 16:11:13 1.5
+++ pmac_setup.c 2001/12/26 17:28:11 1.6
@@ -1,5 +1,5 @@
/*
- * BK Id: SCCS/s.pmac_setup.c 1.39 09/08/01 15:47:42 paulus
+ * BK Id: SCCS/s.pmac_setup.c 1.43 11/13/01 21:26:07 paulus
*/
/*
* linux/arch/ppc/kernel/setup.c
@@ -47,6 +47,7 @@
#include <linux/adb.h>
#include <linux/cuda.h>
#include <linux/pmu.h>
+#include <linux/seq_file.h>
#include <asm/processor.h>
#include <asm/sections.h>
@@ -133,36 +134,56 @@
}
#endif /* CONFIG_SMP */
+/*
+ * Assume here that all clock rates are the same in a
+ * smp system. -- Cort
+ */
+int __openfirmware
+of_show_percpuinfo(struct seq_file *m, int i)
+{
+ struct device_node *cpu_node;
+ int *fp, s;
+
+ cpu_node = find_type_devices("cpu");
+ if (!cpu_node)
+ return 0;
+ for (s = 0; s < i && cpu_node->next; s++)
+ cpu_node = cpu_node->next;
+ fp = (int *) get_property(cpu_node, "clock-frequency", NULL);
+ if (fp)
+ seq_printf(m, "clock\t\t: %dMHz\n", *fp / 1000000);
+ return 0;
+}
+
int __pmac
-pmac_get_cpuinfo(char *buffer)
+pmac_show_cpuinfo(struct seq_file *m)
{
- int len;
struct device_node *np;
char *pp;
int plen;
/* find motherboard type */
- len = sprintf(buffer, "machine\t\t: ");
+ seq_printf(m, "machine\t\t: ");
np = find_devices("device-tree");
if (np != NULL) {
pp = (char *) get_property(np, "model", NULL);
if (pp != NULL)
- len += sprintf(buffer+len, "%s\n", pp);
+ seq_printf(m, "%s\n", pp);
else
- len += sprintf(buffer+len, "PowerMac\n");
+ seq_printf(m, "PowerMac\n");
pp = (char *) get_property(np, "compatible", &plen);
if (pp != NULL) {
- len += sprintf(buffer+len, "motherboard\t:");
+ seq_printf(m, "motherboard\t:");
while (plen > 0) {
int l = strlen(pp) + 1;
- len += sprintf(buffer+len, " %s", pp);
+ seq_printf(m, " %s", pp);
plen -= l;
pp += l;
}
- buffer[len++] = '\n';
+ seq_printf(m, "\n");
}
} else
- len += sprintf(buffer+len, "PowerMac\n");
+ seq_printf(m, "PowerMac\n");
/* find l2 cache info */
np = find_devices("l2-cache");
@@ -173,22 +194,21 @@
get_property(np, "i-cache-size", NULL);
unsigned int *dc = (unsigned int *)
get_property(np, "d-cache-size", NULL);
- len += sprintf(buffer+len, "L2 cache\t:");
+ seq_printf(m, "L2 cache\t:");
has_l2cache = 1;
if (get_property(np, "cache-unified", NULL) != 0 && dc) {
- len += sprintf(buffer+len, " %dK unified", *dc / 1024);
+ seq_printf(m, " %dK unified", *dc / 1024);
} else {
if (ic)
- len += sprintf(buffer+len, " %dK instruction",
- *ic / 1024);
+ seq_printf(m, " %dK instruction", *ic / 1024);
if (dc)
- len += sprintf(buffer+len, "%s %dK data",
- (ic? " +": ""), *dc / 1024);
+ seq_printf(m, "%s %dK data",
+ (ic? " +": ""), *dc / 1024);
}
pp = get_property(np, "ram-type", NULL);
if (pp)
- len += sprintf(buffer+len, " %s", pp);
- buffer[len++] = '\n';
+ seq_printf(m, " %s", pp);
+ seq_printf(m, "\n");
}
/* find ram info */
@@ -203,8 +223,7 @@
for (n /= sizeof(struct reg_property); n > 0; --n)
total += (reg++)->size;
- len += sprintf(buffer+len, "memory\t\t: %luMB\n",
- total >> 20);
+ seq_printf(m, "memory\t\t: %luMB\n", total >> 20);
}
}
@@ -216,16 +235,16 @@
unsigned int *l2cr = (unsigned int *)
get_property(np, "l2cr-value", NULL);
if (l2cr != 0) {
- len += sprintf(buffer+len, "l2cr override\t: 0x%x\n", *l2cr);
+ seq_printf(m, "l2cr override\t: 0x%x\n", *l2cr);
}
}
/* Indicate newworld/oldworld */
- len += sprintf(buffer+len, "pmac-generation\t: %s\n",
- pmac_newworld ? "NewWorld" : "OldWorld");
+ seq_printf(m, "pmac-generation\t: %s\n",
+ pmac_newworld ? "NewWorld" : "OldWorld");
- return len;
+ return 0;
}
#ifdef CONFIG_SCSI
@@ -238,6 +257,17 @@
#endif
+#ifdef CONFIG_VT
+/*
+ * Dummy mksound function that does nothing.
+ * The real one is in the dmasound driver.
+ */
+static void __pmac
+pmac_mksound(unsigned int hz, unsigned int ticks)
+{
+}
+#endif /* CONFIG_VT */
+
static volatile u32 *sysctrl_regs;
void __init
@@ -686,8 +716,8 @@
DMA_MODE_WRITE = 2;
ppc_md.setup_arch = pmac_setup_arch;
- ppc_md.setup_residual = NULL;
- ppc_md.get_cpuinfo = pmac_get_cpuinfo;
+ ppc_md.show_cpuinfo = pmac_show_cpuinfo;
+ ppc_md.show_percpuinfo = of_show_percpuinfo;
ppc_md.irq_cannonicalize = NULL;
ppc_md.init_IRQ = pmac_pic_init;
ppc_md.get_irq = pmac_get_irq; /* Changed later on ... */
Index: prep_setup.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/kernel/prep_setup.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- prep_setup.c 2001/11/13 19:38:22 1.7
+++ prep_setup.c 2001/12/26 17:28:11 1.8
@@ -1,5 +1,5 @@
/*
- * BK Id: SCCS/s.prep_setup.c 1.41 10/18/01 11:16:28 trini
+ * BK Id: SCCS/s.prep_setup.c 1.44 11/13/01 21:26:07 paulus
*/
/*
* linux/arch/ppc/kernel/setup.c
@@ -39,6 +39,7 @@
#include <linux/timex.h>
#include <linux/pci.h>
#include <linux/ide.h>
+#include <linux/seq_file.h>
#include <asm/sections.h>
#include <asm/mmu.h>
@@ -79,7 +80,6 @@
extern void rs_nvram_write_val(int addr,
unsigned char val);
extern void ibm_prep_init(void);
-
extern void prep_find_bridges(void);
extern char saved_command_line[];
@@ -110,107 +110,107 @@
#endif
static int __prep
-prep_get_cpuinfo(char *buffer)
+prep_show_cpuinfo(struct seq_file *m)
{
extern char *Motherboard_map_name;
- int len;
+ int cachew;
#ifdef CONFIG_PREP_RESIDUAL
int i;
#endif
-
-#ifdef CONFIG_SMP
-#define CD(X) (cpu_data[n].X)
-#else
-#define CD(X) (X)
-#endif
- len = sprintf(buffer,"machine\t\t: PReP %s\n",Motherboard_map_name);
+ seq_printf(m, "machine\t\t: PReP %s\n", Motherboard_map_name);
-
- switch ( _prep_type )
- {
+ switch ( _prep_type ) {
case _PREP_IBM:
- if ((*(unsigned char *)0x8000080c) & (1<<6))
- len += sprintf(buffer+len,"Upgrade CPU\n");
- len += sprintf(buffer+len,"L2\t\t: ");
- if ((*(unsigned char *)0x8000080c) & (1<<7))
- {
- len += sprintf(buffer+len,"not present\n");
+ cachew = inw(0x80c);
+ if (cachew & (1<<6))
+ seq_printf(m, "Upgrade CPU\n");
+ seq_printf(m, "L2\t\t: ");
+ if (cachew & (1<<7)) {
+ seq_printf(m, "not present\n");
goto no_l2;
}
- len += sprintf(buffer+len,"%sKb,",
- (((*(unsigned char *)0x8000080d)>>2)&1)
- ? "512" : "256");
- len += sprintf(buffer+len,"%ssync\n",
- ((*(unsigned char *)0x8000080d)>>7) ? "" : "a");
+ seq_printf(m, "%sKb,", (cachew & (1 << 10))? "512" : "256");
+ seq_printf(m, "%ssync\n", (cachew & (1 << 15))? "" : "a");
break;
case _PREP_Motorola:
- len += sprintf(buffer+len,"L2\t\t: ");
- switch(*((unsigned char *)CACHECRBA) & L2CACHE_MASK)
- {
+ cachew = *((unsigned char *)CACHECRBA);
+ seq_printf(m, "L2\t\t: ");
+ switch (cachew & L2CACHE_MASK) {
case L2CACHE_512KB:
- len += sprintf(buffer+len,"512Kb");
+ seq_printf(m, "512Kb");
break;
case L2CACHE_256KB:
- len += sprintf(buffer+len,"256Kb");
+ seq_printf(m, "256Kb");
break;
case L2CACHE_1MB:
- len += sprintf(buffer+len,"1MB");
+ seq_printf(m, "1MB");
break;
case L2CACHE_NONE:
- len += sprintf(buffer+len,"none\n");
+ seq_printf(m, "none\n");
goto no_l2;
break;
default:
- len += sprintf(buffer+len, "%x\n",
- *((unsigned char *)CACHECRBA));
+ seq_printf(m, "%x\n", cachew);
}
- len += sprintf(buffer+len,",parity %s",
- (*((unsigned char *)CACHECRBA) & L2CACHE_PARITY)
- ? "enabled" : "disabled");
+ seq_printf(m, ", parity %s",
+ (cachew & L2CACHE_PARITY)? "enabled" : "disabled");
- len += sprintf(buffer+len, " SRAM:");
+ seq_printf(m, " SRAM:");
- switch ( ((*((unsigned char *)CACHECRBA) & 0xf0) >> 4) & ~(0x3) )
- {
- case 1: len += sprintf(buffer+len,
- "synchronous,parity,flow-through\n");
+ switch ( ((cachew & 0xf0) >> 4) & ~(0x3) ) {
+ case 1: seq_printf(m, "synchronous,parity,flow-through\n");
break;
- case 2: len += sprintf(buffer+len,"asynchronous,no parity\n");
+ case 2: seq_printf(m, "asynchronous,no parity\n");
break;
- case 3: len += sprintf(buffer+len,"asynchronous,parity\n");
+ case 3: seq_printf(m, "asynchronous,parity\n");
break;
- default:len += sprintf(buffer+len,
- "synchronous,pipelined,no parity\n");
+ default:seq_printf(m, "synchronous,pipelined,no parity\n");
break;
}
break;
default:
break;
}
-
-
+
no_l2:
-#ifndef CONFIG_PREP_RESIDUAL
- return len;
-#else
- if ( res->ResidualLength == 0 )
- return len;
-
- /* print info about SIMMs */
- len += sprintf(buffer+len,"simms\t\t: ");
- for ( i = 0 ; (res->ActualNumMemories) && (i < MAX_MEMS) ; i++ )
- {
- if ( res->Memories[i].SIMMSize != 0 )
- len += sprintf(buffer+len,"%d:%ldM ", i,
+#ifdef CONFIG_PREP_RESIDUAL
+ if (res->ResidualLength == 0) {
+ /* print info about SIMMs */
+ seq_printf(m, "simms\t\t: ");
+ for (i = 0; (res->ActualNumMemories) && (i < MAX_MEMS); i++) {
+ if (res->Memories[i].SIMMSize != 0)
+ seq_printf(m, "%d:%ldM ", i,
(res->Memories[i].SIMMSize > 1024) ?
res->Memories[i].SIMMSize>>20 :
res->Memories[i].SIMMSize);
+ }
+ seq_printf(m, "\n");
}
- len += sprintf(buffer+len,"\n");
- return len;
#endif
+
+ return 0;
+}
+
+static int __prep
+prep_show_percpuinfo(struct seq_file *m, int i)
+{
+ int len = 0;
+
+ /* PREP's without residual data will give incorrect values here */
+ seq_printf(m, "clock\t\t: ");
+#ifdef CONFIG_PREP_RESIDUAL
+ if (res->ResidualLength)
+ seq_printf(m, "%ldMHz\n",
+ (res->VitalProductData.ProcessorHz > 1024) ?
+ res->VitalProductData.ProcessorHz>>20 :
+ res->VitalProductData.ProcessorHz);
+ else
+#endif /* CONFIG_PREP_RESIDUAL */
+ seq_printf(m, "???\n");
+
+ return 0;
}
static void __init
@@ -607,26 +607,6 @@
}
}
-static int __prep
-prep_setup_residual(char *buffer)
-{
- int len = 0;
-
- /* PREP's without residual data will give incorrect values here */
- len += sprintf(len+buffer, "clock\t\t: ");
-#ifdef CONFIG_PREP_RESIDUAL
- if ( res->ResidualLength )
- len += sprintf(len+buffer, "%ldMHz\n",
- (res->VitalProductData.ProcessorHz > 1024) ?
- res->VitalProductData.ProcessorHz>>20 :
- res->VitalProductData.ProcessorHz);
- else
-#endif /* CONFIG_PREP_RESIDUAL */
- len += sprintf(len+buffer, "???\n");
-
- return len;
-}
-
static unsigned int __prep
prep_irq_cannonicalize(u_int irq)
{
@@ -831,11 +811,8 @@
unsigned long r6, unsigned long r7)
{
#ifdef CONFIG_PREP_RESIDUAL
- RESIDUAL *old_res = (RESIDUAL *)(r3 + KERNELBASE);
-
/* make a copy of residual data */
- if ( r3 )
- {
+ if ( r3 ) {
memcpy((void *)res,(void *)(r3+KERNELBASE),
sizeof(RESIDUAL));
}
@@ -879,8 +856,8 @@
}
ppc_md.setup_arch = prep_setup_arch;
- ppc_md.setup_residual = prep_setup_residual;
- ppc_md.get_cpuinfo = prep_get_cpuinfo;
+ ppc_md.show_percpuinfo = prep_show_percpuinfo;
+ ppc_md.show_cpuinfo = prep_show_cpuinfo;
ppc_md.irq_cannonicalize = prep_irq_cannonicalize;
ppc_md.init_IRQ = prep_init_IRQ;
/* this gets changed later on if we have an OpenPIC -- Cort */
|
|
From: James S. <jsi...@us...> - 2001-12-26 17:28:14
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/sh/kernel
In directory usw-pr-cvs1:/tmp/cvs-serv5113/arch/sh/kernel
Modified Files:
setup.c
Log Message:
Synced to 2.5.0. Don't use. The default 2.5.0 has a nasty bug in it.
Index: setup.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/sh/kernel/setup.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- setup.c 2001/10/06 16:11:13 1.4
+++ setup.c 2001/12/26 17:28:11 1.5
@@ -30,6 +30,7 @@
#endif
#include <linux/bootmem.h>
#include <linux/ctype.h>
+#include <linux/seq_file.h>
#include <asm/processor.h>
#include <asm/page.h>
#include <asm/pgtable.h>
@@ -506,24 +507,22 @@
* Get CPU information for use by the procfs.
*/
#ifdef CONFIG_PROC_FS
-int get_cpuinfo(char *buffer)
+static int show_cpuinfo(struct seq_file *m, void *v)
{
- char *p = buffer;
-
#if defined(__sh3__)
- p += sprintf(p,"cpu family\t: SH-3\n"
- "cache size\t: 8K-byte\n");
+ seq_printf(m, "cpu family\t: SH-3\n"
+ "cache size\t: 8K-byte\n");
#elif defined(__SH4__)
- p += sprintf(p,"cpu family\t: SH-4\n"
- "cache size\t: 8K-byte/16K-byte\n");
+ seq_printf(m, "cpu family\t: SH-4\n"
+ "cache size\t: 8K-byte/16K-byte\n");
#endif
- p += sprintf(p, "bogomips\t: %lu.%02lu\n\n",
+ seq_printf(m, "bogomips\t: %lu.%02lu\n\n",
loops_per_jiffy/(500000/HZ),
(loops_per_jiffy/(5000/HZ)) % 100);
- p += sprintf(p, "Machine: %s\n", sh_mv.mv_name);
+ seq_printf(m, "Machine: %s\n", sh_mv.mv_name);
#define PRINT_CLOCK(name, value) \
- p += sprintf(p, name " clock: %d.%02dMHz\n", \
+ seq_printf(m, name " clock: %d.%02dMHz\n", \
((value) / 1000000), ((value) % 1000000)/10000)
PRINT_CLOCK("CPU", boot_cpu_data.cpu_clock);
@@ -533,6 +532,24 @@
#endif
PRINT_CLOCK("Peripheral module", boot_cpu_data.module_clock);
- return p - buffer;
+ return 0;
+}
+
+static void *c_start(struct seq_file *m, loff_t *pos)
+{
+ return (void*)(*pos == 0);
+}
+static void *c_next(struct seq_file *m, void *v, loff_t *pos)
+{
+ return NULL;
}
+static void c_stop(struct seq_file *m, void *v)
+{
+}
+struct seq_operations cpuinfo_op = {
+ start: c_start,
+ next: c_next,
+ stop: c_stop,
+ show: show_cpuinfo,
+};
#endif
|
|
From: James S. <jsi...@us...> - 2001-12-26 17:28:14
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/ia64/kernel
In directory usw-pr-cvs1:/tmp/cvs-serv5113/arch/ia64/kernel
Modified Files:
setup.c
Log Message:
Synced to 2.5.0. Don't use. The default 2.5.0 has a nasty bug in it.
Index: setup.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ia64/kernel/setup.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- setup.c 2001/09/09 16:36:33 1.2
+++ setup.c 2001/12/26 17:28:11 1.3
@@ -2,12 +2,13 @@
* Architecture-specific setup.
*
* Copyright (C) 1998-2001 Hewlett-Packard Co
- * Copyright (C) 1998-2001 David Mosberger-Tang <da...@hp...>
+ * David Mosberger-Tang <da...@hp...>
* Copyright (C) 1998, 1999, 2001 Stephane Eranian <er...@hp...>
* Copyright (C) 2000, Rohit Seth <roh...@in...>
* Copyright (C) 1999 VA Linux Systems
* Copyright (C) 1999 Walt Drummond <dru...@va...>
*
+ * 11/12/01 D.Mosberger Convert get_cpuinfo() to seq_file based show_cpuinfo().
* 04/04/00 D.Mosberger renamed cpu_initialized to cpu_online_map
* 03/31/00 R.Seth cpu_initialized and current->processor fixes
* 02/04/00 D.Mosberger some more get_cpuinfo fixes...
@@ -23,6 +24,7 @@
#include <linux/kernel.h>
#include <linux/reboot.h>
#include <linux/sched.h>
+#include <linux/seq_file.h>
#include <linux/string.h>
#include <linux/threads.h>
@@ -355,61 +357,89 @@
/*
* Display cpu info for all cpu's.
*/
-int
-get_cpuinfo (char *buffer)
+static int
+show_cpuinfo (struct seq_file *m, void *v)
{
#ifdef CONFIG_SMP
# define lpj c->loops_per_jiffy
#else
# define lpj loops_per_jiffy
#endif
- char family[32], features[128], *cp, *p = buffer;
- struct cpuinfo_ia64 *c;
- unsigned long mask, cpu;
+ char family[32], features[128], *cp;
+ struct cpuinfo_ia64 *c = v;
+ unsigned long mask, cpu = c - cpu_data(0);
- for (cpu = 0; cpu < smp_num_cpus; ++cpu) {
- c = cpu_data(cpu);
- mask = c->features;
+#ifdef CONFIG_SMP
+ if (!(cpu_online_map & (1 << cpu)))
+ return 0;
+#endif
- switch (c->family) {
- case 0x07: memcpy(family, "Itanium", 8); break;
- case 0x1f: memcpy(family, "McKinley", 9); break;
- default: sprintf(family, "%u", c->family); break;
- }
+ mask = c->features;
- /* build the feature string: */
- memcpy(features, " standard", 10);
- cp = features;
- if (mask & 1) {
- strcpy(cp, " branchlong");
- cp = strchr(cp, '\0');
- mask &= ~1UL;
- }
- if (mask)
- sprintf(cp, " 0x%lx", mask);
+ switch (c->family) {
+ case 0x07: memcpy(family, "Itanium", 8); break;
+ case 0x1f: memcpy(family, "McKinley", 9); break;
+ default: sprintf(family, "%u", c->family); break;
+ }
- p += sprintf(p,
- "processor : %lu\n"
- "vendor : %s\n"
- "arch : IA-64\n"
- "family : %s\n"
- "model : %u\n"
- "revision : %u\n"
- "archrev : %u\n"
- "features :%s\n" /* don't change this---it _is_ right! */
- "cpu number : %lu\n"
- "cpu regs : %u\n"
- "cpu MHz : %lu.%06lu\n"
- "itc MHz : %lu.%06lu\n"
- "BogoMIPS : %lu.%02lu\n\n",
- cpu, c->vendor, family, c->model, c->revision, c->archrev, features,
- c->ppn, c->number, c->proc_freq / 1000000, c->proc_freq % 1000000,
- c->itc_freq / 1000000, c->itc_freq % 1000000,
- lpj*HZ/500000, (lpj*HZ/5000) % 100);
+ /* build the feature string: */
+ memcpy(features, " standard", 10);
+ cp = features;
+ if (mask & 1) {
+ strcpy(cp, " branchlong");
+ cp = strchr(cp, '\0');
+ mask &= ~1UL;
}
- return p - buffer;
+ if (mask)
+ sprintf(cp, " 0x%lx", mask);
+
+ seq_printf(m,
+ "processor : %lu\n"
+ "vendor : %s\n"
+ "arch : IA-64\n"
+ "family : %s\n"
+ "model : %u\n"
+ "revision : %u\n"
+ "archrev : %u\n"
+ "features :%s\n" /* don't change this---it _is_ right! */
+ "cpu number : %lu\n"
+ "cpu regs : %u\n"
+ "cpu MHz : %lu.%06lu\n"
+ "itc MHz : %lu.%06lu\n"
+ "BogoMIPS : %lu.%02lu\n\n",
+ cpu, c->vendor, family, c->model, c->revision, c->archrev,
+ features, c->ppn, c->number,
+ c->proc_freq / 1000000, c->proc_freq % 1000000,
+ c->itc_freq / 1000000, c->itc_freq % 1000000,
+ lpj*HZ/500000, (lpj*HZ/5000) % 100);
+ return 0;
}
+static void *
+c_start (struct seq_file *m, loff_t *pos)
+{
+ return *pos < NR_CPUS ? cpu_data(*pos) : NULL;
+}
+
+static void *
+c_next (struct seq_file *m, void *v, loff_t *pos)
+{
+ ++*pos;
+ return c_start(m, pos);
+}
+
+static void
+c_stop (struct seq_file *m, void *v)
+{
+}
+
+struct seq_operations cpuinfo_op = {
+ start: c_start,
+ next: c_next,
+ stop: c_stop,
+ show: show_cpuinfo
+};
+
void
identify_cpu (struct cpuinfo_ia64 *c)
{
@@ -525,10 +555,13 @@
/*
* Initialize default control register to defer all speculative faults. The
* kernel MUST NOT depend on a particular setting of these bits (in other words,
- * the kernel must have recovery code for all speculative accesses).
+ * the kernel must have recovery code for all speculative accesses). Turn on
+ * dcr.lc as per recommendation by the architecture team. Most IA-32 apps
+ * shouldn't be affected by this (moral: keep your ia32 locks aligned and you'll
+ * be fine).
*/
ia64_set_dcr( IA64_DCR_DM | IA64_DCR_DP | IA64_DCR_DK | IA64_DCR_DX | IA64_DCR_DR
- | IA64_DCR_DA | IA64_DCR_DD);
+ | IA64_DCR_DA | IA64_DCR_DD | IA64_DCR_LC);
#ifndef CONFIG_SMP
ia64_set_fpu_owner(0);
#endif
|
|
From: James S. <jsi...@us...> - 2001-12-26 17:28:14
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/s390x/mm
In directory usw-pr-cvs1:/tmp/cvs-serv5113/arch/s390x/mm
Modified Files:
fault.c
Log Message:
Synced to 2.5.0. Don't use. The default 2.5.0 has a nasty bug in it.
Index: fault.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/s390x/mm/fault.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- fault.c 2001/10/29 00:10:58 1.2
+++ fault.c 2001/12/26 17:28:11 1.3
@@ -131,14 +131,17 @@
/*
* Check whether we have a user MM in the first place.
*/
- if (in_interrupt() || !mm)
+ if (in_interrupt() || !mm || !(regs->psw.mask & _PSW_IO_MASK_BIT))
goto no_context;
/*
* When we get here, the fault happened in the current
- * task's user address space, so we search the VMAs
+ * task's user address space, so we can switch on the
+ * interrupts again and then search the VMAs
*/
+ __sti();
+
down_read(&mm->mmap_sem);
vma = find_vma(mm, address);
@@ -391,6 +394,13 @@
*/
tsk = (struct task_struct *)
(*((unsigned long *) __LC_PFAULT_INTPARM) - THREAD_SIZE);
+
+ /*
+ * We got all needed information from the lowcore and can
+ * now safely switch on interrupts.
+ */
+ if (regs->psw.mask & PSW_PROBLEM_STATE)
+ __sti();
if (subcode & 0x0080) {
/* signal bit is set -> a page has been swapped in by VM */
|
|
From: James S. <jsi...@us...> - 2001-12-26 17:28:14
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/ia64 In directory usw-pr-cvs1:/tmp/cvs-serv5113/arch/ia64 Modified Files: config.in Log Message: Synced to 2.5.0. Don't use. The default 2.5.0 has a nasty bug in it. Index: config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ia64/config.in,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- config.in 2001/10/29 00:10:58 1.16 +++ config.in 2001/12/26 17:28:11 1.17 @@ -28,6 +28,7 @@ if [ "$CONFIG_IA64_HP_SIM" = "n" ]; then define_bool CONFIG_ACPI y + define_bool CONFIG_ACPI_EFI y define_bool CONFIG_ACPI_INTERPRETER y define_bool CONFIG_ACPI_KERNEL_CONFIG y fi @@ -40,7 +41,8 @@ "generic CONFIG_IA64_GENERIC \ DIG-compliant CONFIG_IA64_DIG \ HP-simulator CONFIG_IA64_HP_SIM \ - SGI-SN1 CONFIG_IA64_SGI_SN1" generic + SGI-SN1 CONFIG_IA64_SGI_SN1 \ + SGI-SN2 CONFIG_IA64_SGI_SN2" generic choice 'Kernel page size' \ "4KB CONFIG_IA64_PAGE_SIZE_4KB \ @@ -51,25 +53,6 @@ if [ "$CONFIG_ITANIUM" = "y" ]; then define_bool CONFIG_IA64_BRL_EMU y bool ' Enable Itanium B-step specific code' CONFIG_ITANIUM_BSTEP_SPECIFIC - if [ "$CONFIG_ITANIUM_BSTEP_SPECIFIC" = "y" ]; then - bool ' Enable Itanium B0-step specific code' CONFIG_ITANIUM_B0_SPECIFIC - fi - if [ "$CONFIG_ITANIUM_BSTEP_SPECIFIC" = "y" ]; then - bool ' Enable Itanium B1-step specific code' CONFIG_ITANIUM_B1_SPECIFIC - fi - if [ "$CONFIG_ITANIUM_BSTEP_SPECIFIC" = "y" ]; then - bool ' Enable Itanium B2-step specific code' CONFIG_ITANIUM_B2_SPECIFIC - fi - bool ' Enable Itanium C-step specific code' CONFIG_ITANIUM_CSTEP_SPECIFIC - if [ "$CONFIG_ITANIUM_CSTEP_SPECIFIC" = "y" ]; then - bool ' Enable Itanium C0-step specific code' CONFIG_ITANIUM_C0_SPECIFIC - fi - if [ "$CONFIG_ITANIUM_B0_SPECIFIC" = "y" \ - -o "$CONFIG_ITANIUM_B1_SPECIFIC" = "y" -o "$CONFIG_ITANIUM_B2_SPECIFIC" = "y" ]; then - define_bool CONFIG_ITANIUM_PTCG n - else - define_bool CONFIG_ITANIUM_PTCG y - fi if [ "$CONFIG_IA64_SGI_SN1" = "y" ]; then define_int CONFIG_IA64_L1_CACHE_SHIFT 7 # align cache-sensitive data to 128 bytes else @@ -78,7 +61,6 @@ fi if [ "$CONFIG_MCKINLEY" = "y" ]; then - define_bool CONFIG_ITANIUM_PTCG y define_int CONFIG_IA64_L1_CACHE_SHIFT 7 bool ' Enable McKinley A-step specific code' CONFIG_MCKINLEY_ASTEP_SPECIFIC if [ "$CONFIG_MCKINLEY_ASTEP_SPECIFIC" = "y" ]; then @@ -87,28 +69,32 @@ fi if [ "$CONFIG_IA64_DIG" = "y" ]; then - bool ' Force interrupt redirection' CONFIG_IA64_HAVE_IRQREDIR bool ' Enable IA-64 Machine Check Abort' CONFIG_IA64_MCA define_bool CONFIG_PM y fi -if [ "$CONFIG_IA64_SGI_SN1" = "y" ]; then - bool ' Enable SGI Medusa Simulator Support' CONFIG_IA64_SGI_SN1_SIM - define_bool CONFIG_DEVFS_DEBUG y +if [ "$CONFIG_IA64_SGI_SN1" = "y" ] || [ "$CONFIG_IA64_SGI_SN2" = "y" ]; then + define_bool CONFIG_IA64_SGI_SN y + bool ' Enable extra debugging code' CONFIG_IA64_SGI_SN_DEBUG n + bool ' Enable SGI Medusa Simulator Support' CONFIG_IA64_SGI_SN_SIM + bool ' Enable autotest (llsc). Option to run cache test instead of booting' \ + CONFIG_IA64_SGI_AUTOTEST n define_bool CONFIG_DEVFS_FS y - define_bool CONFIG_IA64_BRL_EMU y + if [ "$CONFIG_DEVFS_FS" = "y" ]; then + bool ' Enable DEVFS Debug Code' CONFIG_DEVFS_DEBUG n + fi + bool ' Enable protocol mode for the L1 console' CONFIG_SERIAL_SGI_L1_PROTOCOL y + define_bool CONFIG_DISCONTIGMEM y define_bool CONFIG_IA64_MCA y - define_bool CONFIG_ITANIUM y - define_bool CONFIG_SGI_IOC3_ETH y + define_bool CONFIG_NUMA y define_bool CONFIG_PERCPU_IRQ y - define_int CONFIG_CACHE_LINE_SHIFT 7 - bool ' Enable DISCONTIGMEM support' CONFIG_DISCONTIGMEM - bool ' Enable NUMA support' CONFIG_NUMA + tristate ' PCIBA support' CONFIG_PCIBA fi define_bool CONFIG_KCORE_ELF y # On IA-64, we always want an ELF /proc/kcore. bool 'SMP support' CONFIG_SMP +tristate 'Support running of Linux/x86 binaries' CONFIG_IA32_SUPPORT bool 'Performance monitor support' CONFIG_PERFMON tristate '/proc/pal support' CONFIG_IA64_PALINFO tristate '/proc/efi/vars support' CONFIG_EFI_VARS @@ -259,19 +245,23 @@ mainmenu_option next_comment comment 'Kernel hacking' -#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC -if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then - tristate 'Kernel support for IA-32 emulation' CONFIG_IA32_SUPPORT - tristate 'Kernel FP software completion' CONFIG_MATHEMU -else - define_bool CONFIG_MATHEMU y -fi +choice 'Physical memory granularity' \ + "16MB CONFIG_IA64_GRANULE_16MB \ + 64MB CONFIG_IA64_GRANULE_64MB" 64MB -bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ -bool 'Early printk support (requires VGA!)' CONFIG_IA64_EARLY_PRINTK -bool 'Turn on compare-and-exchange bug checking (slow!)' CONFIG_IA64_DEBUG_CMPXCHG -bool 'Turn on irq debug checks (slow!)' CONFIG_IA64_DEBUG_IRQ -bool 'Print possible IA64 hazards to console' CONFIG_IA64_PRINT_HAZARDS -bool 'Disable VHPT' CONFIG_DISABLE_VHPT +bool 'Kernel debugging' CONFIG_DEBUG_KERNEL +if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then + bool ' Print possible IA64 hazards to console' CONFIG_IA64_PRINT_HAZARDS + bool ' Disable VHPT' CONFIG_DISABLE_VHPT + bool ' Magic SysRq key' CONFIG_MAGIC_SYSRQ + +# early printk is currently broken for SMP: the secondary processors get stuck... +# bool ' Early printk support (requires VGA!)' CONFIG_IA64_EARLY_PRINTK + + bool ' Debug memory allocations' CONFIG_DEBUG_SLAB + bool ' Spinlock debugging' CONFIG_DEBUG_SPINLOCK + bool ' Turn on compare-and-exchange bug checking (slow!)' CONFIG_IA64_DEBUG_CMPXCHG + bool ' Turn on irq debug checks (slow!)' CONFIG_IA64_DEBUG_IRQ +fi endmenu |
|
From: James S. <jsi...@us...> - 2001-12-26 17:28:14
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/i386/kernel
In directory usw-pr-cvs1:/tmp/cvs-serv5113/arch/i386/kernel
Modified Files:
setup.c
Log Message:
Synced to 2.5.0. Don't use. The default 2.5.0 has a nasty bug in it.
Index: setup.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/i386/kernel/setup.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- setup.c 2001/11/13 19:38:22 1.30
+++ setup.c 2001/12/26 17:28:11 1.31
@@ -67,6 +67,10 @@
*
* AMD Athlon/Duron/Thunderbird bluesmoke support.
* Dave Jones <da...@su...>, April 2001.
+ *
+ * CacheSize bug workaround updates for AMD, Intel & VIA Cyrix.
+ * Dave Jones <da...@su...>, September, October 2001.
+ *
*/
/*
@@ -94,6 +98,7 @@
#endif
#include <linux/highmem.h>
#include <linux/bootmem.h>
+#include <linux/seq_file.h>
#include <asm/processor.h>
#include <asm/mtrr.h>
#include <asm/uaccess.h>
@@ -153,6 +158,8 @@
static int disable_x86_serial_nr __initdata = 1;
static int disable_x86_fxsr __initdata = 0;
+int enable_acpi_smp_table;
+
/*
* This is set up by the setup-routine at boot-time
*/
@@ -750,6 +757,10 @@
add_memory_region(start_at, mem_size, E820_RAM);
}
}
+ /* acpismp=force forces parsing and use of the ACPI SMP table */
+ if (c == ' ' && !memcmp(from, "acpismp=force", 13))
+ enable_acpi_smp_table = 1;
+
c = *(from++);
if (!c)
break;
@@ -1023,6 +1034,15 @@
pci_mem_start = low_mem_size;
}
+static int cachesize_override __initdata = -1;
+static int __init cachesize_setup(char *str)
+{
+ get_option (&str, &cachesize_override);
+ return 1;
+}
+__setup("cachesize=", cachesize_setup);
+
+
#ifndef CONFIG_X86_TSC
static int tsc_disable __initdata = 0;
@@ -1093,12 +1113,25 @@
l2size = 256;
}
+ /* Intel PIII Tualatin. This comes in two flavours.
+ * One has 256kb of cache, the other 512. We have no way
+ * to determine which, so we use a boottime override
+ * for the 512kb model, and assume 256 otherwise.
+ */
+ if ((c->x86_vendor == X86_VENDOR_INTEL) && (c->x86 == 6) &&
+ (c->x86_model == 11) && (l2size == 0))
+ l2size = 256;
+
/* VIA C3 CPUs (670-68F) need further shifting. */
if (c->x86_vendor == X86_VENDOR_CENTAUR && (c->x86 == 6) &&
((c->x86_model == 7) || (c->x86_model == 8))) {
l2size = l2size >> 8;
}
+ /* Allow user to override all this if necessary. */
+ if (cachesize_override != -1)
+ l2size = cachesize_override;
+
if ( l2size == 0 )
return; /* Again, no L2 cache is possible */
@@ -1188,13 +1221,12 @@
}
/* K6 with old style WHCR */
- if( c->x86_model < 8 ||
- (c->x86_model== 8 && c->x86_mask < 8))
- {
+ if (c->x86_model < 8 ||
+ (c->x86_model== 8 && c->x86_mask < 8)) {
/* We can only write allocate on the low 508Mb */
if(mbytes>508)
mbytes=508;
-
+
rdmsr(MSR_K6_WHCR, l, h);
if ((l&0x0000FFFF)==0) {
unsigned long flags;
@@ -1205,14 +1237,14 @@
local_irq_restore(flags);
printk(KERN_INFO "Enabling old style K6 write allocation for %d Mb\n",
mbytes);
-
}
break;
}
- if (c->x86_model == 8 || c->x86_model == 9 || c->x86_model == 13)
- {
+
+ if ((c->x86_model == 8 && c->x86_mask >7) ||
+ c->x86_model == 9 || c->x86_model == 13) {
/* The more serious chips .. */
-
+
if(mbytes>4092)
mbytes=4092;
@@ -1229,10 +1261,8 @@
}
/* Set MTRR capability flag if appropriate */
- if ( (c->x86_model == 13) ||
- (c->x86_model == 9) ||
- ((c->x86_model == 8) &&
- (c->x86_mask >= 8)) )
+ if (c->x86_model == 13 || c->x86_model == 9 ||
+ (c->x86_model == 8 && c->x86_mask >= 8))
set_bit(X86_FEATURE_K6_MTRR, &c->x86_capability);
break;
}
@@ -2289,14 +2319,14 @@
}
-int __init x86_serial_nr_setup(char *s)
+static int __init x86_serial_nr_setup(char *s)
{
disable_x86_serial_nr = 0;
return 1;
}
__setup("serialnumber", x86_serial_nr_setup);
-int __init x86_fxsr_setup(char * s)
+static int __init x86_fxsr_setup(char * s)
{
disable_x86_fxsr = 1;
return 1;
@@ -2391,7 +2421,6 @@
{
unsigned char ccr3, ccr4;
unsigned long flags;
-
printk(KERN_INFO "Enabling CPUID on Cyrix processor.\n");
local_irq_save(flags);
ccr3 = getCx86(CX86_CCR3);
@@ -2643,11 +2672,8 @@
/*
* Get CPU information for use by the procfs.
*/
-
-int get_cpuinfo(char * buffer)
+static int show_cpuinfo(struct seq_file *m, void *v)
{
- char *p = buffer;
-
/*
* These flag bits must match the definitions in <asm/cpufeature.h>.
* NULL means this bit is undefined or reserved; either way it doesn't
@@ -2681,75 +2707,88 @@
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
};
- struct cpuinfo_x86 *c = cpu_data;
- int i, n;
+ struct cpuinfo_x86 *c = v;
+ int i, n = c - cpu_data;
+ int fpu_exception;
- for (n = 0; n < NR_CPUS; n++, c++) {
- int fpu_exception;
#ifdef CONFIG_SMP
- if (!(cpu_online_map & (1<<n)))
- continue;
+ if (!(cpu_online_map & (1<<n)))
+ return 0;
#endif
- /* Stupid hack */
- if (p - buffer > (3*PAGE_SIZE)/4)
- break;
+ seq_printf(m, "processor\t: %d\n"
+ "vendor_id\t: %s\n"
+ "cpu family\t: %d\n"
+ "model\t\t: %d\n"
+ "model name\t: %s\n",
+ n,
+ c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown",
+ c->x86,
+ c->x86_model,
+ c->x86_model_id[0] ? c->x86_model_id : "unknown");
- p += sprintf(p,"processor\t: %d\n"
- "vendor_id\t: %s\n"
- "cpu family\t: %d\n"
- "model\t\t: %d\n"
- "model name\t: %s\n",
- n,
- c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown",
- c->x86,
- c->x86_model,
- c->x86_model_id[0] ? c->x86_model_id : "unknown");
+ if (c->x86_mask || c->cpuid_level >= 0)
+ seq_printf(m, "stepping\t: %d\n", c->x86_mask);
+ else
+ seq_printf(m, "stepping\t: unknown\n");
- if (c->x86_mask || c->cpuid_level >= 0)
- p += sprintf(p, "stepping\t: %d\n", c->x86_mask);
- else
- p += sprintf(p, "stepping\t: unknown\n");
+ if ( test_bit(X86_FEATURE_TSC, &c->x86_capability) ) {
+ seq_printf(m, "cpu MHz\t\t: %lu.%03lu\n",
+ cpu_khz / 1000, (cpu_khz % 1000));
+ }
- if ( test_bit(X86_FEATURE_TSC, &c->x86_capability) ) {
- p += sprintf(p, "cpu MHz\t\t: %lu.%03lu\n",
- cpu_khz / 1000, (cpu_khz % 1000));
- }
+ /* Cache size */
+ if (c->x86_cache_size >= 0)
+ seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
+
+ /* We use exception 16 if we have hardware math and we've either seen it or the CPU claims it is internal */
+ fpu_exception = c->hard_math && (ignore_irq13 || cpu_has_fpu);
+ seq_printf(m, "fdiv_bug\t: %s\n"
+ "hlt_bug\t\t: %s\n"
+ "f00f_bug\t: %s\n"
+ "coma_bug\t: %s\n"
+ "fpu\t\t: %s\n"
+ "fpu_exception\t: %s\n"
+ "cpuid level\t: %d\n"
+ "wp\t\t: %s\n"
+ "flags\t\t:",
+ c->fdiv_bug ? "yes" : "no",
+ c->hlt_works_ok ? "no" : "yes",
+ c->f00f_bug ? "yes" : "no",
+ c->coma_bug ? "yes" : "no",
+ c->hard_math ? "yes" : "no",
+ fpu_exception ? "yes" : "no",
+ c->cpuid_level,
+ c->wp_works_ok ? "yes" : "no");
- /* Cache size */
- if (c->x86_cache_size >= 0)
- p += sprintf(p, "cache size\t: %d KB\n", c->x86_cache_size);
-
- /* We use exception 16 if we have hardware math and we've either seen it or the CPU claims it is internal */
- fpu_exception = c->hard_math && (ignore_irq13 || cpu_has_fpu);
- p += sprintf(p, "fdiv_bug\t: %s\n"
- "hlt_bug\t\t: %s\n"
- "f00f_bug\t: %s\n"
- "coma_bug\t: %s\n"
- "fpu\t\t: %s\n"
- "fpu_exception\t: %s\n"
- "cpuid level\t: %d\n"
- "wp\t\t: %s\n"
- "flags\t\t:",
- c->fdiv_bug ? "yes" : "no",
- c->hlt_works_ok ? "no" : "yes",
- c->f00f_bug ? "yes" : "no",
- c->coma_bug ? "yes" : "no",
- c->hard_math ? "yes" : "no",
- fpu_exception ? "yes" : "no",
- c->cpuid_level,
- c->wp_works_ok ? "yes" : "no");
+ for ( i = 0 ; i < 32*NCAPINTS ; i++ )
+ if ( test_bit(i, &c->x86_capability) &&
+ x86_cap_flags[i] != NULL )
+ seq_printf(m, " %s", x86_cap_flags[i]);
- for ( i = 0 ; i < 32*NCAPINTS ; i++ )
- if ( test_bit(i, &c->x86_capability) &&
- x86_cap_flags[i] != NULL )
- p += sprintf(p, " %s", x86_cap_flags[i]);
+ seq_printf(m, "\nbogomips\t: %lu.%02lu\n\n",
+ c->loops_per_jiffy/(500000/HZ),
+ (c->loops_per_jiffy/(5000/HZ)) % 100);
+ return 0;
+}
- p += sprintf(p, "\nbogomips\t: %lu.%02lu\n\n",
- c->loops_per_jiffy/(500000/HZ),
- (c->loops_per_jiffy/(5000/HZ)) % 100);
- }
- return p - buffer;
+static void *c_start(struct seq_file *m, loff_t *pos)
+{
+ return *pos < NR_CPUS ? cpu_data + *pos : NULL;
}
+static void *c_next(struct seq_file *m, void *v, loff_t *pos)
+{
+ ++*pos;
+ return c_start(m, pos);
+}
+static void c_stop(struct seq_file *m, void *v)
+{
+}
+struct seq_operations cpuinfo_op = {
+ start: c_start,
+ next: c_next,
+ stop: c_stop,
+ show: show_cpuinfo,
+};
unsigned long cpu_initialized __initdata = 0;
@@ -2822,6 +2861,53 @@
stts();
}
+/*
+ * Early probe support logic for ppro memory erratum #50
+ *
+ * This is called before we do cpu ident work
+ */
+
+int __init ppro_with_ram_bug(void)
+{
+ char vendor_id[16];
+ int ident;
+
+ /* Must have CPUID */
+ if(!have_cpuid_p())
+ return 0;
+ if(cpuid_eax(0)<1)
+ return 0;
+
+ /* Must be Intel */
+ cpuid(0, &ident,
+ (int *)&vendor_id[0],
+ (int *)&vendor_id[8],
+ (int *)&vendor_id[4]);
+
+ if(memcmp(vendor_id, "IntelInside", 12))
+ return 0;
+
+ ident = cpuid_eax(1);
+
+ /* Model 6 */
+
+ if(((ident>>8)&15)!=6)
+ return 0;
+
+ /* Pentium Pro */
+
+ if(((ident>>4)&15)!=1)
+ return 0;
+
+ if((ident&15) < 8)
+ {
+ printk(KERN_INFO "Pentium Pro with Errata#50 detected. Taking evasive action.\n");
+ return 1;
+ }
+ printk(KERN_INFO "Your Pentium Pro seems ok.\n");
+ return 0;
+}
+
/*
* Local Variables:
* mode:c
|
|
From: James S. <jsi...@us...> - 2001-12-26 17:28:13
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/alpha/kernel
In directory usw-pr-cvs1:/tmp/cvs-serv5113/arch/alpha/kernel
Modified Files:
setup.c
Log Message:
Synced to 2.5.0. Don't use. The default 2.5.0 has a nasty bug in it.
Index: setup.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/alpha/kernel/setup.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- setup.c 2001/11/13 19:38:21 1.5
+++ setup.c 2001/12/26 17:28:10 1.6
@@ -30,6 +30,7 @@
#include <linux/ioport.h>
#include <linux/bootmem.h>
#include <linux/pci.h>
+#include <linux/seq_file.h>
#ifdef CONFIG_BLK_DEV_INITRD
#include <linux/blk.h>
@@ -1028,10 +1029,8 @@
}
-/*
- * BUFFER is PAGE_SIZE bytes long.
- */
-int get_cpuinfo(char *buffer)
+static int
+show_cpuinfo(struct seq_file *f, void *slot)
{
extern struct unaligned_stat {
unsigned long count, va, pc;
@@ -1043,14 +1042,13 @@
"EV68CX", "EV7", "EV79", "EV69"
};
- struct percpu_struct *cpu;
+ struct percpu_struct *cpu = slot;
unsigned int cpu_index;
char *cpu_name;
char *systype_name;
char *sysvariation_name;
- int len, nr_processors;
+ int nr_processors;
- cpu = (struct percpu_struct*)((char*)hwrpb + hwrpb->processor_offset);
cpu_index = (unsigned) (cpu->type - 1);
cpu_name = "Unknown";
if (cpu_index < N(cpu_names))
@@ -1061,8 +1059,7 @@
nr_processors = get_nr_processors(cpu, hwrpb->nr_processors);
- len = sprintf(buffer,
- "cpu\t\t\t: Alpha\n"
+ seq_printf(f, "cpu\t\t\t: Alpha\n"
"cpu model\t\t: %s\n"
"cpu variation\t\t: %ld\n"
"cpu revision\t\t: %ld\n"
@@ -1099,11 +1096,41 @@
platform_string(), nr_processors);
#ifdef CONFIG_SMP
- len += smp_info(buffer+len);
+ seq_printf(f, "cpus active\t\t: %d\n"
+ "cpu active mask\t\t: %016lx\n",
+ smp_num_cpus, cpu_present_mask);
#endif
- return len;
+ return 0;
}
+
+/*
+ * We show only CPU #0 info.
+ */
+static void *
+c_start(struct seq_file *f, loff_t *pos)
+{
+ return *pos ? NULL : (char *)hwrpb + hwrpb->processor_offset;
+}
+
+static void *
+c_next(struct seq_file *f, void *v, loff_t *pos)
+{
+ return NULL;
+}
+
+static void
+c_stop(struct seq_file *f, void *v)
+{
+}
+
+struct seq_operations cpuinfo_op = {
+ start: c_start,
+ next: c_next,
+ stop: c_stop,
+ show: show_cpuinfo,
+};
+
static int alpha_panic_event(struct notifier_block *this,
unsigned long event,
|