Commit d083e12c authored by Linus Torvalds's avatar Linus Torvalds

Merge http://jdike.stearns.org/updates-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 2d5fe0e0 4768bcb3
......@@ -30,16 +30,11 @@ PROFILE += -pg -DPROFILING
LINK_PROFILE = $(PROFILE) -Wl,--wrap,__monstartup
endif
ARCH_SUBDIRS = $(ARCH_DIR)/drivers $(ARCH_DIR)/kernel \
$(ARCH_DIR)/sys-$(SUBARCH) $(ARCH_DIR)/os-$(OS)
SUBDIRS += $(ARCH_SUBDIRS)
core-y += $(ARCH_DIR)/kernel/ \
$(ARCH_DIR)/drivers/ \
$(ARCH_DIR)/sys-$(SUBARCH)/
libs-$(CONFIG_PT_PROXY) += $(ARCH_DIR)/ptproxy/
core-$(CONFIG_PT_PROXY) += $(ARCH_DIR)/ptproxy/
ARCH_INCLUDE = $(TOPDIR)/$(ARCH_DIR)/include
......
......@@ -56,8 +56,9 @@ obj-y += stdio_console.o $(CHAN_OBJS)
USER_SINGLE_OBJS = $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs))
USER_OBJS = $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS)) fd.o \
USER_OBJS := $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS)) fd.o \
null.o pty.o tty.o xterm.o
USER_OBJS := $(foreach file,$(USER_OBJS),arch/um/drivers/$(file))
include $(TOPDIR)/Rules.make
......
......@@ -395,7 +395,7 @@ int chan_out_fd(struct list_head *chans)
return(-1);
}
void chan_interrupt(struct list_head *chans, struct tq_struct *task,
void chan_interrupt(struct list_head *chans, struct work_struct *task,
struct tty_struct *tty, int irq, void *dev)
{
struct list_head *ele, *next;
......@@ -409,7 +409,7 @@ void chan_interrupt(struct list_head *chans, struct tq_struct *task,
do {
if((tty != NULL) &&
(tty->flip.count >= TTY_FLIPBUF_SIZE)){
queue_task(task, &tq_timer);
schedule_work(task);
goto out;
}
err = chan->ops->read(chan->fd, &c, chan->data);
......
......@@ -215,7 +215,7 @@ int line_open(struct line *lines, struct tty_struct *tty,
if(err) goto out;
}
enable_chan(&line->chan_list, line);
INIT_TQUEUE(&line->task, line_timer_cb, line);
INIT_WORK(&line->task, line_timer_cb, line);
}
if(!line->sigio){
......
......@@ -13,7 +13,7 @@
#include "linux/ctype.h"
#include "linux/interrupt.h"
#include "linux/sysrq.h"
#include "linux/tqueue.h"
#include "linux/workqueue.h"
#include "linux/module.h"
#include "linux/proc_fs.h"
#include "asm/irq.h"
......@@ -42,7 +42,7 @@ static struct notifier_block reboot_notifier = {
LIST_HEAD(mc_requests);
void mc_task_proc(void *unused)
void mc_work_proc(void *unused)
{
struct mconsole_entry *req;
unsigned long flags;
......@@ -60,10 +60,7 @@ void mc_task_proc(void *unused)
} while(!done);
}
struct tq_struct mconsole_task = {
routine: mc_task_proc,
data: NULL
};
DECLARE_WORK(mconsole_work, mc_work_proc, NULL);
void mconsole_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
......@@ -84,7 +81,7 @@ void mconsole_interrupt(int irq, void *dev_id, struct pt_regs *regs)
}
}
}
if(!list_empty(&mc_requests)) schedule_task(&mconsole_task);
if(!list_empty(&mc_requests)) schedule_work(&mconsole_work);
reactivate_fd(fd, MCONSOLE_IRQ);
}
......
......@@ -56,10 +56,10 @@ static int ubd_revalidate(kdev_t rdev);
#define DEVICE_NR(n) (minor(n) >> UBD_SHIFT)
static struct block_device_operations ubd_blops = {
open: ubd_open,
release: ubd_release,
ioctl: ubd_ioctl,
revalidate: ubd_revalidate,
.open = ubd_open,
.release = ubd_release,
.ioctl = ubd_ioctl,
.revalidate = ubd_revalidate,
};
static request_queue_t *ubd_queue;
......@@ -69,9 +69,9 @@ static struct gendisk *ubd_gendisk[MAX_DEV];
static struct gendisk *fake_gendisk[MAX_DEV];
#ifdef CONFIG_BLK_DEV_UBD_SYNC
#define OPEN_FLAGS ((struct openflags) { r : 1, w : 1, s : 1, c : 0 })
#define OPEN_FLAGS ((struct openflags) { .r = 1, .w = 1, .s = 1, .c = 0 })
#else
#define OPEN_FLAGS ((struct openflags) { r : 1, w : 1, s : 0, c : 0 })
#define OPEN_FLAGS ((struct openflags) { .r = 1, .w = 1, .s = 0, .c = 0 })
#endif
static struct openflags global_openflags = OPEN_FLAGS;
......@@ -99,24 +99,24 @@ struct ubd {
};
#define DEFAULT_COW { \
file: NULL, \
fd: -1, \
bitmap: NULL, \
bitmap_offset: 0, \
data_offset: 0, \
.file = NULL, \
.fd = -1, \
.bitmap = NULL, \
.bitmap_offset = 0, \
.data_offset = 0, \
}
#define DEFAULT_UBD { \
file: NULL, \
is_dir: 0, \
count: 0, \
fd: -1, \
size: -1, \
boot_openflags: OPEN_FLAGS, \
openflags: OPEN_FLAGS, \
real: NULL, \
fake: NULL, \
cow: DEFAULT_COW, \
.file = NULL, \
.is_dir = 0, \
.count = 0, \
.fd = -1, \
.size = -1, \
.boot_openflags = OPEN_FLAGS, \
.openflags = OPEN_FLAGS, \
.real = NULL, \
.fake = NULL, \
.cow = DEFAULT_COW, \
}
struct ubd ubd_dev[MAX_DEV] = { [ 0 ... MAX_DEV - 1 ] = DEFAULT_UBD };
......@@ -131,9 +131,9 @@ static int ubd0_init(void)
__initcall(ubd0_init);
static struct hd_driveid ubd_id = {
cyls: 0,
heads: 128,
sectors: 32,
.cyls = 0,
.heads = 128,
.sectors = 32,
};
static int fake_ide = 0;
......@@ -199,7 +199,7 @@ static int ubd_setup_common(char *str, int *index_out)
{
struct openflags flags = global_openflags;
char *backing_file;
int i, n;
int n;
if(index_out) *index_out = -1;
n = *str++;
......@@ -398,7 +398,7 @@ static int ubd_add(int n)
devfs_handle_t real, fake;
char name[sizeof("nnnnnn\0")];
struct ubd *dev = &ubd_dev[n];
struct gendisk *disk, *fake_disk;
struct gendisk *disk, *fake_disk = NULL;
u64 size;
if (!dev->file)
......@@ -410,7 +410,7 @@ static int ubd_add(int n)
disk->major = MAJOR_NR;
disk->first_minor = n << UBD_SHIFT;
disk->minor_shift = UBD_SHIFT;
disk->fops = &ubd_fops;
disk->fops = &ubd_blops;
if (fakehd_set)
sprintf(disk->disk_name, "hd%c", n + 'a');
else
......@@ -425,7 +425,7 @@ static int ubd_add(int n)
fake_disk->major = fake_major;
fake_disk->first_minor = n << UBD_SHIFT;
fake_disk->minor_shift = UBD_SHIFT;
fake_disk->fops = &ubd_fops;
fake_disk->fops = &ubd_blops;
sprintf(fake_disk->disk_name, "ubd%d", n);
fake_gendisk[n] = fake_disk;
}
......@@ -434,7 +434,8 @@ static int ubd_add(int n)
if (!dev->is_dir && ubd_file_size(dev, &size) == 0) {
set_capacity(disk, size/512);
set_capacity(fake_disk, size/512);
if (fake_major)
set_capacity(fake_disk, size/512);
}
sprintf(name, "%d", n);
......@@ -541,7 +542,7 @@ int ubd_init(void)
}
ubd_queue = BLK_DEFAULT_QUEUE(MAJOR_NR);
INIT_QUEUE(ubd_queue, do_ubd_request, &ubd_lock);
INIT_ELV(ubd_queue, &ubd_queue->elevator);
elevator_init(ubd_queue, &elevator_noop);
if(fake_major != 0){
char name[sizeof("ubd_nnn\0")];
......@@ -880,12 +881,13 @@ static int ubd_ioctl(struct inode * inode, struct file * file,
return(-EFAULT);
return(0);
}
return(-EINVAL);
}
static int ubd_revalidate(kdev_t rdev)
{
__u64 size;
int n, offset, err;
int n, err;
struct ubd *dev;
n = minor(rdev) >> UBD_SHIFT;
......
......@@ -22,9 +22,6 @@
#define INIT_QUEUE(queue, request, lock) blk_init_queue(queue, request, lock)
#define ELV_NOOP elevator_noop
#define INIT_ELV(queue, elv) elevator_init(queue, elv, ELV_NOOP)
#define INIT_HARDSECT(arr, maj, sizes)
#define SET_PRI(task) do ; while(0)
......
......@@ -22,7 +22,7 @@ struct chan {
void *data;
};
extern void chan_interrupt(struct list_head *chans, struct tq_struct *task,
extern void chan_interrupt(struct list_head *chans, struct work_struct *task,
struct tty_struct *tty, int irq, void *dev);
extern int parse_chan_pair(char *str, struct list_head *chans, int pri,
int device, struct chan_opts *opts);
......
......@@ -7,7 +7,7 @@
#define __LINE_H__
#include "linux/list.h"
#include "linux/tqueue.h"
#include "linux/workqueue.h"
#include "linux/tty.h"
#include "asm/semaphore.h"
#include "chan_user.h"
......@@ -39,7 +39,7 @@ struct line {
char *head;
char *tail;
int sigio;
struct tq_struct task;
struct work_struct task;
struct line_driver *driver;
int have_irq;
};
......
......@@ -9,7 +9,7 @@
#define DSISR_WRITE 0x02000000
#define SC_FAULT_ADDR(sc) ({ \
struct sigcontext_struct *_sc = (sc); \
struct sigcontext *_sc = (sc); \
long retval = -1; \
switch (_sc->regs->trap) { \
case 0x300: \
......@@ -27,7 +27,7 @@
})
#define SC_FAULT_WRITE(sc) ({ \
struct sigcontext_struct *_sc = (sc); \
struct sigcontext *_sc = (sc); \
long retval = -1; \
switch (_sc->regs->trap) { \
case 0x300: \
......
......@@ -14,8 +14,9 @@ obj-$(CONFIG_BLK_DEV_INITRD) += initrd_kern.o initrd_user.o
# user_syms.o not included here because Rules.make has its own ideas about
# building anything in export-objs
USER_OBJS = $(filter %_user.o,$(obj-y)) config.o process.o time.o umid.o \
user_util.o user_syms.o helper.o tty_log.o
USER_OBJS := $(filter %_user.o,$(obj-y)) config.o frame.o helper.o process.o \
time.o tty_log.o umid.o user_util.o user_syms.o
USER_OBJS := $(foreach file,$(USER_OBJS),arch/um/kernel/$(file))
export-objs := ksyms.o process_kern.o signal_kern.o gprof_syms.o gmon_syms.o
......@@ -44,19 +45,18 @@ include $(TOPDIR)/Rules.make
$(USER_OBJS) : %.o: %.c
$(CC) $(CFLAGS_$@) $(USER_CFLAGS) -c -o $@ $<
unmap.o: unmap.c
arch/um/kernel/unmap.o: arch/um/kernel/unmap.c
$(CC) $(UNMAP_CFLAGS) -c -o $@ $<
frame.o: frame.c
$(CC) $(CFLAGS_$@) -c -o $@ $<
unmap_fin.o : unmap.o
arch/um/kernel/unmap_fin.o : arch/um/kernel/unmap.o
ld -r -o $@ $< -lc -L/usr/lib
QUOTE = 'my $$config=`cat $(TOPDIR)/.config`; $$config =~ s/"/\\"/g ; while(<STDIN>) { $$_ =~ s/CONFIG/$$config/; print $$_ }'
config.c : config.c.in $(TOPDIR)/.config
$(PERL) -e $(QUOTE) < config.c.in > $@
arch/um/kernel/config.c : arch/um/kernel/config.c.in $(TOPDIR)/.config
$(PERL) -e $(QUOTE) < arch/um/kernel/config.c.in > $@
arch/um/kernel/config.o : arch/um/kernel/config.c
clean:
rm -f config.c
......
......@@ -234,7 +234,8 @@ void *switch_to(void *prev, void *next, void *last)
panic("write of switch_pipe failed, errno = %d", -err);
reading = 1;
if(from->state == TASK_ZOMBIE) os_kill_process(os_getpid());
if((from->state == TASK_ZOMBIE) || (from->state == TASK_DEAD))
os_kill_process(os_getpid());
err = user_read(from->thread.switch_pipe[0], &c, sizeof(c));
if(err != sizeof(c))
......
......@@ -101,12 +101,12 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr,
ka->sa.sa_handler = SIG_DFL;
if (!(ka->sa.sa_flags & SA_NODEFER)) {
spin_lock_irq(&current->sigmask_lock);
spin_lock_irq(&current->sig->siglock);
sigorsets(&current->blocked, &current->blocked,
&ka->sa.sa_mask);
sigaddset(&current->blocked, signr);
recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock);
spin_unlock_irq(&current->sig->siglock);
}
sp = PT_REGS_SP(regs);
......@@ -188,11 +188,11 @@ int sys_sigsuspend(int history0, int history1, old_sigset_t mask)
sigset_t saveset;
mask &= _BLOCKABLE;
spin_lock_irq(&current->sigmask_lock);
spin_lock_irq(&current->sig->siglock);
saveset = current->blocked;
siginitset(&current->blocked, mask);
recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock);
spin_unlock_irq(&current->sig->siglock);
while (1) {
current->state = TASK_INTERRUPTIBLE;
......@@ -214,11 +214,11 @@ int sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize)
return -EFAULT;
sigdelsetmask(&newset, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock);
spin_lock_irq(&current->sig->siglock);
saveset = current->blocked;
current->blocked = newset;
recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock);
spin_unlock_irq(&current->sig->siglock);
while (1) {
current->state = TASK_INTERRUPTIBLE;
......@@ -234,13 +234,13 @@ int sys_sigreturn(struct pt_regs regs)
void *mask = sp_to_mask(PT_REGS_SP(&regs));
int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long);
spin_lock_irq(&current->sigmask_lock);
spin_lock_irq(&current->sig->siglock);
copy_from_user(&current->blocked.sig[0], sc_sigmask(sc),
sizeof(current->blocked.sig[0]));
copy_from_user(&current->blocked.sig[1], mask, sig_size);
sigdelsetmask(&current->blocked, ~_BLOCKABLE);
recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock);
spin_unlock_irq(&current->sig->siglock);
copy_sc_from_user(current->thread.regs.regs.sc, sc,
&signal_frame_sc.arch);
return(PT_REGS_SYSCALL_RET(&current->thread.regs));
......@@ -252,11 +252,11 @@ int sys_rt_sigreturn(struct pt_regs regs)
void *mask = sp_to_rt_mask(PT_REGS_SP(&regs));
int sig_size = _NSIG_WORDS * sizeof(unsigned long);
spin_lock_irq(&current->sigmask_lock);
spin_lock_irq(&current->sig->siglock);
copy_from_user(&current->blocked, mask, sig_size);
sigdelsetmask(&current->blocked, ~_BLOCKABLE);
recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock);
spin_unlock_irq(&current->sig->siglock);
copy_sc_from_user(current->thread.regs.regs.sc, sc,
&signal_frame_sc.arch);
return(PT_REGS_SYSCALL_RET(&current->thread.regs));
......
......@@ -6,9 +6,9 @@
#include "linux/sched.h"
#include "linux/slab.h"
#include "linux/bootmem.h"
#include "asm/pgalloc.h"
#include "asm-generic/tlb.h"
#include "asm/pgtable.h"
#include "asm/pgalloc.h"
#include "asm/a.out.h"
#include "asm/processor.h"
#include "asm/mmu_context.h"
......
......@@ -417,7 +417,7 @@ int nsegfaults = 0;
void segv_handler(int sig, struct uml_pt_regs *regs)
{
struct sigcontext_struct *context = regs->sc;
struct sigcontext *context = regs->sc;
int index;
if(regs->is_user && !SEGV_IS_FIXABLE(context)){
......
LIB = lib.a
obj-y = proxy.o ptrace.o sysdep.o wait.o
OBJS = proxy.o ptrace.o sysdep.o wait.o
USER_OBJS := $(foreach file,$(obj-y),arch/um/ptproxy/$(file))
all: $(LIB)
$(LIB): $(OBJS)
rm -f $@
ar cr $@ $^
proxy.o: proxy.c
$(CC) $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
ptrace.o: ptrace.c
$(CC) $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
sysdep.o: sysdep.c
$(CC) $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
include $(TOPDIR)/Rules.make
wait.o: wait.c
$(CC) $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
$(USER_OBJS) : %.o: %.c
$(CC) $(CFLAGS_$@) $(USER_CFLAGS) -c -o $@ $<
clean:
rm -f *.o core child ptproxy
include $(TOPDIR)/Rules.make
obj-y = bugs.o checksum.o extable.o fault.o ksyms.o ldt.o old-checksum.o \
ptrace.o ptrace_user.o semaphore.o sigcontext.o syscalls.o sysrq.o
export-objs = ksyms.o
USER_OBJS = bugs.o ptrace_user.o sigcontext.o fault.o
USER_OBJS := bugs.o ptrace_user.o sigcontext.o fault.o
USER_OBJS := $(foreach file,$(USER_OBJS),arch/um/sys-i386/$(file))
SYMLINKS = semaphore.c old-checksum.c checksum.S extable.c
......@@ -13,17 +13,17 @@ include $(TOPDIR)/Rules.make
$(USER_OBJS) : %.o: %.c
$(CC) $(CFLAGS_$@) $(USER_CFLAGS) -c -o $@ $<
checksum.S old-checksum.c:
arch/um/sys-i386/checksum.S arch/um/sys-i386/old-checksum.c:
-rm -f $@
-ln -s $(TOPDIR)/arch/i386/lib/$@ $@
-ln -s $(TOPDIR)/arch/i386/lib/$(notdir $@) $@
semaphore.c:
arch/um/sys-i386/semaphore.c:
-rm -f $@
-ln -s $(TOPDIR)/arch/i386/kernel/$@ $@
-ln -s $(TOPDIR)/arch/i386/kernel/$(notdir $@) $@
extable.c:
arch/um/sys-i386/extable.c:
-rm -f $@
-ln -s $(TOPDIR)/arch/i386/mm/$@ $@
-ln -s $(TOPDIR)/arch/i386/mm/$(notdir $@) $@
clean:
$(MAKE) -C util clean
......
include $(TOPDIR)/Rules.make
all : mk_task
mk_task : mk_task_user.o mk_task_kern.o
......@@ -6,9 +8,6 @@ mk_task : mk_task_user.o mk_task_kern.o
mk_task_user.o : mk_task_user.c
$(CC) -c $<
mk_task_kern.o : mk_task_kern.c
$(CC) $(CFLAGS) -c $<
clean :
$(RM) mk_task *.o *~
......
#ifndef _ASM_UM_TOPOLOGY_H
#define _ASM_UM_TOPOLOGY_H
#include <asm-generic/topology.h>
#endif
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