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