Commit 3ebce212 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.83

parent 47c1864c
......@@ -254,3 +254,35 @@ sh /dev/MAKEDEV digi
;;
par[0-2])
----- End Makedev patch
-----------------------------------------------------------------------------
Changes v1.5.5:
The ability to use the kernel's command line to pass in the configuration for
boards. Using LILO's APPEND command, a string of comma separated identifiers
or integers can be used. The 6 values in order are:
Enable/Disable this card,
Type of card: PC/Xi(0), PC/Xe(1), PC/Xeve(2), PC/Xem(3)
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),
Samples:
append="digi=E,PC/Xi,D,16,200,D0000"
append="digi=1,0,0,16,512,(whatever D0000 is in base 10 :)
Driver's minor device numbers are conserved. This means that instead of
each board getting a block of 16 minors pre-assigned, it gets however
many it should, with the next card following directly behind it. A
system with 4 2-port PC/Xi boards will use minor numbers 0-7.
This conserves some memory, and removes a few hard coded constants.
NOTE!! NOTE!! NOTE!!
The definition of PC/Xem as a valid board type is the BEGINNING of support
for this device. The driver does not currently recognise the board, nor
does it want to initialize it. At least not the EISA version.
Mike McLagan <mike.mclagan@linux.org> 5, April 1996.
......@@ -74,6 +74,7 @@ EXPORT_SYMBOL(lk_lockmsg);
/* Global SMP irq stuff */
EXPORT_SYMBOL(synchronize_irq);
EXPORT_SYMBOL(synchronize_bh);
EXPORT_SYMBOL(global_bh_count);
EXPORT_SYMBOL(global_bh_lock);
EXPORT_SYMBOL(global_irq_holder);
EXPORT_SYMBOL(__global_cli);
......
......@@ -421,7 +421,19 @@ static inline void wait_on_irq(int cpu)
{
int count = MAXCOUNT;
while (atomic_read(&global_irq_count)) {
for (;;) {
/*
* Wait until all interrupts are gone. Wait
* for bottom half handlers unless we're
* already executing in one..
*/
if (!atomic_read(&global_irq_count)) {
if (local_bh_count[cpu] || !atomic_read(&global_bh_count))
break;
}
/* Duh, we have to loop. Release the lock to avoid deadlocks */
clear_bit(0,&global_irq_lock);
for (;;) {
......@@ -437,6 +449,8 @@ static inline void wait_on_irq(int cpu)
continue;
if (global_irq_lock)
continue;
if (!local_bh_count[cpu] && atomic_read(&global_bh_count))
continue;
if (!test_and_set_bit(0,&global_irq_lock))
break;
}
......@@ -470,9 +484,11 @@ void synchronize_bh(void)
*/
void synchronize_irq(void)
{
/* Stupid approach */
cli();
sti();
if (atomic_read(&global_irq_count)) {
/* Stupid approach */
cli();
sti();
}
}
static inline void get_irqlock(int cpu)
......
......@@ -208,7 +208,7 @@ unsigned int csum_partial_copy_generic (const char *src, char *dst,
# Exception handler:
################################################
#
.section .fixup, \"a\" #
.section .fixup, \"ax\" #
#
6000: #
#
......
......@@ -2790,6 +2790,7 @@ EXPORT_SYMBOL(ide_geninit);
EXPORT_SYMBOL(ide_fops);
EXPORT_SYMBOL(ide_get_queue);
EXPORT_SYMBOL(do_ide0_request);
EXPORT_SYMBOL(ide_add_generic_settings);
#if MAX_HWIFS > 1
EXPORT_SYMBOL(do_ide1_request);
#endif /* MAX_HWIFS > 1 */
......
......@@ -34,7 +34,7 @@ else
ifeq ($(CONFIG_ISDN),m)
ifeq ($(CONFIG_ISDN_PPP),y)
CONFIG_SLHC_MODULE = y
CONFIG_PPPDEF_BUILTIN = y
CONFIG_PPPDEF_MODULE = y
endif
endif
endif
......@@ -185,8 +185,11 @@ else
endif
endif
# bsd_comp.o is *always* a module, for some undocumented reason
# (perhaps licensing).
ifeq ($(CONFIG_PPP),y)
LX_OBJS += ppp.o
M_OBJS += bsd_comp.o
CONFIG_SLHC_BUILTIN = y
CONFIG_PPPDEF_BUILTIN = y
else
......@@ -194,13 +197,10 @@ else
CONFIG_SLHC_MODULE = y
CONFIG_PPPDEF_MODULE = y
MX_OBJS += ppp.o
M_OBJS += bsd_comp.o
endif
endif
ifdef CONFIG_PPP
M_OBJS += bsd_comp.o ppp_deflate.o
endif
ifeq ($(CONFIG_SLIP),y)
L_OBJS += slip.o
ifeq ($(CONFIG_SLIP_COMPRESSED),y)
......@@ -563,9 +563,11 @@ else
endif
# if anything built-in uses ppp_deflate, then build it into the kernel also.
# If not, but a module uses it, build as a module:
# If not, but a module uses it, build as a module.
# ... NO!!! ppp_deflate.o does not work as resident;
# it works only as a module!
ifdef CONFIG_PPPDEF_BUILTIN
LX_OBJS += ppp_deflate.o
MX_OBJS += ppp_deflate.o
else
ifdef CONFIG_PPPDEF_MODULE
MX_OBJS += ppp_deflate.o
......
......@@ -117,35 +117,32 @@ static void close_dmap(int dev, struct dma_buffparms *dmap, int chan)
static unsigned int default_set_bits(int dev, unsigned int bits)
{
mm_segment_t fs = get_fs();
unsigned int r;
set_fs(get_ds());
r = audio_devs[dev]->d->ioctl(dev, SNDCTL_DSP_SETFMT, (caddr_t)&bits);
audio_devs[dev]->d->ioctl(dev, SNDCTL_DSP_SETFMT, (caddr_t)&bits);
set_fs(fs);
return r;
return bits;
}
static int default_set_speed(int dev, int speed)
{
mm_segment_t fs = get_fs();
int r;
set_fs(get_ds());
r = audio_devs[dev]->d->ioctl(dev, SNDCTL_DSP_SPEED, (caddr_t)&speed);
audio_devs[dev]->d->ioctl(dev, SNDCTL_DSP_SPEED, (caddr_t)&speed);
set_fs(fs);
return r;
return speed;
}
static short default_set_channels(int dev, short channels)
{
int c = channels;
mm_segment_t fs = get_fs();
short r;
set_fs(get_ds());
r = audio_devs[dev]->d->ioctl(dev, SNDCTL_DSP_CHANNELS, (caddr_t)&c);
audio_devs[dev]->d->ioctl(dev, SNDCTL_DSP_CHANNELS, (caddr_t)&c);
set_fs(fs);
return r;
return c;
}
static void check_driver(struct audio_driver *d)
......
......@@ -19,10 +19,12 @@
defined(CONFIG_GUSMAX) || defined(CONFIG_MSS) || \
defined(CONFIG_SSCAPE) || defined(CONFIG_TRIX) || \
defined(CONFIG_MAD16) || defined(CONFIG_CS4232) || \
defined(CONFIG_OPL3SA1) || \
defined(CONFIG_PSS_MODULE) || defined(CONFIG_GUS16_MODULE) || \
defined(CONFIG_GUSMAX_MODULE) || defined(CONFIG_MSS_MODULE) || \
defined(CONFIG_SSCAPE_MODULE) || defined(CONFIG_TRIX_MODULE) || \
defined(CONFIG_MAD16_MODULE) || defined(CONFIG_CS4232_MODULE)
defined(CONFIG_MAD16_MODULE) || defined(CONFIG_CS4232_MODULE) || \
defined(CONFIG_OPL3SA1_MODULE)
# define CONFIG_AD1848
#endif
......@@ -96,13 +98,13 @@
defined(CONFIG_MPU401) || defined(CONFIG_PSS) || \
defined(CONFIG_SSCAPE) || defined(CONFIG_TRIX) || \
defined(CONFIG_MAD16) || defined(CONFIG_CS4232) || \
defined(CONFIG_MAUI) || \
defined(CONFIG_MAUI) || defined(CONFIG_OPL3SA1) || \
defined(CONFIG_PAS_MODULE) || defined(CONFIG_SB_MODULE) || \
defined(CONFIG_ADLIB_MODULE) || defined(CONFIG_GUS_MODULE) || \
defined(CONFIG_MPU401_MODULE) || defined(CONFIG_PSS_MODULE) || \
defined(CONFIG_SSCAPE_MODULE) || defined(CONFIG_TRIX_MODULE) || \
defined(CONFIG_MAD16_MODULE) || defined(CONFIG_CS4232_MODULE) || \
defined(CONFIG_MAUI_MODULE)
defined(CONFIG_MAUI_MODULE) || defined(CONFIG_OPL3SA1_MODULE)
# define CONFIG_SEQUENCER
#endif
......
......@@ -33,9 +33,6 @@
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
#include <linux/fs.h>
#include <linux/ext2_fs.h>
static long long ext2_file_lseek(struct file *, long long, int);
static ssize_t ext2_file_write (struct file *, const char *, size_t, loff_t *);
static int ext2_release_file (struct inode *, struct file *);
......
......@@ -499,7 +499,7 @@ static struct proc_dir_entry proc_root_version = {
S_IFREG | S_IRUGO, 1, 0, 0,
0, &proc_array_inode_operations
};
#ifdef CONFIG_PCI
#ifdef CONFIG_PCI_OLD_PROC
static struct proc_dir_entry proc_root_pci = {
PROC_PCI, 3, "pci",
S_IFREG | S_IRUGO, 1, 0, 0,
......@@ -647,7 +647,7 @@ void proc_root_init(void)
proc_register(&proc_root, &proc_root_meminfo);
proc_register(&proc_root, &proc_root_kmsg);
proc_register(&proc_root, &proc_root_version);
#ifdef CONFIG_PCI
#ifdef CONFIG_PCI_OLD_PROC
proc_register(&proc_root, &proc_root_pci);
#endif
#ifdef CONFIG_ZORRO
......
......@@ -4,7 +4,6 @@
#include <linux/tasks.h>
extern unsigned int local_irq_count[NR_CPUS];
#define in_interrupt() (local_irq_count[smp_processor_id()] != 0)
#ifndef __SMP__
......@@ -47,26 +46,10 @@ static inline void hardirq_exit(int cpu)
static inline int hardirq_trylock(int cpu)
{
unsigned long flags;
__save_flags(flags);
__cli();
atomic_inc(&global_irq_count);
if (atomic_read(&global_irq_count) != 1 || test_bit(0,&global_irq_lock)) {
atomic_dec(&global_irq_count);
__restore_flags(flags);
return 0;
}
++local_irq_count[cpu];
return 1;
return !atomic_read(&global_irq_count) && !test_bit(0,&global_irq_lock);
}
static inline void hardirq_endlock(int cpu)
{
__cli();
hardirq_exit(cpu);
__sti();
}
#define hardirq_endlock(cpu) do { } while (0)
extern void synchronize_irq(void);
......
......@@ -5,7 +5,6 @@
#include <asm/hardirq.h>
extern unsigned int local_bh_count[NR_CPUS];
#define in_bh() (local_bh_count[smp_processor_id()] != 0)
#define get_active_bhs() (bh_mask & bh_active)
#define clear_active_bhs(x) atomic_clear_mask((x),&bh_active)
......@@ -54,26 +53,20 @@ static inline void end_bh_atomic(void)
/* These are for the irq's testing the lock */
static inline int softirq_trylock(int cpu)
{
unsigned long flags;
__save_flags(flags);
__cli();
atomic_inc(&global_bh_count);
if (atomic_read(&global_bh_count) != 1 || atomic_read(&global_bh_lock) != 0) {
atomic_dec(&global_bh_count);
__restore_flags(flags);
return 0;
if (!test_and_set_bit(0,&global_bh_count)) {
if (atomic_read(&global_bh_lock) == 0) {
++local_bh_count[cpu];
return 1;
}
clear_bit(0,&global_bh_count);
}
++local_bh_count[cpu];
return 1;
return 0;
}
static inline void softirq_endlock(int cpu)
{
__cli();
atomic_dec(&global_bh_count);
local_bh_count[cpu]--;
__sti();
clear_bit(0,&global_bh_count);
}
#else
......@@ -91,8 +84,8 @@ extern inline void end_bh_atomic(void)
}
/* These are for the irq's testing the lock */
#define softirq_trylock(cpu) (in_bh() ? 0 : (local_bh_count[smp_processor_id()]=1))
#define softirq_endlock(cpu) (local_bh_count[smp_processor_id()] = 0)
#define softirq_trylock(cpu) (local_bh_count[cpu] ? 0 : (local_bh_count[cpu]=1))
#define softirq_endlock(cpu) (local_bh_count[cpu] = 0)
#define synchronize_bh() do { } while (0)
#endif /* SMP */
......
......@@ -48,6 +48,12 @@ enum {
#include <asm/hardirq.h>
#include <asm/softirq.h>
/*
* Are we in an interrupt context? Either doing bottom half
* or hardware interrupt processing?
*/
#define in_interrupt() (local_irq_count[smp_processor_id()] + local_bh_count[smp_processor_id()] != 0)
/*
* Autoprobing for irqs:
*
......
......@@ -389,6 +389,8 @@ asmlinkage void schedule(void)
this_cpu = smp_processor_id();
if (local_irq_count[this_cpu])
goto scheduling_in_interrupt;
if (local_bh_count[this_cpu])
goto scheduling_in_interrupt;
release_kernel_lock(prev, this_cpu, lock_depth);
if (bh_active & bh_mask)
do_bottom_half();
......
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