Commit 4d372877 authored by Linus Torvalds's avatar Linus Torvalds

The most noticeable part of this is that the run_task_queue fix should

cure the lockup that some people have seen.

The shmfs cleanup should be unnoticeable except to users who use SAP with
huge shared memory segments, where Christoph Rohlands work not only
makes the code much more readable, it should also make it dependable..

- Christian Jullien: smc9194: proper dev_kfree_skb_irq
- Cort Dougan: new-style PowerPC Makefiles
- Andrew Morton, Petr Vandrovec: fix run_task_queue
- Christoph Rohland: shmfs for shared memory handling
parent a64eae62
......@@ -115,18 +115,18 @@ DevFS is now in the kernel. See Documentation/filesystems/devfs/* in
the kernel source tree for all the gory details.
System V shared memory is now implemented via a virtual filesystem.
You do not have to mount it to use it as long as you can live with the
default maxima for shared memory and segments. If you wish to change
these variables, you have to mount it with the options nr_blocks
and / or nr_inodes. POSIX shared memory is also now implemented via a
virtual filesystem. If you want to use it, you'll need to mount the
filesystem. The recommended mount location is /dev/shm, and adding the
following line to /etc/fstab should take care of things:
You do not have to mount it to use it. SYSV shared memory limits are
set via /proc/sys/kernel/shm{max,all,mni}. You should mount the
filesystem under /dev/shm to be able to use POSIX shared
memory. Adding the following line to /etc/fstab should take care of
things:
none /dev/shm shm defaults 0 0
Remember to create the directory that you intend to mount shm on if
necessary.
necessary (The entry is automagically created if you use devfs). You
can set limits for the number of blocks and inodes used by the
filesystem with the mount options nr_blocks and nr_inodes.
The Logical Volume Manager (LVM) is now in the kernel. If you want to
use this, you'll need to install the necessary LVM toolset.
......
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 0
EXTRAVERSION = -test13-pre2
EXTRAVERSION = -test13-pre3
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
......
......@@ -7,14 +7,11 @@
#
# Note 2! The CFLAGS definition is now in the main makefile...
O_TARGET := 8260_io.a
O_OBJS = commproc.o uart.o
O_TARGET := 8260_io.o
ifdef CONFIG_FEC_ENET
O_OBJS += fcc_enet.o
endif
ifdef CONFIG_SCC_ENET
O_OBJS += enet.o
endif
obj-y := commproc.o uart.o
obj-$(CONFIG_FEC_ENET) += fcc_enet.o
obj-$(CONFIG_SCC_ENET) += enet.o
include $(TOPDIR)/Rules.make
......@@ -7,14 +7,11 @@
#
# Note 2! The CFLAGS definition is now in the main makefile...
O_TARGET := 8xx_io.a
O_OBJS = commproc.o uart.o
O_TARGET := 8xx_io.o
ifdef CONFIG_FEC_ENET
O_OBJS += fec.o
endif
ifdef CONFIG_SCC_ENET
O_OBJS += enet.o
endif
obj-y := commproc.o uart.o
obj-$(CONFIG_FEC_ENET) += fec.o
obj-$(CONFIG_SCC_ENET) += enet.o
include $(TOPDIR)/Rules.make
......@@ -72,12 +72,12 @@ MAKETREEBOOT = $(MAKE) -C arch/$(ARCH)/treeboot
ifdef CONFIG_8xx
SUBDIRS += arch/ppc/8xx_io
DRIVERS += arch/ppc/8xx_io/8xx_io.a
DRIVERS += arch/ppc/8xx_io/8xx_io.o
endif
ifdef CONFIG_8260
SUBDIRS += arch/ppc/8260_io
DRIVERS += arch/ppc/8260_io/8260_io.a
DRIVERS += arch/ppc/8260_io/8260_io.o
endif
ifdef CONFIG_APUS
......
......@@ -8,13 +8,10 @@
# Note 2! The CFLAGS definitions are now in the main makefile...
O_TARGET := amiga.o
O_OBJS := config.o amiints.o cia.o time.o \
bootinfo.o amisound.o chipram.o
OX_OBJS := amiga_ksyms.o
obj-y := config.o amiints.o cia.o time.o bootinfo.o amisound.o chipram.o
export-objs := amiga_ksyms.o
ifdef CONFIG_AMIGA_PCMCIA
O_OBJS := $(O_OBJS) pcmcia.o
endif
objs-$(CONFIG_AMIGA_PCMCIA) += pcmia.o
include $(TOPDIR)/Rules.make
......@@ -15,10 +15,6 @@ else
$(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $*.o
endif
O_TARGET := kernel.o
OX_OBJS := ppc_ksyms.o setup.o
ifeq ($(CONFIG_4xx),y)
KHEAD := head_4xx.o
else
......@@ -29,90 +25,52 @@ else
endif
endif
ifdef CONFIG_ALL_PPC
CONFIG_PMAC=y
CONFIG_PREP=y
CONFIG_CHRP=y
endif
O_OBJS := entry.o traps.o irq.o idle.o time.o process.o signal.o syscalls.o \
misc.o ptrace.o align.o ppc_htab.o semaphore.o bitops.o
ifdef CONFIG_POWER4
O_OBJS += xics.o
endif
ifndef CONFIG_8xx
O_OBJS += hashtable.o
endif
ifdef CONFIG_PCI
O_OBJS += pci.o pci-dma.o
endif
ifdef CONFIG_KGDB
O_OBJS += ppc-stub.o
endif
ifdef CONFIG_PMAC_PBOOK
O_OBJS += sleep.o
endif
ifdef CONFIG_SMP
O_OBJS += smp.o
endif
ifeq ($(CONFIG_4xx),y)
O_OBJS += ppc4xx_pic.o
endif
all: $(KHEAD) kernel.o
ifeq ($(CONFIG_OAK),y)
O_OBJS += oak_setup.o
endif
O_TARGET := kernel.o
export-objs := ppc_ksyms.o prep_setup.o
obj-$(CONFIG_PPC) := entry.o traps.o irq.o idle.o time.o misc.o \
process.o signal.o bitops.o ptrace.o \
ppc_htab.o semaphore.o syscalls.o \
align.o setup.o
obj-$(CONFIG_POWER4) += xics.o
obj-$(CONFIG_PCI) += pci.o pci-dma.o
obj-$(CONFIG_KGDB) += ppc-stub.o
obj-$(CONFIG_PMAC_PBOOK) += sleep.o
obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_PPC_RTAS) += error_log.o proc_rtas.o
obj-$(CONFIG_NVRAM) += pmac_nvram.o
obj-$(CONFIG_PREP_RESIDUAL) += residual.o
obj-$(CONFIG_4xx) += ppc4xx_pic.o
obj-$(CONFIG_OAK) += oak_setup.o
obj-$(CONFIG_WALNUT) += walnut_setup.o
ifeq ($(CONFIG_WALNUT),y)
O_OBJS += walnut_setup.o
ifeq ($(CONFIG_PCI),y)
O_OBJS += galaxy_pci.o
endif
obj-$(CONFIG_PCI) += galaxy_pci.o
endif
obj-$(CONFIG_8xx) += m8xx_setup.o ppc8xx_pic.o
ifeq ($(CONFIG_8xx),y)
O_OBJS += m8xx_setup.o ppc8xx_pic.o
ifndef CONFIG_MATH_EMULATION
O_OBJS += softemu8xx.o
endif
ifdef CONFIG_PCI
O_OBJS += qspan_pci.c
endif
ifdef CONFIG_MBX
O_OBJS += i8259.o
endif
endif
obj-$(CONFIG_PCI) += qspan_pci.c
else
obj-$(CONFIG_PPC) += hashtable.o
endif
obj-$(CONFIG_MATH_EMULATION) += softemu8xx.o
obj-$(CONFIG_MBX) += i8259.o
obj-$(CONFIG_APUS) += apus_setup.o
obj-$(CONFIG_ALL_PPC) += pmac_pic.o pmac_setup.o pmac_time.o prom.o \
feature.o pmac_pci.o chrp_setup.o \
chrp_time.o chrp_pci.o open_pic.o \
indirect_pci.o i8259.o prep_pci.o \
prep_time.o prep_nvram.o ppc_ksyms.o \
prep_setup.o
obj-$(CONFIG_PMAC_BACKLIGHT) += pmac_backlight.o
obj-$(CONFIG_GEMINI) += gemini_prom.o gemini_pci.o gemini_setup.o \
open_pic.o
obj-$(CONFIG_8260) += m8260_setup.o ppc8260_pic.o
ifeq ($(CONFIG_NVRAM),y)
O_OBJS += pmac_nvram.o
endif
ifeq ($(CONFIG_APUS),y)
O_OBJS += apus_setup.o
endif
ifeq ($(CONFIG_ALL_PPC),y)
O_OBJS += pmac_pic.o pmac_setup.o pmac_time.o feature.o pmac_pci.o prom.o \
chrp_setup.o chrp_time.o chrp_pci.o open_pic.o indirect_pci.o \
prep_pci.o i8259.o prep_nvram.o prep_time.o residual.o
ifeq ($(CONFIG_PMAC_BACKLIGHT),y)
O_OBJS += pmac_backlight.o
endif
OX_OBJS += prep_setup.o
endif
ifeq ($(CONFIG_GEMINI),y)
O_OBJS += gemini_prom.o gemini_pci.o gemini_setup.o open_pic.o
endif
ifeq ($(CONFIG_8260),y)
O_OBJS += m8260_setup.o ppc8260_pic.o
endif
all: $(KHEAD) kernel.o
include $(TOPDIR)/Rules.make
head.o: head.S ppc_defs.h
head_4xx.o: head_4xx.S ppc_defs.h
......@@ -137,4 +95,3 @@ checks: checks.c
$(HOSTCC) -I$(HPATH) $(HOSTCFLAGS) -D__KERNEL__ -fno-builtin -o checks checks.c
./checks
include $(TOPDIR)/Rules.make
......@@ -5,12 +5,10 @@
.S.o:
$(CC) $(AFLAGS) -c $< -o $*.o
O_TARGET = lib.o
O_OBJS = checksum.o string.o strcase.o
O_TARGET := lib.o
ifdef CONFIG_SMP
O_OBJS += locks.o
endif
obj-y := checksum.o string.o strcase.o
obj-$(CONFIG_SMP) := locks.o
include $(TOPDIR)/Rules.make
......@@ -2,19 +2,19 @@
#
#
O_TARGET := math-emu.o
O_TARGET := math-emu.o
O_OBJS := math.o fmr.o lfd.o stfd.o
obj-y := math.o fmr.o lfd.o stfd.o
ifdef CONFIG_MATH_EMULATION
O_OBJS += fabs.o fadd.o fadds.o fcmpo.o fcmpu.o fctiw.o fctiwz.o \
fdiv.o fdivs.o fmadd.o fmadds.o fmsub.o fmsubs.o \
fmul.o fmuls.o fnabs.o fneg.o fnmadd.o fnmadds.o \
fnmsub.o fnmsubs.o fres.o frsp.o frsqrte.o fsel.o \
fsqrt.o fsqrts.o fsub.o fsubs.o lfs.o \
mcrfs.o mffs.o mtfsb0.o mtfsb1.o mtfsf.o mtfsfi.o \
stfiwx.o stfs.o udivmodti4.o types.o
endif
obj-$(CONFIG_MATH_EMULATION) += fabs.o fadd.o fadds.o fcmpo.o fcmpu.o \
fctiw.o fctiwz.o fdiv.o fdivs.o \
fmadd.o fmadds.o fmsub.o fmsubs.o \
fmul.o fmuls.o fnabs.o fneg.o types.o \
fnmadd.o fnmadds.o fnmsub.o fnmsubs.o \
fres.o frsp.o frsqrte.o fsel.o lfs.o \
fsqrt.o fsqrts.o fsub.o fsubs.o \
mcrfs.o mffs.o mtfsb0.o mtfsb1.o \
mtfsf.o mtfsfi.o stfiwx.o stfs.o \
udivmodti4.o
include $(TOPDIR)/Rules.make
......@@ -7,11 +7,9 @@
#
# Note 2! The CFLAGS definition is now in the main makefile...
O_TARGET := mm.o
O_OBJS = fault.o init.o mem_pieces.o extable.o
O_TARGET := mm.o
obj-y := fault.o init.o mem_pieces.o extable.o
ifeq ($(CONFIG_4xx),y)
O_OBJS += 4xx_tlb.o
endif
obj-$(CONFIG_4xx) += 4xx_tlb.o
include $(TOPDIR)/Rules.make
# Makefile for xmon
O_TARGET = x.o
O_TARGET := x.o
ifeq ($(CONFIG_8xx),y)
O_OBJS = start_8xx.o xmon.o ppc-dis.o ppc-opc.o subr_prf.o setjmp.o
obj-y := start_8xx.o xmon.o ppc-dis.o ppc-opc.o subr_prf.o setjmp.o
else
O_OBJS = start.o xmon.o ppc-dis.o ppc-opc.o subr_prf.o setjmp.o
obj-y := start.o xmon.o ppc-dis.o ppc-opc.o subr_prf.o setjmp.o
endif
include $(TOPDIR)/Rules.make
......@@ -438,7 +438,7 @@ static ssize_t read_zero(struct file * file, char * buf,
static int mmap_zero(struct file * file, struct vm_area_struct * vma)
{
if (vma->vm_flags & VM_SHARED)
return map_zero_setup(vma);
return shmem_zero_setup(vma);
if (zeromap_page_range(vma->vm_start, vma->vm_end - vma->vm_start, vma->vm_page_prot))
return -EAGAIN;
return 0;
......
......@@ -95,7 +95,7 @@ if [ "$CONFIG_ISDN_DRV_EICON" != "n" ]; then
dep_bool ' Eicon PCI DIVA Server BRI/PRI/4BRI support' CONFIG_ISDN_DRV_EICON_PCI $CONFIG_PCI
bool ' Eicon S,SX,SCOM,Quadro,S2M support' CONFIG_ISDN_DRV_EICON_ISA
fi
dep_tristate ' Build Eicon driver type standalone' CONFIG_ISDN_DRV_EICON_DIVAS
tristate ' Build Eicon driver type standalone' CONFIG_ISDN_DRV_EICON_DIVAS
fi
# CAPI subsystem
......
......@@ -2,7 +2,7 @@
# The target object and module list name.
O_TARGET := sc_drv
O_TARGET := sc_drv.o
# Objects that export symbols.
......
......@@ -8,6 +8,8 @@ obj-m :=
obj-n :=
obj- :=
mod-subdirs := wan
O_TARGET := net.o
# All of the (potential) objects that export symbols.
......
......@@ -50,10 +50,11 @@
. 04/14/00 Heiko Pruessing (SMA Regelsysteme) Fixed bug in chip memory
. allocation
. 08/20/00 Arnaldo Melo fix kfree(skb) in smc_hardware_send_packet
. 12/15/00 Christian Jullien fix "Warning: kfree_skb on hard IRQ"
----------------------------------------------------------------------------*/
static const char *version =
"smc9194.c:v0.13 04/14/00 by Erik Stahlman (erik@vt.edu)\n";
"smc9194.c:v0.14 12/15/00 by Erik Stahlman (erik@vt.edu)\n";
#include <linux/module.h>
#include <linux/version.h>
......@@ -615,7 +616,7 @@ static void smc_hardware_send_packet( struct net_device * dev )
if ( packet_no & 0x80 ) {
/* or isn't there? BAD CHIP! */
printk(KERN_DEBUG CARDNAME": Memory allocation failed. \n");
dev_kfree_skb(skb);
dev_kfree_skb_irq(skb);
lp->saved_skb = NULL;
netif_wake_queue(dev);
return;
......@@ -678,7 +679,7 @@ static void smc_hardware_send_packet( struct net_device * dev )
PRINTK2((CARDNAME": Sent packet of length %d \n",length));
lp->saved_skb = NULL;
dev_kfree_skb (skb);
dev_kfree_skb_irq (skb);
dev->trans_start = jiffies;
......
......@@ -1693,6 +1693,9 @@ int block_read_full_page(struct page *page, get_block_t *get_block)
set_bit(BH_Uptodate, &bh->b_state);
continue;
}
/* get_block() might have updated the buffer synchronously */
if (buffer_uptodate(bh))
continue;
}
arr[nr] = bh;
......
......@@ -312,7 +312,6 @@ lockd_down(void)
#ifdef MODULE
/* New module support in 2.1.18 */
EXPORT_NO_SYMBOLS;
MODULE_AUTHOR("Olaf Kirch <okir@monad.swb.de>");
MODULE_DESCRIPTION("NFS file locking service version " LOCKD_VERSION ".");
MODULE_PARM(nlm_grace_period, "10-240l");
......
......@@ -963,8 +963,10 @@ static void __exit exit_ntfs_fs(void)
EXPORT_NO_SYMBOLS;
MODULE_AUTHOR("Martin von Lwis");
MODULE_DESCRIPTION("NTFS driver");
#ifdef DEBUG
MODULE_PARM(ntdebug, "i");
MODULE_PARM_DESC(ntdebug, "Debug level");
#endif
module_init(init_ntfs_fs)
module_exit(exit_ntfs_fs)
......
torvalds@penguin
\ No newline at end of file
......@@ -283,6 +283,7 @@ extern void set_bh_page(struct buffer_head *bh, struct page *page, unsigned long
#include <linux/efs_fs_i.h>
#include <linux/coda_fs_i.h>
#include <linux/romfs_fs_i.h>
#include <linux/shmem_fs.h>
#include <linux/smb_fs_i.h>
#include <linux/hfs_fs_i.h>
#include <linux/adfs_fs_i.h>
......@@ -441,6 +442,7 @@ struct inode {
struct ufs_inode_info ufs_i;
struct efs_inode_info efs_i;
struct romfs_inode_info romfs_i;
struct shmem_inode_info shmem_i;
struct coda_inode_info coda_i;
struct smb_inode_info smbfs_i;
struct hfs_inode_info hfs_i;
......@@ -685,6 +687,7 @@ struct super_block {
struct affs_sb_info affs_sb;
struct ufs_sb_info ufs_sb;
struct efs_sb_info efs_sb;
struct shmem_sb_info shmem_sb;
struct romfs_sb_info romfs_sb;
struct smb_sb_info smbfs_sb;
struct hfs_sb_info hfs_sb;
......
......@@ -128,15 +128,6 @@ struct vm_operations_struct {
int (*swapout)(struct page *, struct file *);
};
/*
* A swap entry has to fit into a "unsigned long", as
* the entry is hidden in the "index" field of the
* swapper address space.
*/
typedef struct {
unsigned long val;
} swp_entry_t;
/*
* Try to keep the most commonly accessed fields in single cache lines
* here (16 bytes or greater). This ordering should be particularly
......@@ -390,7 +381,10 @@ extern void show_free_areas_node(pg_data_t *pgdat);
extern void clear_page_tables(struct mm_struct *, unsigned long, int);
extern int map_zero_setup(struct vm_area_struct *);
int shmem_swapout(struct page * page, struct file *file);
struct page * shmem_nopage(struct vm_area_struct * vma, unsigned long address, int no_share);
struct file *shmem_file_setup(char * name, loff_t size);
extern int shmem_zero_setup(struct vm_area_struct *);
extern void zap_page_range(struct mm_struct *mm, unsigned long address, unsigned long size);
extern int copy_page_range(struct mm_struct *dst, struct mm_struct *src, struct vm_area_struct *vma);
......
......@@ -67,6 +67,8 @@ extern inline unsigned long _page_hashfn(struct address_space * mapping, unsigne
#define page_hash(mapping,index) (page_hash_table+_page_hashfn(mapping,index))
extern struct page * __find_get_page(struct address_space *mapping,
unsigned long offset, struct page **hash);
extern struct page * __find_lock_page (struct address_space * mapping,
unsigned long index, struct page **hash);
extern void lock_page(struct page *page);
......
#ifndef __SHMEM_FS_H
#define __SHMEM_FS_H
/* inode in-kernel data */
#define SHMEM_NR_DIRECT 16
/*
* A swap entry has to fit into a "unsigned long", as
* the entry is hidden in the "index" field of the
* swapper address space.
*
* We have to move it here, since not every user of fs.h is including
* mm.h, but m.h is including fs.h via sched .h :-/
*/
typedef struct {
unsigned long val;
} swp_entry_t;
struct shmem_inode_info {
spinlock_t lock;
swp_entry_t i_direct[SHMEM_NR_DIRECT]; /* for the first blocks */
swp_entry_t **i_indirect; /* doubly indirect blocks */
unsigned long swapped;
int locked; /* into memory */
struct list_head list;
};
struct shmem_sb_info {
unsigned long max_blocks; /* How many blocks are allowed */
unsigned long free_blocks; /* How many are left for allocation */
unsigned long max_inodes; /* How many inodes are allowed */
unsigned long free_inodes; /* How many are left for allocation */
spinlock_t stat_lock;
};
#endif
......@@ -291,6 +291,8 @@ extern spinlock_t swaplock;
#define swap_device_lock(p) spin_lock(&p->sdev_lock)
#define swap_device_unlock(p) spin_unlock(&p->sdev_lock)
extern void shmem_unuse(swp_entry_t entry, struct page *page);
#endif /* __KERNEL__*/
#endif /* _LINUX_SWAP_H */
......@@ -53,22 +53,22 @@ extern task_queue tq_timer, tq_immediate, tq_disk;
* To implement your own list of active bottom halfs, use the following
* two definitions:
*
* DECLARE_TASK_QUEUE(my_bh);
* struct tq_struct run_my_bh = {
* routine: (void (*)(void *)) run_task_queue,
* data: &my_bh
* DECLARE_TASK_QUEUE(my_tqueue);
* struct tq_struct my_task = {
* routine: (void (*)(void *)) my_routine,
* data: &my_data
* };
*
* To activate a bottom half on your list, use:
* To activate a bottom half on a list, use:
*
* queue_task(tq_pointer, &my_bh);
* queue_task(&my_task, &my_tqueue);
*
* To run the bottom halfs on your list put them on the immediate list by:
* To later run the queued tasks use
*
* queue_task(&run_my_bh, &tq_immediate);
* run_task_queue(&my_tqueue);
*
* This allows you to do deferred procession. For example, you could
* have a bottom half list tq_timer, which is marked active by the timer
* This allows you to do deferred processing. For example, you could
* have a task queue called tq_timer, which is executed within the timer
* interrupt.
*/
......@@ -78,8 +78,7 @@ extern spinlock_t tqueue_lock;
* Queue a task on a tq. Return non-zero if it was successfully
* added.
*/
static inline int queue_task(struct tq_struct *bh_pointer,
task_queue *bh_list)
static inline int queue_task(struct tq_struct *bh_pointer, task_queue *bh_list)
{
int ret = 0;
if (!test_and_set_bit(0,&bh_pointer->sync)) {
......@@ -95,32 +94,13 @@ static inline int queue_task(struct tq_struct *bh_pointer,
/*
* Call all "bottom halfs" on a given list.
*/
static inline void run_task_queue(task_queue *list)
{
while (!list_empty(list)) {
unsigned long flags;
struct list_head *next;
spin_lock_irqsave(&tqueue_lock, flags);
next = list->next;
if (next != list) {
void *arg;
void (*f) (void *);
struct tq_struct *p;
list_del(next);
p = list_entry(next, struct tq_struct, list);
arg = p->data;
f = p->routine;
p->sync = 0;
spin_unlock_irqrestore(&tqueue_lock, flags);
extern void __run_task_queue(task_queue *list);
if (f)
f(arg);
continue;
}
spin_unlock_irqrestore(&tqueue_lock, flags);
}
static inline void run_task_queue(task_queue *list)
{
if (TQ_ACTIVE(*list))
__run_task_queue(list);
}
#endif /* _LINUX_TQUEUE_H */
This diff is collapsed.
......@@ -345,11 +345,6 @@ void sem_exit (void)
return;
}
int shm_swap (int prio, int gfp_mask)
{
return 0;
}
asmlinkage long sys_semget (key_t key, int nsems, int semflg)
{
return -ENOSYS;
......@@ -406,13 +401,4 @@ asmlinkage long sys_shmctl (int shmid, int cmd, struct shmid_ds *buf)
return -ENOSYS;
}
void shm_unuse(swp_entry_t entry, struct page *page)
{
}
int map_zero_setup(struct vm_area_struct *vma)
{
return -EINVAL;
}
#endif /* CONFIG_SYSVIPC */
......@@ -524,6 +524,7 @@ EXPORT_SYMBOL(init_bh);
EXPORT_SYMBOL(remove_bh);
EXPORT_SYMBOL(tasklet_init);
EXPORT_SYMBOL(tasklet_kill);
EXPORT_SYMBOL(__run_task_queue);
/* init task, for moving kthread roots - ought to export a function ?? */
......
......@@ -15,6 +15,7 @@
#include <linux/interrupt.h>
#include <linux/smp_lock.h>
#include <linux/init.h>
#include <linux/tqueue.h>
/*
- No shared variables, all the data are CPU local.
......@@ -288,4 +289,28 @@ void __init softirq_init()
open_softirq(HI_SOFTIRQ, tasklet_hi_action, NULL);
}
void __run_task_queue(task_queue *list)
{
struct list_head head, *next;
unsigned long flags;
spin_lock_irqsave(&tqueue_lock, flags);
list_add(&head, list);
list_del_init(list);
spin_unlock_irqrestore(&tqueue_lock, flags);
next = head.next;
while (next != &head) {
void (*f) (void *);
struct tq_struct *p;
p = list_entry(next, struct tq_struct, list);
next = next->next;
/* Debug: force an oops from people who delete entries */
next->prev->next = next->prev->prev = 0;
f = p->routine;
p->sync = 0;
if (f)
f(p->data);
}
}
......@@ -63,6 +63,8 @@ extern int sg_big_buff;
#endif
#ifdef CONFIG_SYSVIPC
extern size_t shm_ctlmax;
extern size_t shm_ctlall;
extern int shm_ctlmni;
extern int msg_ctlmax;
extern int msg_ctlmnb;
extern int msg_ctlmni;
......@@ -208,6 +210,10 @@ static ctl_table kern_table[] = {
#ifdef CONFIG_SYSVIPC
{KERN_SHMMAX, "shmmax", &shm_ctlmax, sizeof (size_t),
0644, NULL, &proc_doulongvec_minmax},
{KERN_SHMALL, "shmall", &shm_ctlall, sizeof (size_t),
0644, NULL, &proc_doulongvec_minmax},
{KERN_SHMMNI, "shmmni", &shm_ctlmni, sizeof (int),
0644, NULL, &proc_dointvec},
{KERN_MSGMAX, "msgmax", &msg_ctlmax, sizeof (int),
0644, NULL, &proc_dointvec},
{KERN_MSGMNI, "msgmni", &msg_ctlmni, sizeof (int),
......
......@@ -11,7 +11,8 @@ O_TARGET := mm.o
obj-y := memory.o mmap.o filemap.o mprotect.o mlock.o mremap.o \
vmalloc.o slab.o bootmem.o swap.o vmscan.o page_io.o \
page_alloc.o swap_state.o swapfile.o numa.o oom_kill.o
page_alloc.o swap_state.o swapfile.o numa.o oom_kill.o \
shmem.o
obj-$(CONFIG_HIGHMEM) += highmem.o
......
......@@ -542,8 +542,8 @@ void lock_page(struct page *page)
* a rather lightweight function, finding and getting a reference to a
* hashed page atomically, waiting for it if it's locked.
*/
static struct page * __find_get_page(struct address_space *mapping,
unsigned long offset, struct page **hash)
struct page * __find_get_page(struct address_space *mapping,
unsigned long offset, struct page **hash)
{
struct page *page;
......
......@@ -333,7 +333,7 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr, unsigned lon
if (error)
goto unmap_and_free_vma;
} else if (flags & MAP_SHARED) {
error = map_zero_setup(vma);
error = shmem_zero_setup(vma);
if (error)
goto free_vma;
}
......
This diff is collapsed.
......@@ -375,7 +375,7 @@ static int try_to_unuse(unsigned int type)
for_each_task(p)
unuse_process(p->mm, entry, page);
read_unlock(&tasklist_lock);
shm_unuse(entry, page);
shmem_unuse(entry, page);
/* Now get rid of the extra reference to the temporary
page we've been using. */
page_cache_release(page);
......
......@@ -603,6 +603,8 @@ int page_launder(int gfp_mask, int sync)
*/
if (PageDirty(page)) {
int (*writepage)(struct page *) = page->mapping->a_ops->writepage;
int result;
if (!writepage)
goto page_active;
......@@ -619,12 +621,16 @@ int page_launder(int gfp_mask, int sync)
page_cache_get(page);
spin_unlock(&pagemap_lru_lock);
writepage(page);
result = writepage(page);
page_cache_release(page);
/* And re-start the thing.. */
spin_lock(&pagemap_lru_lock);
continue;
if (result != 1)
continue;
/* writepage refused to do anything */
SetPageDirty(page);
goto page_active;
}
/*
......
......@@ -14,15 +14,38 @@ export-objs = ip_conntrack_standalone.o ip_conntrack_ftp.o ip_fw_compat.o ip_nat
# Multipart objects.
list-multi := ip_conntrack.o iptable_nat.o ipfwadm.o ipchains.o
ip_conntrack-objs := ip_conntrack_standalone.o ip_conntrack_core.o ip_conntrack_proto_generic.o ip_conntrack_proto_tcp.o ip_conntrack_proto_udp.o ip_conntrack_proto_icmp.o
iptable_nat-objs := ip_nat_standalone.o ip_nat_rule.o ip_nat_core.o ip_nat_proto_unknown.o ip_nat_proto_tcp.o ip_nat_proto_udp.o ip_nat_proto_icmp.o
ip_nf_compat-objs := ipfwadm_core.o ip_fw_compat.o ip_fw_compat_redir.o ip_fw_compat_masq.o $(ip_conntrack-objs) $(iptable_nat-objs)
ipfwadm-objs := ipfwadm_core.o
ipchains-objs := ipchains_core.o
# objects for the conntrack and NAT core (used by standalone and backw. compat)
ip_nf_conntrack-objs := ip_conntrack_core.o ip_conntrack_proto_generic.o ip_conntrack_proto_tcp.o ip_conntrack_proto_udp.o ip_conntrack_proto_icmp.o
ip_nf_nat-objs := ip_nat_core.o ip_nat_proto_unknown.o ip_nat_proto_tcp.o ip_nat_proto_udp.o ip_nat_proto_icmp.o
# objects for the standalone - connection tracking / NAT
ip_conntrack-objs := ip_conntrack_standalone.o $(ip_nf_conntrack-objs)
iptable_nat-objs := ip_nat_standalone.o ip_nat_rule.o $(ip_nf_nat-objs)
# objects for backwards compatibility mode
ip_nf_compat-objs := ip_fw_compat.o ip_fw_compat_redir.o ip_fw_compat_masq.o $(ip_nf_conntrack-objs) $(ip_nf_nat-objs)
ipfwadm-objs := $(ip_nf_compat-objs) ipfwadm_core.o
ipchains-objs := $(ip_nf_compat-objs) ipchains_core.o
# connection tracking
obj-$(CONFIG_IP_NF_CONNTRACK) += ip_conntrack.o
# connection tracking helpers
obj-$(CONFIG_IP_NF_FTP) += ip_conntrack_ftp.o
# NAT helpers
obj-$(CONFIG_IP_NF_FTP) += ip_nat_ftp.o
# generic IP tables
obj-$(CONFIG_IP_NF_IPTABLES) += ip_tables.o
# the three instances of ip_tables
obj-$(CONFIG_IP_NF_FILTER) += iptable_filter.o
obj-$(CONFIG_IP_NF_MANGLE) += iptable_mangle.o
obj-$(CONFIG_IP_NF_NAT) += iptable_nat.o
# matches
obj-$(CONFIG_IP_NF_MATCH_LIMIT) += ipt_limit.o
obj-$(CONFIG_IP_NF_MATCH_MARK) += ipt_mark.o
obj-$(CONFIG_IP_NF_MATCH_MAC) += ipt_mac.o
......@@ -31,11 +54,8 @@ obj-$(CONFIG_IP_NF_MATCH_OWNER) += ipt_owner.o
obj-$(CONFIG_IP_NF_MATCH_TOS) += ipt_tos.o
obj-$(CONFIG_IP_NF_MATCH_STATE) += ipt_state.o
obj-$(CONFIG_IP_NF_MATCH_UNCLEAN) += ipt_unclean.o
obj-$(CONFIG_IP_NF_NAT) += iptable_nat.o
obj-$(CONFIG_IP_NF_FTP) += ip_nat_ftp.o
obj-$(CONFIG_IP_NF_FILTER) += iptable_filter.o
obj-$(CONFIG_IP_NF_MANGLE) += iptable_mangle.o
# targets
obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o
obj-$(CONFIG_IP_NF_TARGET_MIRROR) += ipt_MIRROR.o
obj-$(CONFIG_IP_NF_TARGET_TOS) += ipt_TOS.o
......@@ -44,8 +64,10 @@ obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o
obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o
obj-$(CONFIG_IP_NF_TARGET_LOG) += ipt_LOG.o
obj-$(CONFIG_IP_NF_COMPAT_IPCHAINS) += ipchains.o ip_nf_compat.o
obj-$(CONFIG_IP_NF_COMPAT_IPFWADM) += ipfwadm.o ip_nf_compat.o
# backwards compatibility
obj-$(CONFIG_IP_NF_COMPAT_IPCHAINS) += ipchains.o
obj-$(CONFIG_IP_NF_COMPAT_IPFWADM) += ipfwadm.o
obj-$(CONFIG_IP_NF_QUEUE) += ip_queue.o
include $(TOPDIR)/Rules.make
......@@ -61,6 +83,3 @@ ipfwadm.o: $(ipfwadm-objs)
ipchains.o: $(ipchains-objs)
$(LD) -r -o $@ $(ipchains-objs)
ip_nf_compat.o: $(ip_nf_compat-objs)
$(LD) -r -o $@ $(ip_nf_compat-objs)
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