Commit 5fec1cd9 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.0.20

parent 63038f25
......@@ -1559,6 +1559,7 @@ S: Germany
N: Leonard N. Zubkoff
E: lnz@dandelion.com
W: http://www.dandelion.com/Linux/
D: BusLogic SCSI driver
D: Miscellaneous kernel fixes
S: 3078 Sulphur Spring Court
......
This diff is collapsed.
......@@ -106,10 +106,10 @@ W: http://www.dgii.com/linux/
S: Maintained
APM DRIVER
P: Rik Faith & Stephen Rothwell
M: faith@cs.unc.edu, Stephen.Rothwell@canb.auug.org.au
L: linux-laptop@vger.rutgers.edu
S: Maintained
P: Rik Faith & Stephen Rothwell
M: faith@cs.unc.edu, Stephen.Rothwell@canb.auug.org.au
L: linux-laptop@vger.rutgers.edu
S: Maintained
APPLETALK NETWORK LAYER
P: Alan Cox & University Of Michigan
......@@ -166,10 +166,10 @@ L: linux-net@vger.rutgers.edu
S: Maintained
FUTURE DOMAIN TMC-16x0 SCSI DRIVER (16-bit)
P: Rik Faith
M: faith@cs.unc.edu
L: linux-scsi@vger.rutgers.edu
S: Odd fixes (e.g., new signatures)
P: Rik Faith
M: faith@cs.unc.edu
L: linux-scsi@vger.rutgers.edu
S: Odd fixes (e.g., new signatures)
SCSI TAPE DRIVER
P: Kai Mkisara
......@@ -245,10 +245,10 @@ L: linux-kernel@vger.rutgers.edu
S: Maintained
STARMODE RADIO IP (STRIP) PROTOCOL DRIVER
P: Stuart Cheshire
M: cheshire@cs.stanford.edu
W: http://mosquitonet.Stanford.EDU/strip.html
S: Maintained
P: Stuart Cheshire
M: cheshire@cs.stanford.edu
W: http://mosquitonet.Stanford.EDU/strip.html
S: Maintained
SMB FILESYSTEM:
P: Volker Lendecke
......
VERSION = 2
PATCHLEVEL = 0
SUBLEVEL = 19
SUBLEVEL = 20
ARCH = i386
......
......@@ -3,6 +3,8 @@
#include <linux/user.h>
#include <linux/elfcore.h>
#include <asm/semaphore.h>
extern void dump_thread(struct pt_regs *, struct user *);
extern int dump_fpu(elf_fpregset_t *);
......@@ -11,6 +13,8 @@ static struct symbol_table arch_symbol_table = {
/* platform dependent support */
X(dump_thread),
X(dump_fpu),
XNOVERS(down_failed),
XNOVERS(up_wakeup),
#ifdef __SMP__
X(apic_reg), /* Needed internally for the I386 inlines */
X(cpu_data),
......
......@@ -12,18 +12,14 @@
* to increment the number of waiters on the semaphore,
* call "__down()", and then eventually return to try again.
*/
.globl down_failed
ALIGN
down_failed:
ENTRY(down_failed)
pushl %eax
pushl %ecx
call SYMBOL_NAME(__down)
popl %ecx
ret
.globl up_wakeup
ALIGN
up_wakeup:
ENTRY(up_wakeup)
pushl %eax
pushl %ecx
call SYMBOL_NAME(__up)
......
......@@ -5,7 +5,7 @@
* interfaces. Requires 'dlcicfg' program to create usable
* interfaces, the initial one, 'dlci' is for IOCTL use only.
*
* Version: @(#)dlci.c 0.25 13 May 1996
* Version: @(#)dlci.c 0.30 12 Sep 1996
*
* Author: Mike McLagan <mike.mclagan@linux.org>
*
......@@ -13,14 +13,13 @@
*
* 0.15 Mike Mclagan Packet freeing, bug in kmalloc call
* DLCI_RET handling
*
* 0.20 Mike McLagan More conservative on which packets
* are returned for retry and whic are
* are dropped. If DLCI_RET_DROP is
* returned from the FRAD, the packet is
* sent back to Linux for re-transmission
*
* 0.25 Mike McLagan Converted to use SIOC IOCTL calls
* 0.30 Jim Freeman Fixed to allow IPX traffic
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -54,7 +53,7 @@
#include <net/sock.h>
static const char *devname = "dlci";
static const char *version = "DLCI driver v0.25, 13 May 1996, mike.mclagan@linux.org";
static const char *version = "DLCI driver v0.30, 12 Sep 1996, mike.mclagan@linux.org";
static struct device *open_dev[CONFIG_DLCI_COUNT];
......@@ -143,7 +142,7 @@ static int dlci_header(struct sk_buff *skb, struct device *dev,
hdr.pad = FRAD_P_PADDING;
hdr.NLPID = FRAD_P_SNAP;
memset(hdr.OUI, 0, sizeof(hdr.OUI));
hdr.PID = type;
hdr.PID = htons(type);
hlen = sizeof(hdr);
break;
}
......@@ -194,7 +193,8 @@ static void dlci_receive(struct sk_buff *skb, struct device *dev)
/* at this point, it's an EtherType frame */
header = sizeof(struct frhdr);
skb->protocol = htons(hdr->PID);
/* Already in network order ! */
skb->protocol = hdr->PID;
process = 1;
break;
......@@ -620,12 +620,6 @@ int dlci_init(struct device *dev)
for (i = 0; i < DEV_NUMBUFFS; i++)
skb_queue_head_init(&dev->buffs[i]);
if (strcmp(dev->name, devname) == 0)
{
dev->type = 0xFFFF;
dev->family = AF_UNSPEC;
}
return(0);
}
......
......@@ -5,7 +5,7 @@
*
* Global definitions for the Frame relay interface.
*
* Version: @(#)sdla.c 0.25 14 May 1996
* Version: @(#)sdla.c 0.30 12 Sep 1996
*
* Credits: Sangoma Technologies, for the use of 2 cards for an extended
* period of time.
......@@ -23,7 +23,8 @@
* non DLCI devices.
* 0.25 Mike McLagan Fixed problem with rejecting packets
* from non DLCI devices.
*
* 0.30 Mike McLagan Fixed kernel panic when used with modified
* ifconfig
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -58,7 +59,7 @@
#include <linux/sdla.h>
static const char* version = "SDLA driver v0.25, 14 May 1996, mike.mclagan@linux.org";
static const char* version = "SDLA driver v0.30, 12 Sep 1996, mike.mclagan@linux.org";
static const char* devname = "sdla";
......@@ -424,6 +425,7 @@ static int sdla_cmd(struct device *dev, int cmd, short dlci, short flags,
window = flp->type == SDLA_S508 ? SDLA_508_CMD_BUF : SDLA_502_CMD_BUF;
cmd_buf = (struct sdla_cmd *)(dev->mem_start + (window & SDLA_ADDR_MASK));
ret = 0;
len = 0;
jiffs = jiffies + HZ; /* 1 second is plenty */
save_flags(pflags);
cli();
......@@ -603,7 +605,7 @@ int sdla_deassoc(struct device *slave, struct device *master)
int sdla_dlci_conf(struct device *slave, struct device *master, int get)
{
struct frad_local *flp;
struct frad_local *dlp;
struct dlci_local *dlp;
int i;
short len, ret;
......
......@@ -51,11 +51,30 @@ extern __inline__ void atomic_sub(atomic_t i, atomic_t * v)
}
/*
* Same as above, but return true if we counted down to zero
* Same as above, but return the result value
*/
extern __inline__ int atomic_sub_and_test(atomic_t i, atomic_t * v)
extern __inline__ long atomic_add_return(atomic_t i, atomic_t * v)
{
unsigned long temp, result;
long temp, result;
__asm__ __volatile__(
"\n1:\t"
"ldl_l %0,%1\n\t"
"addl %0,%3,%0\n\t"
"bis %0,%0,%2\n\t"
"stl_c %0,%1\n\t"
"beq %0,1b\n"
"2:"
:"=&r" (temp),
"=m" (__atomic_fool_gcc(v)),
"=&r" (result)
:"Ir" (i),
"m" (__atomic_fool_gcc(v)));
return result;
}
extern __inline__ long atomic_sub_return(atomic_t i, atomic_t * v)
{
long temp, result;
__asm__ __volatile__(
"\n1:\t"
"ldl_l %0,%1\n\t"
......@@ -69,11 +88,16 @@ extern __inline__ int atomic_sub_and_test(atomic_t i, atomic_t * v)
"=&r" (result)
:"Ir" (i),
"m" (__atomic_fool_gcc(v)));
return result==0;
return result;
}
#define atomic_dec_return(v) atomic_sub_return(1,(v))
#define atomic_inc_return(v) atomic_add_return(1,(v))
#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0)
#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
#define atomic_inc(v) atomic_add(1,(v))
#define atomic_dec(v) atomic_sub(1,(v))
#define atomic_dec_and_test(v) atomic_sub_and_test(1,(v))
#endif
......@@ -59,7 +59,7 @@ struct thread_struct {
0 \
}
#define alloc_kernel_stack() get_free_page(GFP_KERNEL)
#define alloc_kernel_stack() __get_free_page(GFP_KERNEL)
#define free_kernel_stack(page) free_page((page))
#include <asm/ptrace.h>
......
......@@ -7,9 +7,11 @@
* (C) Copyright 1996 Linus Torvalds
*/
#include <asm/atomic.h>
struct semaphore {
int count;
int waiting;
atomic_t count;
atomic_t waiting;
struct wait_queue * wait;
};
......@@ -17,27 +19,25 @@ struct semaphore {
#define MUTEX_LOCKED ((struct semaphore) { 0, 0, NULL })
extern void __down(struct semaphore * sem);
extern void wake_up(struct wait_queue ** p);
extern void __up(struct semaphore * sem);
/*
* These are not yet interrupt-safe: should use ldl_l/stl_c here..
*
* See include/asm-i386/semaphore.h on how to do this correctly
* without any jumps or wakeups taken for the no-contention cases.
* This isn't quite as clever as the x86 side, but the gp register
* makes things a bit more complicated on the alpha..
*/
extern inline void down(struct semaphore * sem)
{
sem->count--;
/* "down_failed" */
if (sem->count < 0)
for (;;) {
if (atomic_dec_return(&sem->count) >= 0)
break;
__down(sem);
}
}
extern inline void up(struct semaphore * sem)
{
sem->count++;
/* "up_wakeup" */
__up(sem);
if (atomic_inc_return(&sem->count) <= 0)
__up(sem);
}
#endif
......@@ -131,7 +131,7 @@ struct thread_struct {
NULL, 0, 0, 0, 0 /* vm86_info */ \
}
#define alloc_kernel_stack() get_free_page(GFP_KERNEL)
#define alloc_kernel_stack() __get_free_page(GFP_KERNEL)
#define free_kernel_stack(page) free_page((page))
static inline void start_thread(struct pt_regs * regs, unsigned long eip, unsigned long esp)
......
#ifndef _I386_SEMAPHORE_H
#define _I386_SEMAPHORE_H
#include <linux/linkage.h>
/*
* SMP- and interrupt-safe semaphores..
*
......@@ -16,8 +18,11 @@ struct semaphore {
#define MUTEX ((struct semaphore) { 1, 0, NULL })
#define MUTEX_LOCKED ((struct semaphore) { 0, 0, NULL })
asmlinkage void down_failed(void /* special register calling convention */);
asmlinkage void up_wakeup(void /* special register calling convention */);
extern void __down(struct semaphore * sem);
extern void wake_up(struct wait_queue ** p);
extern void __up(struct semaphore * sem);
/*
* This is ugly, but we want the default case to fall through.
......@@ -34,7 +39,7 @@ extern inline void down(struct semaphore * sem)
"lock ; "
#endif
"decl %0\n\t"
"js down_failed"
"js " SYMBOL_NAME_STR(down_failed)
:/* no outputs */
:"m" (sem->count), "c" (sem)
:"ax","dx","memory");
......@@ -55,8 +60,8 @@ extern inline void up(struct semaphore * sem)
"lock ; "
#endif
"incl %0\n\t"
"jle up_wakeup\n"
"1:"
"jle " SYMBOL_NAME_STR(up_wakeup)
"\n1:"
:/* no outputs */
:"m" (sem->count), "c" (sem)
:"ax", "dx", "memory");
......
......@@ -333,6 +333,7 @@ struct symbol_table symbol_table = {
X(insert_inode_hash),
X(event),
X(__down),
X(__up),
X(securelevel),
/* all busmice */
X(add_mouse_randomness),
......
......@@ -43,7 +43,7 @@
int securelevel = 0; /* system security level */
long tick = 1000000 / HZ; /* timer interrupt period */
long tick = (1000000 + HZ/2) / HZ; /* timer interrupt period */
volatile struct timeval xtime; /* The current time */
int tickadj = 500/HZ; /* microsecs */
......@@ -64,7 +64,7 @@ long time_precision = 1; /* clock precision (us) */
long time_maxerror = MAXPHASE; /* maximum error (us) */
long time_esterror = MAXPHASE; /* estimated error (us) */
long time_phase = 0; /* phase offset (scaled us) */
long time_freq = 0; /* frequency offset (scaled ppm) */
long time_freq = ((1000000 + HZ/2) % HZ - HZ/2) << SHIFT_USEC; /* frequency offset (scaled ppm) */
long time_adj = 0; /* tick adjust (scaled 1 / HZ) */
long time_reftime = 0; /* time at last adjustment (s) */
......@@ -515,7 +515,7 @@ static inline void normalize_semaphore(struct semaphore *sem)
* critical part is the inline stuff in <asm/semaphore.h>
* where we want to avoid any extra jumps and calls.
*/
inline void __up(struct semaphore *sem)
void __up(struct semaphore *sem)
{
normalize_semaphore(sem);
wake_up(&sem->wait);
......
......@@ -108,8 +108,13 @@ static inline int try_to_swap_out(struct task_struct * tsk, struct vm_area_struc
} else {
if (page_map->count != 1)
return 0;
if (!(entry = get_swap_page()))
return 0; /* Aieee!!! Out of swap space! */
if (!(entry = get_swap_page())) {
/* Aieee!!! Out of swap space! */
int retval = -1;
if (nr_swapfiles == 0)
retval = 0;
return retval;
}
vma->vm_mm->rss--;
flush_cache_page(vma, address);
set_pte(page_table, __pte(entry));
......@@ -312,6 +317,9 @@ static int swap_out(unsigned int priority, int dma, int wait)
if (!--p->swap_cnt)
swap_task++;
switch (swap_out_process(p, dma, wait)) {
/* out of swap space? */
case -1:
return 0;
case 0:
if (p->swap_cnt)
swap_task++;
......
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