Commit 9d0031fc authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.37pre2

parent 11297b7c
......@@ -26,6 +26,8 @@ devices.txt
- plain ASCII listing of all the nodes in /dev/ with major minor #'s
digiboard.txt
- info on the Digiboard PC/X{i,e,eve} multiport boards.
digiepca.txt
- info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards.
exception.txt
- how linux v2.1 handles exceptions without verify_area etc.
ez.txt
......
......@@ -4036,6 +4036,16 @@ CONFIG_SERIAL_CONSOLE
N here so that they can use the serial port for modem, mouse or some
other device.
Digi Intl. epca support
CONFIG_DIGIEPCA
This is a driver for Digi Internationals Xx, Xeve, and Xem
series of cards. This driver supports the original PC (ISA) boards as
well as PCI, and EISA. If you have a card like this, say Y here and read
the file Documentation/digiepca.txt. NOTE: This driver is seperate from
the driver written and copyrighted by Troy De Jongh. Because they both
attempt (In some cases) to access the same hardware only one of these
drivers (CONFIG_DIGIEPCA or CONFIG_DIGI) should be selected.
Digiboard PC/Xx Support
CONFIG_DIGI
This is a driver for the Digiboard PC/Xe, PC/Xi, and PC/Xeve cards
......@@ -5317,7 +5327,7 @@ CONFIG_MSDOS_PARTITION
# LocalWords: mgetty sendfax gert greenie muc lowlevel Lasermate LanManager io
# LocalWords: OOPSes trackball binghamton mobileip ncr IOMAPPED settags ns ser
# LocalWords: setsync NEGO MPARITY autotuning prefetch PIIX cdwrite utils rc
# LocalWords: PCWATCHDOG berkprod bitgate boldt ucsb jf kyoto jp euc Tetsuyasu
# LocalWords: PCWATCHDOG berkprod bitgate boldt ucsb jf kyoto jp euc Tetsuyasu
# LocalWords: YAMADA tetsu cauchy nslab ntt nevod perm su doc kaf kheops wsc
# LocalWords: traduc Bourgin dbourgin helptext menuconfig kfill READMEs HOWTOs
# LocalWords: IDEDISK IDEFLOPPY EIDE firewalls QMAGIC ZMAGIC LocalWords opti
......
The Digi Intl. epca driver.
----------------------------
The Digi Intl. epca driver for Linux supports the following boards:
Digi PC/Xem, PC/Xr, PC/Xe, PC/Xi, PC/Xeve
Digi EISA/Xem, PCI/Xem, PCI/Xr
Limitations:
------------
Currently the driver only autoprobes for supported PCI boards.
The Linux MAKEDEV command does not support generating the Digiboard
Devices. Users executing digiConfig to setup EISA and PC series cards
will have their device nodes automaticly constructed (cud?? for ~CLOCAL,
and ttyD?? for CLOCAL). Users wishing to boot their board from the LILO
prompt, or those users booting PCI cards may use buildDIGI to construct
the necessary nodes.
Notes:
------
This driver may be configured via LILO. For users who have already configured
their driver using digiConfig, configuring from lilo will override previous
settings. Multiple boards may be configured by issuing multiple LILO command
lines. For examples see the bottom of this document.
Device names start at 0 and continue up. Beware of this as previous Digi
drivers started device names with 1.
PCI boards are auto-detected and configured by the driver. PCI boards will
be allocated device numbers (internally) begining with the lowest PCI slot
first. In other words a PCI card in slot 3 will always have higher device
nodes than a PCI card in slot 1.
LILO config examples:
---------------------
Using LILO's APPEND command, a string of comma separated identifiers or
integers can be used to configure supported boards. The six values in order
are:
Enable/Disable this card or Override,
Type of card: PC/Xe (AccelePort) (0), PC/Xeve (1), PC/Xem or PC/Xr (2),
EISA/Xem (3), PC/64Xe (4), PC/Xi (5),
Enable/Disable alternate pin arrangement,
Number of ports on this card,
I/O Port where card is configured (in HEX if using string identifiers),
Base of memory window (in HEX if using string identifiers),
NOTE : PCI boards are auto-detected and configured. Do not attempt to
configure PCI boards with the LILO append comand. If you wish to override
previous configuration data (As set by digiConfig), but you do not wish to
configure any specific card (Example if there are PCI cards in the system)
the following override command will accomplish this:
-> append="digi=2"
Samples:
append="digiepca=E,PC/Xe,D,16,200,D0000"
or
append="digi=1,0,0,16,512,851968"
Supporting Tools:
-----------------
Supporting tools include digiDload, digiConfig, buildPCI, and ditty. See
/usr/src/linux/Documentation/README.epca.dir/user.doc for more details. Note,
this driver REQUIRES that digiDload be executed prior to it being used.
Failure to do this will result in an ENODEV error.
The latest version of the tool package is available at:
ftp://ftp.dgii.com/drivers/linux/released/async/
Documentation:
--------------
Complete documentation for this product may be found in the tool package.
Sources of information and support:
-----------------------------------
Digi Intl. support site for this product:
-> digilnux@dgii.com
Related information and information concerning other drivers supporting
Digi Intl. products:
-> FTP: ftp://dgii.com
-> Webpage: http://www.dgii.com
-> Webpage: http://private.fuller.edu/clameter/digi.html
-> Mailing List: digiboard@list.fuller.edu Note write e-mail to subscribe
common ListServ commands will not work.
Acknowledgments:
----------------
Much of this work (And even text) was derived from a similar document
supporting the original public domain DigiBoard driver Copyright (C)
1994,1995 Troy De Jongh. Many thanks to Christoph Lameter
(clameter@fuller.edu) and Mike McLagan (mike.mclagan@linux.org) who authored
and contributed to the original document.
......@@ -342,6 +342,13 @@ M: clameter@fuller.edu
L: digiboard@list.fuller.edu
S: Maintained
DIGI INTL. EPCA DRIVER:
P: Daniel Taylor
M: support@dgii.com
M: digilnux@dgii.com
L: digiboard@list.fuller.edu
S: Maintained
RISCOM8 DRIVER:
P: Dmitry Gorodchanin
M: begemot@bgm.rosprint.net
......
......@@ -110,45 +110,24 @@ ENOSYS = 38
addl $4,%esp; \
iret
#ifdef __SMP__
/* Get the processor ID multiplied by 4 */
#if 0
#define GET_PROCESSOR_OFFSET(reg) \
movl SYMBOL_NAME(apic_reg), reg; \
movl 32(reg), reg; \
shrl $22, reg; \
andl $0x3C, reg;
#define GET_CURRENT(reg) \
GET_PROCESSOR_OFFSET(reg) \
movl SYMBOL_NAME(current_set)(reg),reg
#endif
#define GET_CURRENT(reg) \
movl %esp, reg; \
andl $-8192, reg;
#else
#define GET_CURRENT(reg) \
movl SYMBOL_NAME(current_set),reg
#endif
ENTRY(lcall7)
pushfl # We get a different stack layout with call gates,
pushl %eax # which has to be cleaned up later..
SAVE_ALL
GET_CURRENT(%ebx)
movl EIP(%esp),%eax # due to call gates, this is eflags, not eip..
movl CS(%esp),%edx # this is eip..
movl EFLAGS(%esp),%ecx # and this is cs..
movl %eax,EFLAGS(%esp) #
movl %edx,EIP(%esp) # Now we move them to their "normal" places
movl %ecx,CS(%esp) #
movl %esp,%eax
GET_CURRENT(%edx)
pushl %eax
movl exec_domain(%edx),%edx # Get the execution domain
movl %esp,%ebx
pushl %ebx
andl $-8192,%ebx # GET_CURRENT
movl exec_domain(%ebx),%edx # Get the execution domain
movl 4(%edx),%edx # Get the lcall7 handler for the domain
call *%edx
popl %eax
......@@ -159,6 +138,7 @@ ENTRY(lcall7)
ALIGN
.globl ret_from_smpfork
ret_from_smpfork:
GET_CURRENT(%ebx)
btrl $0, SYMBOL_NAME(scheduler_lock)
jmp ret_from_sys_call
#endif /* __SMP__ */
......@@ -190,7 +170,6 @@ ret_from_sys_call:
ret_with_reschedule:
cmpl $0,SYMBOL_NAME(need_resched)
jne reschedule
GET_CURRENT(%ebx)
movl blocked(%ebx),%eax
movl %eax,%esi # save blocked in %esi for signal handling
notl %eax
......@@ -235,6 +214,7 @@ ret_from_exception:
jne handle_bottom_half
ALIGN
ret_from_intr:
GET_CURRENT(%ebx)
movl EFLAGS(%esp),%eax # mix EFLAGS and CS
movb CS(%esp),%al
testl $(VM_MASK | 3),%eax # return to VM86 mode or non-supervisor?
......
......@@ -40,19 +40,20 @@ startup_32:
/*
* New page tables may be in 4Mbyte page mode and may
* be using the global pages.
*
* NOTE! We have to correct for the fact that we're
* not yet offset 0xC0000000..
*/
#define mmu_cr4_features $128+16
#define cr4_bits mmu_cr4_features-0xC0000000
#ifdef GAS_KNOWS_CR4
movl %cr4,%eax # Turn on 4Mb pages
orl mmu_cr4_features,%eax
orl cr4_bits,%eax
movl %eax,%cr4
#else
.byte 0x0f,0x20,0xe0
orl mmu_cr4_features,%eax
orl cr4_bits,%eax
.byte 0x0f,0x22,0xe0
#endif
movl %eax,%cr3 /* flush TLB as per app note */
movl %cr0,%eax
#endif
/*
* Setup paging (the tables are already set up, just switch them on)
......
......@@ -36,8 +36,6 @@ EXPORT_SYMBOL(__intel_bh_counter);
/* Networking helper routines. */
EXPORT_SYMBOL(csum_partial_copy);
EXPORT_SYMBOL(synchronize_irq);
#ifdef __SMP__
EXPORT_SYMBOL(apic_reg); /* Needed internally for the I386 inlines */
EXPORT_SYMBOL(cpu_data);
......@@ -47,6 +45,7 @@ EXPORT_SYMBOL(smp_invalidate_needed);
EXPORT_SYMBOL_NOVERS(__lock_kernel);
/* Global SMP irq stuff */
EXPORT_SYMBOL(synchronize_irq);
EXPORT_SYMBOL(global_irq_holder);
EXPORT_SYMBOL(__global_cli);
EXPORT_SYMBOL(__global_sti);
......
......@@ -44,8 +44,8 @@ extern volatile unsigned long smp_local_timer_ticks[1+NR_CPUS];
#define CR0_NE 32
static unsigned char cache_21 = 0xff;
static unsigned char cache_A1 = 0xff;
/* This contains the irq mask for both irq controllers */
static unsigned long cached_irq_mask = 0xffff;
unsigned int local_irq_count[NR_CPUS];
#ifdef __SMP__
......@@ -58,32 +58,33 @@ int __intel_bh_counter;
static unsigned int int_count[NR_CPUS][NR_IRQS] = {{0},};
#endif
static inline void mask_irq(unsigned int irq_nr)
static inline void ack_irq(int irq_nr)
{
unsigned char mask;
if (irq_nr & 8) {
outb(0x20,0xA0);
}
outb(0x20,0x20);
}
mask = 1 << (irq_nr & 7);
if (irq_nr < 8) {
cache_21 |= mask;
outb(cache_21,0x21);
static inline void set_irq_mask(int irq_nr)
{
if (irq_nr & 8) {
outb(cached_irq_mask>>8,0xA1);
} else {
cache_A1 |= mask;
outb(cache_A1,0xA1);
outb(cached_irq_mask,0x21);
}
}
static inline void mask_irq(unsigned int irq_nr)
{
set_bit(irq_nr, &cached_irq_mask);
set_irq_mask(irq_nr);
}
static inline void unmask_irq(unsigned int irq_nr)
{
unsigned char mask;
mask = ~(1 << (irq_nr & 7));
if (irq_nr < 8) {
cache_21 &= mask;
outb(cache_21,0x21);
} else {
cache_A1 &= mask;
outb(cache_A1,0xA1);
}
clear_bit(irq_nr, &cached_irq_mask);
set_irq_mask(irq_nr);
}
void disable_irq(unsigned int irq_nr)
......@@ -134,7 +135,8 @@ void enable_irq(unsigned int irq_nr)
#error make irq stub building NR_IRQS dependent and remove me.
#endif
BUILD_TIMER_IRQ(FIRST,0,0x01)
BUILD_COMMON_IRQ()
BUILD_IRQ(FIRST,0,0x01)
BUILD_IRQ(FIRST,1,0x02)
BUILD_IRQ(FIRST,2,0x04)
BUILD_IRQ(FIRST,3,0x08)
......@@ -158,10 +160,6 @@ BUILD_SMP_INTERRUPT(stop_cpu_interrupt)
BUILD_SMP_TIMER_INTERRUPT(apic_timer_interrupt)
#endif
/*
* Pointers to the low-level handlers: first the general ones, then the
* fast ones, then the bad ones.
*/
static void (*interrupt[17])(void) = {
IRQ0_interrupt, IRQ1_interrupt, IRQ2_interrupt, IRQ3_interrupt,
IRQ4_interrupt, IRQ5_interrupt, IRQ6_interrupt, IRQ7_interrupt,
......@@ -169,17 +167,6 @@ static void (*interrupt[17])(void) = {
IRQ12_interrupt, IRQ13_interrupt, IRQ14_interrupt, IRQ15_interrupt
};
static void (*bad_interrupt[16])(void) = {
bad_IRQ0_interrupt, bad_IRQ1_interrupt,
bad_IRQ2_interrupt, bad_IRQ3_interrupt,
bad_IRQ4_interrupt, bad_IRQ5_interrupt,
bad_IRQ6_interrupt, bad_IRQ7_interrupt,
bad_IRQ8_interrupt, bad_IRQ9_interrupt,
bad_IRQ10_interrupt, bad_IRQ11_interrupt,
bad_IRQ12_interrupt, bad_IRQ13_interrupt,
bad_IRQ14_interrupt, bad_IRQ15_interrupt
};
/*
* Initial irq handlers.
*/
......@@ -520,25 +507,34 @@ void __global_restore_flags(unsigned long flags)
* SMP cross-CPU interrupts have their own specific
* handlers).
*/
asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
asmlinkage void do_IRQ(struct pt_regs regs)
{
int irq = regs.orig_eax & 0xff;
struct irqaction * action;
int do_random, cpu = smp_processor_id();
int status, cpu = smp_processor_id();
irq_enter(cpu, irq);
mask_irq(irq);
ack_irq(irq);
kstat.interrupts[irq]++;
/* Return with this interrupt masked if no action */
status = 0;
action = *(irq + irq_action);
do_random = 0;
while (action) {
do_random |= action->flags;
action->handler(irq, action->dev_id, regs);
action = action->next;
if (action) {
do {
status |= action->flags;
action->handler(irq, action->dev_id, &regs);
action = action->next;
} while (action);
if (status & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
__cli();
unmask_irq(irq);
}
if (do_random & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
irq_exit(cpu, irq);
irq_exit(cpu, irq);
/*
* This should be conditional: we should really get
* a return code from the irq handler to tell us
......@@ -635,10 +631,6 @@ void free_irq(unsigned int irq, void *dev_id)
save_flags(flags);
cli();
*p = action->next;
if (!irq[irq_action]) {
mask_irq(irq);
set_intr_gate(0x20+irq,bad_interrupt[irq]);
}
restore_flags(flags);
kfree(action);
return;
......@@ -648,7 +640,7 @@ void free_irq(unsigned int irq, void *dev_id)
unsigned long probe_irq_on (void)
{
unsigned int i, irqs = 0, irqmask;
unsigned int i, irqs = 0;
unsigned long delay;
/* first, enable any unassigned irqs */
......@@ -664,19 +656,17 @@ unsigned long probe_irq_on (void)
/* about 100ms delay */;
/* now filter out any obviously spurious interrupts */
irqmask = (((unsigned int)cache_A1)<<8) | (unsigned int)cache_21;
return irqs & ~irqmask;
return irqs & ~cached_irq_mask;
}
int probe_irq_off (unsigned long irqs)
{
unsigned int i, irqmask;
unsigned int i;
irqmask = (((unsigned int)cache_A1)<<8) | (unsigned int)cache_21;
#ifdef DEBUG
printk("probe_irq_off: irqs=0x%04lx irqmask=0x%04x\n", irqs, irqmask);
printk("probe_irq_off: irqs=0x%04lx irqmask=0x%04x\n", irqs, cached_irq_mask);
#endif
irqs &= irqmask;
irqs &= cached_irq_mask;
if (!irqs)
return 0;
i = ffz(~irqs);
......@@ -699,7 +689,7 @@ __initfunc(void init_IRQ(void))
outb(LATCH >> 8 , 0x40); /* MSB */
for (i = 0; i < NR_IRQS ; i++)
set_intr_gate(0x20+i,bad_interrupt[i]);
set_intr_gate(0x20+i,interrupt[i]);
#ifdef __SMP__
/*
......
......@@ -23,10 +23,7 @@ static inline void irq_enter(int cpu, int irq)
hardirq_enter(cpu);
while (test_bit(0,&global_irq_lock)) {
if ((unsigned char) cpu == global_irq_holder) {
static int printed = 0;
if (!printed)
printk("BAD! Local interrupts enabled, global disabled\n");
printed++;
printk("BAD! Local interrupts enabled, global disabled\n");
break;
}
STUCK;
......@@ -36,7 +33,6 @@ static inline void irq_enter(int cpu, int irq)
static inline void irq_exit(int cpu, int irq)
{
__cli();
hardirq_exit(cpu);
release_irqlock(cpu);
}
......@@ -89,54 +85,6 @@ static inline void irq_exit(int cpu, int irq)
"pop %es\n\t" \
"iret"
/*
* The "inb" instructions are not needed, but seem to change the timings
* a bit - without them it seems that the harddisk driver won't work on
* all hardware. Arghh.
*/
#define ACK_FIRST(mask,nr) \
"inb $0x21,%al\n\t" \
"jmp 1f\n" \
"1:\tjmp 1f\n" \
"1:\torb $" #mask ","SYMBOL_NAME_STR(cache_21)"\n\t" \
"movb "SYMBOL_NAME_STR(cache_21)",%al\n\t" \
"outb %al,$0x21\n\t" \
"jmp 1f\n" \
"1:\tjmp 1f\n" \
"1:\tmovb $0x20,%al\n\t" \
"outb %al,$0x20\n\t"
#define ACK_SECOND(mask,nr) \
"inb $0xA1,%al\n\t" \
"jmp 1f\n" \
"1:\tjmp 1f\n" \
"1:\torb $" #mask ","SYMBOL_NAME_STR(cache_A1)"\n\t" \
"movb "SYMBOL_NAME_STR(cache_A1)",%al\n\t" \
"outb %al,$0xA1\n\t" \
"jmp 1f\n" \
"1:\tjmp 1f\n" \
"1:\tmovb $0x20,%al\n\t" \
"outb %al,$0xA0\n\t" \
"jmp 1f\n" \
"1:\tjmp 1f\n" \
"1:\toutb %al,$0x20\n\t"
#define UNBLK_FIRST(mask) \
"inb $0x21,%al\n\t" \
"jmp 1f\n" \
"1:\tjmp 1f\n" \
"1:\tandb $~(" #mask "),"SYMBOL_NAME_STR(cache_21)"\n\t" \
"movb "SYMBOL_NAME_STR(cache_21)",%al\n\t" \
"outb %al,$0x21\n\t"
#define UNBLK_SECOND(mask) \
"inb $0xA1,%al\n\t" \
"jmp 1f\n" \
"1:\tjmp 1f\n" \
"1:\tandb $~(" #mask "),"SYMBOL_NAME_STR(cache_A1)"\n\t" \
"movb "SYMBOL_NAME_STR(cache_A1)",%al\n\t" \
"outb %al,$0xA1\n\t"
#define IRQ_NAME2(nr) nr##_interrupt(void)
#define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr)
#define BAD_IRQ_NAME(nr) IRQ_NAME2(bad_IRQ##nr)
......@@ -176,45 +124,21 @@ SYMBOL_NAME_STR(x) ":\n\t" \
#endif /* __SMP__ */
#define BUILD_IRQ(chip,nr,mask) \
asmlinkage void IRQ_NAME(nr); \
asmlinkage void BAD_IRQ_NAME(nr); \
#define BUILD_COMMON_IRQ() \
__asm__( \
"\n"__ALIGN_STR"\n" \
SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \
"pushl $-"#nr"-2\n\t" \
"\n" __ALIGN_STR"\n" \
"common_interrupt:\n\t" \
SAVE_ALL \
ACK_##chip(mask,(nr&7)) \
"movl %esp,%eax\n\t" \
"pushl %eax\n\t" \
"pushl $" #nr "\n\t" \
"call "SYMBOL_NAME_STR(do_IRQ)"\n\t" \
"addl $8,%esp\n\t" \
UNBLK_##chip(mask) \
"jmp ret_from_intr\n" \
"\n"__ALIGN_STR"\n" \
SYMBOL_NAME_STR(bad_IRQ) #nr "_interrupt:\n\t" \
SAVE_MOST \
ACK_##chip(mask,(nr&7)) \
RESTORE_MOST);
"pushl $ret_from_intr\n\t" \
"jmp "SYMBOL_NAME_STR(do_IRQ));
#define BUILD_TIMER_IRQ(chip,nr,mask) \
#define BUILD_IRQ(chip,nr,mask) \
asmlinkage void IRQ_NAME(nr); \
asmlinkage void BAD_IRQ_NAME(nr); \
__asm__( \
"\n"__ALIGN_STR"\n" \
SYMBOL_NAME_STR(bad_IRQ) #nr "_interrupt:\n\t" \
SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \
"pushl $-"#nr"-2\n\t" \
SAVE_ALL \
ACK_##chip(mask,(nr&7)) \
"movl %esp,%eax\n\t" \
"pushl %eax\n\t" \
"pushl $" #nr "\n\t" \
"call "SYMBOL_NAME_STR(do_IRQ)"\n\t" \
"addl $8,%esp\n\t" \
UNBLK_##chip(mask) \
"jmp ret_from_intr\n");
"pushl $"#nr"-256\n\t" \
"jmp common_interrupt");
/*
* x86 profiling function, SMP safe. We might want to do this in
......
......@@ -678,8 +678,6 @@ __initfunc(void initialize_secondary(void))
{
struct thread_struct * p = &current->tss;
printk("current = %p, real_esp = %p, real_eip = %p\n", current, p->esp, p->eip);
printk("start_secondary = %p, cpu=%d\n", start_secondary, smp_processor_id());
/*
* We don't actually need to load the full TSS,
* just the stack pointer and the eip.
......
......@@ -19,7 +19,10 @@ if [ "$CONFIG_SERIAL_EXTENDED" = "y" ]; then
fi
bool 'Non-standard serial port support' CONFIG_SERIAL_NONSTANDARD
if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then
tristate 'Digiboard PC/Xx Support' CONFIG_DIGI
tristate 'Digiboard Intelligent Async Support' CONFIG_DIGIEPCA
if [ "$CONFIG_DIGIEPCA" = "n" ]; then
tristate 'Digiboard PC/Xx Support' CONFIG_DIGI
fi
tristate 'Cyclades async mux support' CONFIG_CYCLADES
bool 'Stallion multiport serial support' CONFIG_STALDRV
if [ "$CONFIG_STALDRV" = "y" ]; then
......
......@@ -61,6 +61,14 @@ else
endif
endif
ifeq ($(CONFIG_DIGIEPCA),y)
L_OBJS += epca.o
else
ifeq ($(CONFIG_DIGIEPCA),m)
M_OBJS += epca.o
endif
endif
ifeq ($(CONFIG_CYCLADES),y)
L_OBJS += cyclades.o
else
......
This diff is collapsed.
This diff is collapsed.
......@@ -1763,6 +1763,9 @@ __initfunc(int tty_init(void))
#ifdef CONFIG_DIGI
pcxe_init();
#endif
#ifdef CONFIG_DIGIEPCA
pc_init();
#endif
#ifdef CONFIG_RISCOM8
riscom8_init();
#endif
......
......@@ -12,7 +12,7 @@
extern __inline__ void prim_spin_lock(struct spinlock *sp)
{
int processor=hard_smp_processor_id();
int processor=smp_processor_id();
/*
* Grab the lock bit
......
/* Definitions for DigiBoard ditty(1) command. */
#if !defined(TIOCMODG)
#define TIOCMODG ('d'<<8) | 250 /* get modem ctrl state */
#define TIOCMODS ('d'<<8) | 251 /* set modem ctrl state */
#endif
#if !defined(TIOCMSET)
#define TIOCMSET ('d'<<8) | 252 /* set modem ctrl state */
#define TIOCMGET ('d'<<8) | 253 /* set modem ctrl state */
#endif
#if !defined(TIOCMBIC)
#define TIOCMBIC ('d'<<8) | 254 /* set modem ctrl state */
#define TIOCMBIS ('d'<<8) | 255 /* set modem ctrl state */
#endif
#if !defined(TIOCSDTR)
#define TIOCSDTR ('e'<<8) | 0 /* set DTR */
#define TIOCCDTR ('e'<<8) | 1 /* clear DTR */
#endif
/************************************************************************
* Ioctl command arguments for DIGI parameters.
************************************************************************/
#define DIGI_GETA ('e'<<8) | 94 /* Read params */
#define DIGI_SETA ('e'<<8) | 95 /* Set params */
#define DIGI_SETAW ('e'<<8) | 96 /* Drain & set params */
#define DIGI_SETAF ('e'<<8) | 97 /* Drain, flush & set params */
#define DIGI_GETFLOW ('e'<<8) | 99 /* Get startc/stopc flow */
/* control characters */
#define DIGI_SETFLOW ('e'<<8) | 100 /* Set startc/stopc flow */
/* control characters */
#define DIGI_GETAFLOW ('e'<<8) | 101 /* Get Aux. startc/stopc */
/* flow control chars */
#define DIGI_SETAFLOW ('e'<<8) | 102 /* Set Aux. startc/stopc */
/* flow control chars */
#define DIGI_GETINFO ('e'<<8) | 103 /* Fill in digi_info */
#define DIGI_POLLER ('e'<<8) | 104 /* Turn on/off poller */
#define DIGI_INIT ('e'<<8) | 105 /* Allow things to run. */
struct digiflow_struct
{
unsigned char startc; /* flow cntl start char */
unsigned char stopc; /* flow cntl stop char */
};
typedef struct digiflow_struct digiflow_t;
/************************************************************************
* Values for digi_flags
************************************************************************/
#define DIGI_IXON 0x0001 /* Handle IXON in the FEP */
#define DIGI_FAST 0x0002 /* Fast baud rates */
#define RTSPACE 0x0004 /* RTS input flow control */
#define CTSPACE 0x0008 /* CTS output flow control */
#define DSRPACE 0x0010 /* DSR output flow control */
#define DCDPACE 0x0020 /* DCD output flow control */
#define DTRPACE 0x0040 /* DTR input flow control */
#define DIGI_FORCEDCD 0x0100 /* Force carrier */
#define DIGI_ALTPIN 0x0200 /* Alternate RJ-45 pin config */
#define DIGI_AIXON 0x0400 /* Aux flow control in fep */
/************************************************************************
* Values for digiDload
************************************************************************/
#define NORMAL 0
#define PCI_CTL 1
#define SIZE8 0
#define SIZE16 1
#define SIZE32 2
/************************************************************************
* Structure used with ioctl commands for DIGI parameters.
************************************************************************/
struct digi_struct
{
unsigned short digi_flags; /* Flags (see above) */
};
typedef struct digi_struct digi_t;
struct digi_info
{
unsigned long board; /* Which board is this ? */
unsigned char status; /* Alive or dead */
unsigned char type; /* see epca.h */
unsigned char subtype; /* For future XEM, XR, etc ... */
unsigned short numports; /* Number of ports configured */
unsigned char *port; /* I/O Address */
unsigned char *membase; /* DPR Address */
unsigned char *version; /* For future ... */
unsigned short windowData; /* For future ... */
} ;
#define CSTART 0x400L
#define CMAX 0x800L
#define ISTART 0x800L
#define IMAX 0xC00L
#define CIN 0xD10L
#define GLOBAL 0xD10L
#define EIN 0xD18L
#define FEPSTAT 0xD20L
#define CHANSTRUCT 0x1000L
#define RXTXBUF 0x4000L
struct global_data
{
volatile ushort cin;
volatile ushort cout;
volatile ushort cstart;
volatile ushort cmax;
volatile ushort ein;
volatile ushort eout;
volatile ushort istart;
volatile ushort imax;
};
struct board_chan
{
int filler1;
int filler2;
volatile ushort tseg;
volatile ushort tin;
volatile ushort tout;
volatile ushort tmax;
volatile ushort rseg;
volatile ushort rin;
volatile ushort rout;
volatile ushort rmax;
volatile ushort tlow;
volatile ushort rlow;
volatile ushort rhigh;
volatile ushort incr;
volatile ushort etime;
volatile ushort edelay;
volatile unchar *dev;
volatile ushort iflag;
volatile ushort oflag;
volatile ushort cflag;
volatile ushort gmask;
volatile ushort col;
volatile ushort delay;
volatile ushort imask;
volatile ushort tflush;
int filler3;
int filler4;
int filler5;
int filler6;
volatile unchar num;
volatile unchar ract;
volatile unchar bstat;
volatile unchar tbusy;
volatile unchar iempty;
volatile unchar ilow;
volatile unchar idata;
volatile unchar eflag;
volatile unchar tflag;
volatile unchar rflag;
volatile unchar xmask;
volatile unchar xval;
volatile unchar mstat;
volatile unchar mchange;
volatile unchar mint;
volatile unchar lstat;
volatile unchar mtran;
volatile unchar orun;
volatile unchar startca;
volatile unchar stopca;
volatile unchar startc;
volatile unchar stopc;
volatile unchar vnext;
volatile unchar hflow;
volatile unchar fillc;
volatile unchar ochar;
volatile unchar omask;
unchar filler7;
unchar filler8[28];
};
#define SRXLWATER 0xE0
#define SRXHWATER 0xE1
#define STOUT 0xE2
#define PAUSETX 0xE3
#define RESUMETX 0xE4
#define SAUXONOFFC 0xE6
#define SENDBREAK 0xE8
#define SETMODEM 0xE9
#define SETIFLAGS 0xEA
#define SONOFFC 0xEB
#define STXLWATER 0xEC
#define PAUSERX 0xEE
#define RESUMERX 0xEF
#define SETBUFFER 0xF2
#define SETCOOKED 0xF3
#define SETHFLOW 0xF4
#define SETCTRLFLAGS 0xF5
#define SETVNEXT 0xF6
#define BREAK_IND 0x01
#define LOWTX_IND 0x02
#define EMPTYTX_IND 0x04
#define DATA_IND 0x08
#define MODEMCHG_IND 0x20
#define FEP_HUPCL 0002000
#if 0
#define RTS 0x02
#define CD 0x08
#define DSR 0x10
#define CTS 0x20
#define RI 0x40
#define DTR 0x80
#endif
/*************************************************************************
* Defines and structure definitions for PCI BIOS Interface
*************************************************************************/
#define PCIMAX 32 /* maximum number of PCI boards */
#define PCI_VENDOR_DIGI 0x114F
#define PCI_DEVICE_EPC 0x0002
#define PCI_DEVICE_RIGHTSWITCH 0x0003 /* For testing */
#define PCI_DEVICE_XEM 0x0004
#define PCI_DEVICE_XR 0x0005
#define PCI_DEVICE_CX 0x0006
#define PCI_DEVICE_XRJ 0x0009 /* Jupiter boards with */
#define PCI_DEVICE_EPCJ 0x000a /* PLX 9060 chip for PCI */
/*
* On the PCI boards, there is no IO space allocated
* The I/O registers will be in the first 3 bytes of the
* upper 2MB of the 4MB memory space. The board memory
* will be mapped into the low 2MB of the 4MB memory space
*/
/* Potential location of PCI Bios from E0000 to FFFFF*/
#define PCI_BIOS_SIZE 0x00020000
/* Size of Memory and I/O for PCI (4MB) */
#define PCI_RAM_SIZE 0x00400000
/* Size of Memory (2MB) */
#define PCI_MEM_SIZE 0x00200000
/* Offset of I/0 in Memory (2MB) */
#define PCI_IO_OFFSET 0x00200000
#define MEMOUTB(basemem, pnum, setmemval) *(caddr_t)((basemem) + ( PCI_IO_OFFSET | pnum << 4 | pnum )) = (setmemval)
#define MEMINB(basemem, pnum) *(caddr_t)((basemem) + (PCI_IO_OFFSET | pnum << 4 | pnum )) /* for PCI I/O */
#define XEMPORTS 0xC02
#define XEPORTS 0xC22
#define MAX_ALLOC 0x100
#define MAXBOARDS 12
#define FEPCODESEG 0x0200L
#define FEPCODE 0x2000L
#define BIOSCODE 0xf800L
#define MISCGLOBAL 0x0C00L
#define NPORT 0x0C22L
#define MBOX 0x0C40L
#define PORTBASE 0x0C90L
/* Begin code defines used for epca_setup */
#define INVALID_BOARD_TYPE 0x1
#define INVALID_NUM_PORTS 0x2
#define INVALID_MEM_BASE 0x4
#define INVALID_PORT_BASE 0x8
#define INVALID_BOARD_STATUS 0x10
#define INVALID_ALTPIN 0x20
/* End code defines used for epca_setup */
#define FEPCLR 0x00
#define FEPMEM 0x02
#define FEPRST 0x04
#define FEPINT 0x08
#define FEPMASK 0x0e
#define FEPWIN 0x80
#define PCXE 0
#define PCXEVE 1
#define PCXEM 2
#define EISAXEM 3
#define PC64XE 4
#define PCXI 5
#define PCIXEM 7
#define PCICX 8
#define PCIXR 9
#define PCIXRJ 10
#define EPCA_NUM_TYPES 6
static char *board_desc[] =
{
"PC/Xe",
"PC/Xeve",
"PC/Xem",
"EISA/Xem",
"PC/64Xe",
"PC/Xi",
"unknown",
"PCI/Xem",
"PCI/CX",
"PCI/Xr",
"PCI/Xrj",
};
#define STARTC 021
#define STOPC 023
#define IAIXON 0x2000
#define TXSTOPPED 0x1
#define LOWWAIT 0x2
#define EMPTYWAIT 0x4
#define RXSTOPPED 0x8
#define TXBUSY 0x10
#define DISABLED 0
#define ENABLED 1
#define OFF 0
#define ON 1
#define FEPTIMEOUT 200000
#define SERIAL_TYPE_NORMAL 1
#define SERIAL_TYPE_CALLOUT 2
#define SERIAL_TYPE_INFO 3
#define EPCA_EVENT_HANGUP 1
#define EPCA_MAGIC 0x5c6df104L
struct channel
{
long magic;
unchar boardnum;
unchar channelnum;
unchar omodem; /* FEP output modem status */
unchar imodem; /* FEP input modem status */
unchar modemfake; /* Modem values to be forced */
unchar modem; /* Force values */
unchar hflow;
unchar dsr;
unchar dcd;
unchar m_rts ; /* The bits used in whatever FEP */
unchar m_dcd ; /* is indiginous to this board to */
unchar m_dsr ; /* represent each of the physical */
unchar m_cts ; /* handshake lines */
unchar m_ri ;
unchar m_dtr ;
unchar stopc;
unchar startc;
unchar stopca;
unchar startca;
unchar fepstopc;
unchar fepstartc;
unchar fepstopca;
unchar fepstartca;
unchar txwin;
unchar rxwin;
ushort fepiflag;
ushort fepcflag;
ushort fepoflag;
ushort txbufhead;
ushort txbufsize;
ushort rxbufhead;
ushort rxbufsize;
int close_delay;
int count;
int blocked_open;
int event;
int asyncflags;
uint dev;
long session;
long pgrp;
ulong statusflags;
ulong c_iflag;
ulong c_cflag;
ulong c_lflag;
ulong c_oflag;
unchar *txptr;
unchar *rxptr;
unchar *tmp_buf;
struct board_info *board;
volatile struct board_chan *brdchan;
struct digi_struct digiext;
struct tty_struct *tty;
struct termios normal_termios;
struct termios callout_termios;
struct wait_queue *open_wait;
struct wait_queue *close_wait;
struct tq_struct tqueue;
volatile struct global_data *mailbox;
};
struct board_info
{
unchar status;
unchar type;
unchar altpin;
ushort numports;
unchar *port;
unchar *membase;
unchar *re_map_port;
unchar *re_map_membase;
ulong memory_seg;
void ( * memwinon ) (struct board_info *, unsigned int) ;
void ( * memwinoff ) (struct board_info *, unsigned int) ;
void ( * globalwinon ) (struct channel *) ;
void ( * txwinon ) (struct channel *) ;
void ( * rxwinon ) (struct channel *) ;
void ( * memoff ) (struct channel *) ;
void ( * assertgwinon ) (struct channel *) ;
void ( * assertmemoff ) (struct channel *) ;
unchar poller_inhibited ;
};
#define NUMCARDS 1
#define NBDEVS 2
struct board_info static_boards[NUMCARDS]={
{ ENABLED, 0, OFF, 2, (unchar*) 0x320, (unchar*) 0xd0000 },
};
/* DO NOT HAND EDIT THIS FILE! */
......@@ -288,6 +288,7 @@ extern int lp_init(void);
extern int pty_init(void);
extern int tty_init(void);
extern int pcxe_init(void);
extern int pc_init(void);
extern int vcs_init(void);
extern int cy_init(void);
extern int stl_init(void);
......@@ -330,11 +331,15 @@ extern int n_tty_ioctl(struct tty_struct * tty, struct file * file,
/* serial.c */
extern long serial_console_init(long kmem_start, long kmem_end);
/* pcxx.c */
extern int pcxe_open(struct tty_struct *tty, struct file *filp);
/* epca.c */
extern int pc_open(struct tty_struct *tty, struct file *filp);
/* console.c */
extern void update_screen(int new_console);
......
......@@ -175,6 +175,9 @@ extern void teles_setup(char *str, int *ints);
#ifdef CONFIG_ISDN_DRV_HISAX
extern void HiSax_setup(char *str, int *ints);
#endif
#ifdef CONFIG_DIGIEPCA
extern void epca_setup(char *str, int *ints);
#endif
#ifdef CONFIG_ISDN_DRV_PCBIT
extern void pcbit_setup(char *str, int *ints);
#endif
......@@ -481,6 +484,9 @@ struct {
#ifdef CONFIG_DIGI
{ "digi=", pcxx_setup },
#endif
#ifdef CONFIG_DIGIEPCA
{ "digiepca=", epca_setup },
#endif
#ifdef CONFIG_RISCOM8
{ "riscom8=", riscom8_setup },
#endif
......
......@@ -520,7 +520,7 @@ static void exit_notify(void)
NORET_TYPE void do_exit(long code)
{
if (in_interrupt()) {
local_irq_count[hard_smp_processor_id()] = 0; /* Not really correct */
local_irq_count[smp_processor_id()] = 0; /* Not really correct */
printk("Aiee, killing interrupt handler\n");
}
fake_volatile:
......
......@@ -28,7 +28,7 @@
#include <asm/uaccess.h>
#define LOG_BUF_LEN (8192*4)
#define LOG_BUF_LEN 8192
static char buf[1024];
......
......@@ -62,7 +62,7 @@ static inline void run_bottom_halves(void)
asmlinkage void do_bottom_half(void)
{
int cpu = hard_smp_processor_id();
int cpu = smp_processor_id();
if (hardirq_trylock(cpu)) {
if (softirq_trylock()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment