Linux now has some ability to manipulate cursor appearance. Normally, you
can set the size of hardware cursor (and also work around some ugly bugs in
-those miserable Trident cards--see #define TRIDENT_GLITCH in drivers/char/
-vga.c). In case you enable "Software generated cursor" in the system
-configuration, you can play a few new tricks: you can make your cursor look
-like a non-blinking red block, make it inverse background of the character
-it's over or to highlight that character and still choose whether the
-original hardware cursor should remain visible or not. There may be other
-things I have never thought of.
+those miserable Trident cards--see #define TRIDENT_GLITCH in drivers/video/
+vgacon.c). You can now play a few new tricks: you can make your cursor look
+like a non-blinking red block, make it inverse background of the character it's
+over or to highlight that character and still choose whether the original
+hardware cursor should remain visible or not. There may be other things I have
+never thought of.
The cursor appearance is controlled by a "<ESC>[?1;2;3c" escape sequence
where 1, 2 and 3 are parameters described below. If you omit any of them,
VERSION = 2
PATCHLEVEL = 1
-SUBLEVEL = 114
+SUBLEVEL = 115
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
static int alcor_indices[] = {0,0,0,1,1,1,0,0,0,0,0,0,2,2,2,2,2,2};
static char * eb64p_names[] = {"EB64+", "Cabriolet", "AlphaPCI64"};
- static int eb64p_indices[] = {0,0,1.2};
+ static int eb64p_indices[] = {0,0,1,2};
static char * eb66_names[] = {"EB66", "EB66+"};
static int eb66_indices[] = {0,0,1};
/*
* bios32.c - Low-Level PCI Access
*
- * $Id: bios32.c,v 1.43 1998/08/03 15:59:20 mj Exp $
+ * $Id: bios32.c,v 1.44 1998/08/04 14:54:56 mj Exp $
*
* Copyright 1993, 1994 Drew Eckhardt
* Visionary Computing
*
* Jun 19, 1998 : Changed to use spinlocks, so that PCI configuration space
* can be accessed from interrupts even on SMP systems. [mj]
+ *
+ * August 1998 : Better support for peer host bridges and more paranoid
+ * checks for direct hardware access. Ugh, this file starts to look as
+ * a large gallery of common hardware bug workarounds (watch the comments)
+ * -- the PCI specs themselves are sane, but most implementors should be
+ * hit hard with \hammer scaled \magstep5. [mj]
*/
#include <linux/config.h>
pci_conf2_write_config_dword
};
+/*
+ * Before we decide to use direct hardware access mechanisms, we try to do some
+ * trivial checks to ensure it at least _seems_ to be working -- we just test
+ * whether bus 00 contains a host bridge (this is similar to checking
+ * techniques used in XFree86, but ours should be more reliable since we
+ * attempt to make use of direct access hints provided by the PCI BIOS).
+ */
+__initfunc(int pci_sanity_check(struct pci_access *a))
+{
+ u16 dfn, class;
+
+ for(dfn=0; dfn < 0x100; dfn++)
+ if (!a->read_config_word(0, dfn, PCI_CLASS_DEVICE, &class) &&
+ class == PCI_CLASS_BRIDGE_HOST)
+ return 1;
+ DBG("PCI: Sanity check failed\n");
+ return 0;
+}
+
__initfunc(static struct pci_access *pci_check_direct(void))
{
unsigned int tmp;
outb (0x01, 0xCFB);
tmp = inl (0xCF8);
outl (0x80000000, 0xCF8);
- if (inl (0xCF8) == 0x80000000) {
+ if (inl (0xCF8) == 0x80000000 &&
+ pci_sanity_check(&pci_direct_conf1)) {
outl (tmp, 0xCF8);
__restore_flags(flags);
printk("PCI: Using configuration type 1\n");
outb (0x00, 0xCFB);
outb (0x00, 0xCF8);
outb (0x00, 0xCFA);
- if (inb (0xCF8) == 0x00 && inb (0xCFA) == 0x00) {
+ if (inb (0xCF8) == 0x00 && inb (0xCFA) == 0x00 &&
+ pci_sanity_check(&pci_direct_conf2)) {
__restore_flags(flags);
printk("PCI: Using configuration type 2\n");
return &pci_direct_conf2;
struct pci_bus *b = &pci_root;
int i;
+#ifdef CONFIG_PCI_DIRECT
/*
* Don't search for peer host bridges if we use config type 2
* since it reads bogus values for non-existent busses and
*/
if (access_pci == &pci_direct_conf2)
return;
+#endif
do {
int n = b->subordinate+1;
u16 l;
.long SYMBOL_NAME(sys_capset) /* 185 */
.long SYMBOL_NAME(sys_sigaltstack)
.long SYMBOL_NAME(sys_sendfile)
+ .long SYMBOL_NAME(sys_ni_syscall) /* streams1 */
+ .long SYMBOL_NAME(sys_ni_syscall) /* streams2 */
.rept NR_syscalls-187
.long SYMBOL_NAME(sys_ni_syscall)
/*
* disable it in the 8259A:
*/
- cached_irq_mask |= 1 << i;
if (i < 16)
- set_8259A_irq_mask(i);
+ disable_8259A_irq(i);
}
}
}
/*
* About the IO-APIC, the architecture is 'merged' into our
* current irq architecture, seemlessly. (i hope). It is only
- * visible through 8 more hardware interrupt lines, but otherwise
- * drivers are unaffected. The main code is believed to be
- * NR_IRQS-safe (nothing anymore thinks we have 16
+ * visible through a few more more hardware interrupt lines, but
+ * otherwise drivers are unaffected. The main code is believed
+ * to be NR_IRQS-safe (nothing anymore thinks we have 16
* irq lines only), but there might be some places left ...
*/
/*
* This contains the irq mask for both 8259A irq controllers,
- * and on SMP the extended IO-APIC IRQs 16-23. The IO-APIC
- * uses this mask too, in probe_irq*().
- *
- * (0x0000ffff for NR_IRQS==16, 0x00ffffff for NR_IRQS=24)
*/
-#if NR_IRQS == 64
-unsigned long long cached_irq_mask = -1;
-#else
-unsigned long long cached_irq_mask = (((unsigned long long) 1)<<NR_IRQS)-1;
-#endif
+static unsigned int cached_irq_mask = 0xffff;
+
+#define __byte(x,y) (((unsigned char *)&(y))[x])
+#define __word(x,y) (((unsigned short *)&(y))[x])
+#define __long(x,y) (((unsigned int *)&(y))[x])
-#define cached_21 ((cached_irq_mask | io_apic_irqs) & 0xff)
-#define cached_A1 (((cached_irq_mask | io_apic_irqs) >> 8) & 0xff)
+#define cached_21 (__byte(0,cached_irq_mask))
+#define cached_A1 (__byte(1,cached_irq_mask))
spinlock_t irq_controller_lock;
* this 'mixed mode' IRQ handling costs us one more branch in do_IRQ,
* but we have _much_ higher compatibility and robustness this way.
*/
-
-/*
- * Default to all normal IRQ's _not_ using the IO APIC.
- *
- * To get IO-APIC interrupts we turn some of them into IO-APIC
- * interrupts during boot.
- */
unsigned long long io_apic_irqs = 0;
static void do_8259A_IRQ (unsigned int irq, int cpu, struct pt_regs * regs);
-static void enable_8259A_irq (unsigned int irq);
-static void disable_8259A_irq (unsigned int irq);
+static void enable_8259A_irq(unsigned int irq);
+void disable_8259A_irq(unsigned int irq);
/*
* Dummy controller type for unused interrupts
* These have to be protected by the irq controller spinlock
* before being called.
*/
-
-static inline void mask_8259A(unsigned int irq)
+void disable_8259A_irq(unsigned int irq)
{
- cached_irq_mask |= 1 << irq;
+ unsigned int mask = 1 << irq;
+ cached_irq_mask |= mask;
if (irq & 8) {
outb(cached_A1,0xA1);
} else {
}
}
-static inline void unmask_8259A(unsigned int irq)
+static void enable_8259A_irq(unsigned int irq)
{
- cached_irq_mask &= ~(1 << irq);
+ unsigned int mask = ~(1 << irq);
+ cached_irq_mask &= mask;
if (irq & 8) {
outb(cached_A1,0xA1);
} else {
}
}
-void set_8259A_irq_mask(unsigned int irq)
-{
- /*
- * (it might happen that we see IRQ>15 on a UP box, with SMP
- * emulation)
- */
- if (irq < 16) {
- if (irq & 8) {
- outb(cached_A1,0xA1);
- } else {
- outb(cached_21,0x21);
- }
- }
-}
-
/*
* This builds up the IRQ handler stubs using some ugly macros in irq.h
*
return status;
}
-/*
- * disable/enable_irq() wait for all irq contexts to finish
- * executing. Also it's recursive.
- */
-static void disable_8259A_irq(unsigned int irq)
-{
- cached_irq_mask |= 1 << irq;
- set_8259A_irq_mask(irq);
-}
-
-void enable_8259A_irq (unsigned int irq)
-{
- cached_irq_mask &= ~(1 << irq);
- set_8259A_irq_mask(irq);
-}
-
-int i8259A_irq_pending (unsigned int irq)
+int i8259A_irq_pending(unsigned int irq)
{
unsigned int mask = 1<<irq;
}
-void make_8259A_irq (unsigned int irq)
+void make_8259A_irq(unsigned int irq)
{
- io_apic_irqs &= ~(1<<irq);
+ __long(0,io_apic_irqs) &= ~(1<<irq);
irq_desc[irq].handler = &i8259A_irq_type;
disable_irq(irq);
enable_irq(irq);
if (handle_IRQ_event(irq, regs)) {
spin_lock(&irq_controller_lock);
if (!(irq_desc[irq].status &= IRQ_DISABLED))
- unmask_8259A(irq);
+ enable_8259A_irq(irq);
spin_unlock(&irq_controller_lock);
}
* do_IRQ handles all normal device IRQ's (the special
* SMP cross-CPU interrupts have their own specific
* handlers).
- *
- * the biggest change on SMP is the fact that we no more mask
- * interrupts in hardware, please believe me, this is unavoidable,
- * the hardware is largely message-oriented, i tried to force our
- * state-driven irq handling scheme onto the IO-APIC, but no avail.
- *
- * so we soft-disable interrupts via 'event counters', the first 'incl'
- * will do the IRQ handling. This also has the nice side effect of increased
- * overlapping ... i saw no driver problem so far.
*/
asmlinkage void do_IRQ(struct pt_regs regs)
{
#ifdef __SMP__
if (IO_APIC_IRQ(irq)) {
/*
- * First disable it in the 8259A:
+ * If it was on a 8259, disable it there
+ * and move the "pendingness" onto the
+ * new irq descriptor.
*/
- cached_irq_mask |= 1 << irq;
if (irq < 16) {
- set_8259A_irq_mask(irq);
- /*
- * transport pending ISA IRQs to
- * the new descriptor
- */
+ disable_8259A_irq(irq);
if (i8259A_irq_pending(irq))
irq_desc[irq].events = 1;
}
void mask_irq(unsigned int irq);
void unmask_irq(unsigned int irq);
-void set_8259A_irq_mask (unsigned int irq);
+void disable_8259A_irq(unsigned int irq);
int i8259A_irq_pending (unsigned int irq);
void ack_APIC_irq (void);
void setup_IO_APIC (void);
void print_IO_APIC (void);
extern unsigned long long io_apic_irqs;
-extern unsigned long long cached_irq_mask;
#define IO_APIC_VECTOR(irq) irq_vector[irq]
#include <linux/interrupt.h>
#include <linux/config.h>
#include <linux/version.h>
+#include <linux/tqueue.h>
#ifdef CONFIG_APM
#include <linux/apm_bios.h>
#endif
*/
static struct vc_data *master_display_fg = NULL;
+/*
+ * Unfortunately, we need to delay tty echo when we're currently writing to the
+ * console since the code is (and always was) not re-entrant, so we insert
+ * all filp requests to con_task_queue instead of tq_timer and run it from
+ * the console_bh.
+ */
+DECLARE_TASK_QUEUE(con_task_queue);
+
/*
* Low-Level Functions
*/
tty_insert_flip_char(tty, *p, 0);
p++;
}
- tty_schedule_flip(tty);
+ con_schedule_flip(tty);
}
static void cursor_report(int currcons, struct tty_struct * tty)
struct vt_struct *vt = (struct vt_struct *)tty->driver_data;
u16 himask, charmask;
-#if CONFIG_AP1000
- ap_write(1,buf,count);
- return(count);
-#endif
-
currcons = vt->vc_num;
if (!vc_cons_allocated(currcons)) {
/* could this happen? */
*/
static void console_bh(void)
{
+ run_task_queue(&con_task_queue);
if (want_console >= 0) {
if (want_console != fg_console && vc_cons_allocated(want_console)) {
hide_cursor(fg_console);
ushort cnt = 0;
ushort myx = x;
-#if CONFIG_AP1000
- prom_printf(b);
- return;
-#endif
if (!printable || printing)
return; /* console not yet initialized */
printing = 1;
if (!vc_cons_allocated(currcons)) {
/* impossible */
printk("vt_console_print: tty %d not allocated ??\n", currcons+1);
- return;
+ goto quit;
}
/* undraw cursor first */
- hide_cursor(currcons);
-
+ if (IS_FG)
+ hide_cursor(currcons);
+
start = (ushort *)pos;
/* Contrived structure to try to emulate original need_wrap behaviour
* Problems caused when we have need_wrap set on '\n' character */
+ disable_bh(CONSOLE_BH);
while (count--) {
+ enable_bh(CONSOLE_BH);
c = *b++;
+ disable_bh(CONSOLE_BH);
if (c == 10 || c == 13 || c == 8 || need_wrap) {
if (cnt > 0) {
- sw->con_putcs(vc_cons[currcons].d, start, cnt, y, x);
+ if (IS_VISIBLE)
+ sw->con_putcs(vc_cons[currcons].d, start, cnt, y, x);
x += cnt;
if (need_wrap)
x--;
myx++;
}
if (cnt > 0) {
- sw->con_putcs(vc_cons[currcons].d, start, cnt, y, x);
+ if (IS_VISIBLE)
+ sw->con_putcs(vc_cons[currcons].d, start, cnt, y, x);
x += cnt;
if (x == video_num_columns) {
x--;
need_wrap = 1;
}
}
+ enable_bh(CONSOLE_BH);
set_cursor(currcons);
poke_blanked_console();
+
+quit:
printing = 0;
}
console_num = MINOR(tty->device) - (tty->driver.minor_start);
if (!vc_cons_allocated(console_num))
return;
-#if !CONFIG_AP1000
set_vc_kbd_led(kbd_table + console_num, VC_SCROLLOCK);
set_leds();
-#endif
}
/*
console_num = MINOR(tty->device) - (tty->driver.minor_start);
if (!vc_cons_allocated(console_num))
return;
-#if !CONFIG_AP1000
clr_vc_kbd_led(kbd_table + console_num, VC_SCROLLOCK);
set_leds();
-#endif
}
static void con_flush_chars(struct tty_struct *tty)
if (tty_register_driver(&console_driver))
panic("Couldn't register console driver\n");
-#if CONFIG_AP1000
- return kmem_start;
-#endif
-
timer_table[BLANK_TIMER].fn = blank_screen;
timer_table[BLANK_TIMER].expires = 0;
if (blankinterval) {
/* If from KDFONTOP ioctl, don't allow things which can be done in userland,
so that we can get rid of this soon */
- if (op->flags & KD_FONT_FLAG_NEW)
+ if (!(op->flags & KD_FONT_FLAG_OLD))
goto quit;
rc = -EFAULT;
for (h = 32; h > 0; h--)
if (op->data && op->charcount > old_op.charcount)
rc = -ENOSPC;
- if (op->flags & KD_FONT_FLAG_NEW) {
+ if (!(op->flags & KD_FONT_FLAG_OLD)) {
if (op->width > old_op.width ||
op->height > old_op.height)
rc = -ENOSPC;
u16 vcs_scr_readw(int currcons, u16 *org)
{
- if (org == (u16 *)pos && softcursor_original != -1)
+ if ((unsigned long)org == pos && softcursor_original != -1)
return softcursor_original;
return scr_readw(org);
}
void vcs_scr_writew(int currcons, u16 val, u16 *org)
{
scr_writew(val, org);
- if (org == (u16 *)pos) {
+ if ((unsigned long)org == pos) {
softcursor_original = -1;
add_softcursor(currcons);
}
* parts by Geert Uytterhoeven, May 1997
*
* 27-05-97: Added support for the Magic SysRq Key (Martin Mares)
+ * 16-01-97: Dead-key-twice behavior now configurable (Jiri Hanika)
*/
#include <linux/config.h>
const int NR_TYPES = SIZE(max_vals);
-static void put_queue(int);
+/* N.B. drivers/macintosh/mac_keyb.c needs to call put_queue */
+void put_queue(int);
static unsigned char handle_diacr(unsigned char);
/* kbd_pt_regs - set by keyboard_interrupt(), used by show_ptregs() */
}
-static void put_queue(int ch)
+void put_queue(int ch)
{
wake_up(&keypress_wait);
if (tty) {
tty_insert_flip_char(tty, ch, 0);
- tty_schedule_flip(tty);
+ con_schedule_flip(tty);
}
}
tty_insert_flip_char(tty, *cp, 0);
cp++;
}
- tty_schedule_flip(tty);
+ con_schedule_flip(tty);
}
static void applkey(int key, char mode)
if (!tty)
return;
tty_insert_flip_char(tty, 0, TTY_BREAK);
- tty_schedule_flip(tty);
+ con_schedule_flip(tty);
}
static void scroll_forw(void)
static unsigned char ret_diacr[NR_DEAD] =
{A_GRAVE, A_ACUTE, A_CFLEX, A_TILDE, A_DIAER, A_CEDIL };
-/* If a dead key pressed twice, output a character corresponding to it, */
-/* otherwise just remember the dead key. */
+/* If a dead key pressed twice, output a character corresponding to it, */
+/* unless overriden in accent_table; otherwise just remember the dead key. */
static void do_dead(unsigned char value, char up_flag)
{
value = ret_diacr[value];
if (diacr == value) { /* pressed twice */
- diacr = 0;
- put_queue(value);
+ put_queue(handle_diacr(value));
return;
}
diacr = value;
return accent_table[i].result;
}
- put_queue(d);
+ if (ch != d) /* dead key pressed twice, put once */
+ put_queue(d);
return ch;
}
/* adapted from radio-aztech.c */
- freq = (freq / 16.0) * 100; /* massage the data a little */
+ freq = (freq * 100) / 16; /* massage the data a little */
freq += 1070; /* IF = 10.7 MHz */
freq /= 5; /* ref = 25 kHz */
return -EFAULT;
if(v.tuner) /* Only 1 tuner */
return -EINVAL;
- v.rangelow=(int)(88.0*16);
- v.rangehigh=(int)(108.0*16);
+ v.rangelow=(88*16);
+ v.rangehigh=(108*16);
v.flags=0;
v.mode=VIDEO_MODE_AUTO;
v.signal=0xFFFF*rt_getsigstr(rt);
{
int i;
- frequency = (frequency / 16.0) * 100; /* massage data a bit */
+ frequency = (frequency * 100) / 16; /* massage data a bit */
frequency += 1070; /* tuning needs 24 data bits */
frequency /= 5;
return -EFAULT;
if(v.tuner) /* Only 1 tuner */
return -EINVAL;
- v.rangelow=(int)(87.9*16);
- v.rangehigh=(int)(107.8*16);
+ v.rangelow=(879*16)/10;
+ v.rangehigh=(1078*16)/10;
v.flags=0;
v.mode=VIDEO_MODE_AUTO;
v.signal=0xFFFF*az_getsigstr(az);
if (!perm)
return -EPERM;
op.op = KD_FONT_OP_SET;
- op.flags = 0;
+ op.flags = KD_FONT_FLAG_OLD;
op.width = 8;
op.height = cfdarg.charheight;
op.charcount = cfdarg.charcount;
return con_font_op(fg_console, &op);
case GIO_FONTX: {
op.op = KD_FONT_OP_GET;
- op.flags = 0;
+ op.flags = KD_FONT_FLAG_OLD;
op.width = 8;
op.height = cfdarg.charheight;
op.charcount = cfdarg.charcount;
if (!perm)
return -EPERM;
op.op = KD_FONT_OP_SET;
- op.flags = KD_FONT_FLAG_DONT_RECALC; /* Compatibility */
+ op.flags = KD_FONT_FLAG_OLD | KD_FONT_FLAG_DONT_RECALC; /* Compatibility */
op.width = 8;
op.height = 0;
op.charcount = 256;
case GIO_FONT: {
struct console_font_op op;
op.op = KD_FONT_OP_GET;
- op.flags = 0;
+ op.flags = KD_FONT_FLAG_OLD;
op.width = 8;
op.height = 32;
op.charcount = 256;
return -EFAULT;
if (!perm && op.op != KD_FONT_OP_GET)
return -EPERM;
- op.flags |= KD_FONT_FLAG_NEW;
i = con_font_op(console, &op);
if (i) return i;
if (copy_to_user((void *) arg, &op, sizeof(op)))
if (vt_cons[new_console]->vc_mode == KD_TEXT)
set_palette() ;
- /* FIXME: Do we still need this? */
-#ifdef CONFIG_SUN_CONSOLE
- if (old_vc_mode != vt_cons[new_console]->vc_mode)
- {
- if (old_vc_mode == KD_GRAPHICS)
- update_screen(new_console);
- }
-#endif
/*
* Wake anyone waiting for their VT to activate
*/
};
#define STATS_TIMER (10*HZ)
-#define ERRTIME (0.1*HZ)
+#define ERRTIME (HZ/10)
/* MRU */
#define MAXBUFSIZE 1534
{
if (IBM_DS.total_accesses == 0) return (0);
if (IBM_DS.ldn_access[ldn] == 0) return (0);
-#error Floating point in kernel - shoot programmer
- return((int)(((float)IBM_DS.ldn_access[ldn]/(float)IBM_DS.total_accesses)*(float)100.000));
+ return (IBM_DS.ldn_access[ldn] * 100) / IBM_DS.total_accesses;
}
/* calculate total amount of r/w-accesses */
configs[wd7000_card_num].bus_on = BUS_ON;
}
else
- configs[wd7000_card_num].bus_on = ints[4] / 125.0;
+ configs[wd7000_card_num].bus_on = ints[4] / 125;
}
else
configs[wd7000_card_num].bus_on = BUS_ON;
configs[wd7000_card_num].bus_off = BUS_OFF;
}
else
- configs[wd7000_card_num].bus_off = ints[5] / 125.0;
+ configs[wd7000_card_num].bus_off = ints[5] / 125;
}
else
configs[wd7000_card_num].bus_off = BUS_OFF;
display_desc = "*MDA";
request_region(0x3b0,12,"mda");
request_region(0x3bf, 1,"mda");
+ vga_video_font_height = 16;
}
}
else /* If not, it is color. */
vga_vram_end = 0xba000;
display_desc = "*CGA";
request_region(0x3d4,2,"cga");
+ vga_video_font_height = 8;
}
}
vga_vram_base = VGA_MAP_MEM(vga_vram_base);
|| vga_video_type == VIDEO_TYPE_EGAM) {
vga_hardscroll_enabled = vga_hardscroll_user_enable;
vga_default_font_height = ORIG_VIDEO_POINTS;
- vga_video_font_height = video_font_height = ORIG_VIDEO_POINTS;
+ vga_video_font_height = ORIG_VIDEO_POINTS;
/* This may be suboptimal but is a safe bet - go with it */
video_scan_lines =
- video_font_height * vga_video_num_lines;
+ vga_video_font_height * vga_video_num_lines;
}
+ video_font_height = vga_video_font_height;
return display_desc;
}
static void vgacon_invert_region(struct vc_data *c, u16 *p, int count)
{
- if (vga_can_do_color) {
- while (count--) {
- u16 a = scr_readw(p);
- a = (((a) & 0x88ff) | (((a) & 0x7000) >> 4)
- | (((a) & 0x0700) << 4));
- scr_writew(a, p++);
- }
- } else {
- while (count--) {
- u16 a = scr_readw(p);
+ int col = vga_can_do_color;
+
+ while (count--) {
+ u16 a = scr_readw(p);
+ if (col)
+ a = ((a) & 0x88ff) | (((a) & 0x7000) >> 4) | (((a) & 0x0700) << 4);
+ else
a ^= ((a & 0x0700) == 0x0100) ? 0x7000 : 0x7700;
- scr_writew(a, p++);
- }
+ scr_writew(a, p++);
}
}
charmap = (char *)VGA_MAP_MEM(colourmap);
beg = 0x0e;
#ifdef VGA_CAN_DO_64KB
- if (video_type == VIDEO_TYPE_VGAC)
+ if (vga_video_type == VIDEO_TYPE_VGAC)
beg = 0x06;
#endif
} else {
if (flag & O_CREAT) {
struct dentry *dir;
+ error = -EEXIST;
+ if (dentry->d_inode && (flag & O_EXCL))
+ goto exit;
+
dir = lock_parent(dentry);
error = PTR_ERR(dir);
if (IS_ERR(dir))
goto exit;
+
/*
- * The existence test must be done _after_ getting the directory
- * semaphore - the dentry might otherwise change.
+ * Somebody might have created the file while we
+ * waited for the directory lock.. So we have to
+ * re-do the existence test.
*/
if (dentry->d_inode) {
error = 0;
break;
}
len += sprintf(page+len, "%-20s /dev/%-8s %3d %7s %s\n",
- p->driver_name ? p->driver_name : "",
+ p->driver_name ? p->driver_name : "unknown",
p->name, p->major, range, type);
if (len+begin > off+count)
break;
/*
* Your basic spinlocks, allowing only a single CPU anywhere
*/
-typedef struct { } spinlock_t;
-#define SPIN_LOCK_UNLOCKED { }
+typedef struct { int gcc_is_buggy; } spinlock_t;
+#define SPIN_LOCK_UNLOCKED { 0 }
#define spin_lock_init(lock) do { } while(0)
#define spin_lock(lock) do { } while(0)
#define __NR_capset 185
#define __NR_sigaltstack 186
#define __NR_sendfile 187
+#define __NR_streams1 188 /* some people actually want it */
+#define __NR_streams2 189 /* some people actually want it */
/* user-visible error numbers are in the range -1 - -122: see <asm-i386/errno.h> */
* to achieve effects such as fast scrolling by changing the origin.
*/
-/*
- * You can set here how should the cursor look by default.
- * In case you set CONFIG_SOFTCURSOR, this might be really interesting.
- */
-#define CUR_DEFAULT CUR_UNDERLINE
-
#define NPAR 16
struct vc_data {
#define CUR_BLOCK 6
#define CUR_HWMASK 0x0f
#define CUR_SWMASK 0xfff0
+
+#define CUR_DEFAULT CUR_UNDERLINE
extern unsigned int keymap_count;
+/* console.c */
+
+extern task_queue con_task_queue;
+
+extern inline void con_schedule_flip(struct tty_struct *t)
+{
+ queue_task(&t->flip.tqueue, &con_task_queue);
+ mark_bh(CONSOLE_BH);
+}
+
#endif
#define KD_FONT_OP_SET_DEFAULT 2 /* Set font to default, data points to name / NULL */
#define KD_FONT_OP_COPY 3 /* Copy from another console */
-#define KD_FONT_FLAG_GLOBAL 1 /* Change on _all_ consoles */
-#define KD_FONT_FLAG_DONT_RECALC 2 /* Don't recalculate hw charcell size [compat] */
+#define KD_FONT_FLAG_DONT_RECALC 1 /* Don't recalculate hw charcell size [compat] */
#ifdef __KERNEL__
-#define KD_FONT_FLAG_NEW 0x80000000 /* Indicate new KDFONTOP interface, which should be more strict */
+#define KD_FONT_FLAG_OLD 0x80000000 /* Invoked via old interface [compat] */
#endif
/* note: 0x4B00-0x4B4E all have had a value at some time;
#define DEF_PRIORITY (20*HZ/100) /* 200 ms time slices */
-/* Note: This is very ugly I admit. But some versions of gcc will
- * dump core when an empty structure constant is parsed at
- * the end of a large top level structure initialization. -DaveM
- */
-#ifdef __SMP__
-#define INIT_LOCKS SPIN_LOCK_UNLOCKED
-#else
-#define INIT_LOCKS
-#endif
-
/*
* INIT_TASK is used to set up the first task table, touch at
* your own risk!. Base=0, limit=0x1fffff (=2MB)
/* fs */ &init_fs, \
/* files */ &init_files, \
/* mm */ &init_mm, \
-/* signals */ INIT_LOCKS, &init_signals, {{0}}, {{0}}, NULL, &init_task.sigqueue, 0, 0, \
+/* signals */ SPIN_LOCK_UNLOCKED, &init_signals, {{0}}, {{0}}, NULL, &init_task.sigqueue, 0, 0, \
}
union task_union {
dquot_init_hash();
#endif
printk("POSIX conformance testing by UNIFIX\n");
- check_bugs();
#ifdef __SMP__
smp_init();
#endif
+ check_bugs();
+
#if defined(CONFIG_MTRR) /* Do this after SMP initialization */
/*
* We should probably create some architecture-dependent "fixup after