Commit 20723083 authored by Jeff Dike's avatar Jeff Dike

Updates to make UML build as 2.5.41.

Applied Oleg Drokin's task --> work patch.
Fixed the Makefiles to accomodate the fact the kbuild doesn't cd
into subdirectories any more.
Got rid of some compile warnings.
parent 26c9952a
......@@ -34,7 +34,7 @@ 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
......
......@@ -39,8 +39,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)){
schedule_task(task);
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);
}
......
......@@ -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")];
......
......@@ -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;
};
......
......@@ -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 : config.c
clean:
rm -f config.c
......
......@@ -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"
......
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 *~
......
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