Commit c4884595 authored by Linus Torvalds's avatar Linus Torvalds

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

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 828915fc 08983405
...@@ -36,9 +36,8 @@ ARCH_SUBDIRS = $(ARCH_DIR)/drivers $(ARCH_DIR)/kernel \ ...@@ -36,9 +36,8 @@ ARCH_SUBDIRS = $(ARCH_DIR)/drivers $(ARCH_DIR)/kernel \
SUBDIRS += $(ARCH_SUBDIRS) 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)/
+= $(ARCH_DIR)/os-$(OS)/
libs-$(CONFIG_PT_PROXY) += $(ARCH_DIR)/ptproxy/ libs-$(CONFIG_PT_PROXY) += $(ARCH_DIR)/ptproxy/
...@@ -53,15 +52,17 @@ CFLAGS += $(DEBUG) $(PROFILE) $(ARCH_CFLAGS) -D__arch_um__ \ ...@@ -53,15 +52,17 @@ CFLAGS += $(DEBUG) $(PROFILE) $(ARCH_CFLAGS) -D__arch_um__ \
-DSUBARCH=\"$(SUBARCH)\" -D_LARGEFILE64_SOURCE -I$(ARCH_INCLUDE) \ -DSUBARCH=\"$(SUBARCH)\" -D_LARGEFILE64_SOURCE -I$(ARCH_INCLUDE) \
-Derrno=kernel_errno -Derrno=kernel_errno
LDFLAGS += -r
LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000) SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000)
$(ARCH_DIR)/link.ld: $(ARCH_DIR)/link.ld.in $(ARCH_DIR)/uml.lds.s : $(ARCH_DIR)/uml.lds.S
m4 -DSTART=$$(($(TOP_ADDR) - $(SIZE))) -DELF_ARCH=$(ELF_ARCH) \ $(call if_changed_dep,as_s_S)
-DELF_FORMAT=$(ELF_FORMAT) $< > $@
AFLAGS_uml.lds.o = -U$(SUBARCH) -DSTART=$$(($(TOP_ADDR) - $(SIZE))) \
-DELF_ARCH=$(ELF_ARCH) -DELF_FORMAT=\"$(ELF_FORMAT)\" -P -C -Uum
LDFLAGS_vmlinux = -r $(ARCH_DIR)/main.o
SYMLINK_HEADERS = include/asm-um/archparam.h include/asm-um/system.h \ SYMLINK_HEADERS = include/asm-um/archparam.h include/asm-um/system.h \
include/asm-um/sigcontext.h include/asm-um/processor.h \ include/asm-um/sigcontext.h include/asm-um/processor.h \
...@@ -72,11 +73,13 @@ ARCH_SYMLINKS = include/asm-um/arch arch/um/include/sysdep arch/um/os \ ...@@ -72,11 +73,13 @@ ARCH_SYMLINKS = include/asm-um/arch arch/um/include/sysdep arch/um/os \
GEN_HEADERS = $(ARCH_DIR)/include/task.h GEN_HEADERS = $(ARCH_DIR)/include/task.h
linux: scripts $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS) $(ARCH_DIR)/main.o \ $(ARCH_DIR)/vmlinux.lds.S :
vmlinux $(ARCH_DIR)/link.ld touch $@
mv vmlinux vmlinux.o
$(CC) -Wl,-T,$(ARCH_DIR)/link.ld $(LINK_PROFILE) $(LINK_WRAPS) \ linux: scripts $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS) \
-o linux -static $(ARCH_DIR)/main.o vmlinux.o -L/usr/lib -lutil arch/um/uml.lds.s $(ARCH_DIR)/main.o vmlinux
$(CC) -Wl,-T,arch/um/uml.lds.s -o $@ $(LINK_PROFILE) \
$(LINK_WRAPS) -static vmlinux -L/usr/lib -lutil
USER_CFLAGS := $(patsubst -I%,,$(CFLAGS)) USER_CFLAGS := $(patsubst -I%,,$(CFLAGS))
USER_CFLAGS := $(patsubst -Derrno=kernel_errno,,$(USER_CFLAGS)) USER_CFLAGS := $(patsubst -Derrno=kernel_errno,,$(USER_CFLAGS))
......
...@@ -3,5 +3,4 @@ ...@@ -3,5 +3,4 @@
# Licensed under the GPL # Licensed under the GPL
# #
SUBDIRS += $(ARCH_DIR)/os-$(OS)/drivers core-y += $(ARCH_DIR)/os-$(OS)/
LIBS += $(ARCH_DIR)/os-$(OS)/drivers/drivers.o
...@@ -206,6 +206,9 @@ CONFIG_EXT2_FS=y ...@@ -206,6 +206,9 @@ CONFIG_EXT2_FS=y
# CONFIG_UDF_RW is not set # CONFIG_UDF_RW is not set
# CONFIG_UFS_FS is not set # CONFIG_UFS_FS is not set
# CONFIG_UFS_FS_WRITE is not set # CONFIG_UFS_FS_WRITE is not set
# CONFIG_XFS_FS is not set
# CONFIG_XFS_RT is not set
# CONFIG_XFS_QUOTA is not set
# #
# Network File Systems # Network File Systems
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include "linux/blk.h" #include "linux/blk.h"
#include "linux/blkdev.h" #include "linux/blkdev.h"
#include "linux/hdreg.h" #include "linux/hdreg.h"
#include "linux/ide.h"
#include "linux/init.h" #include "linux/init.h"
#include "linux/devfs_fs_kernel.h" #include "linux/devfs_fs_kernel.h"
#include "linux/cdrom.h" #include "linux/cdrom.h"
...@@ -66,29 +65,44 @@ static struct block_device_operations ubd_blops = { ...@@ -66,29 +65,44 @@ static struct block_device_operations ubd_blops = {
revalidate: ubd_revalidate, revalidate: ubd_revalidate,
}; };
static struct hd_struct ubd_part[MAX_MINOR] =
{ [ 0 ... MAX_MINOR - 1 ] = { 0, 0, 0 } };
static request_queue_t *ubd_queue; static request_queue_t *ubd_queue;
static int fake_major = 0; static int fake_major = 0;
#define INIT_GENDISK(maj, name, parts, shift, blops) \ #define INIT_GENDISK(maj, index) \
{ \ { \
major : maj, \ .major = maj, \
major_name : name, \ .major_name = "ubd", \
minor_shift : shift, \ .minor_shift = UBD_SHIFT, \
part : parts, \ .first_minor = index << UBD_SHIFT, \
next : NULL, \ .part = NULL, \
fops : blops, \ .next = NULL, \
flags : 0 \ .fops = &ubd_blops, \
} .flags = GENHD_FL_DRIVERFS \
}
static struct gendisk ubd_gendisk = INIT_GENDISK(MAJOR_NR, "ubd", ubd_part,
UBD_SHIFT, &ubd_blops); static struct gendisk ubd_gendisk[MAX_DEV] = {
static struct gendisk fake_gendisk = INIT_GENDISK(0, "ubd", ubd_part, INIT_GENDISK(MAJOR_NR, 0),
UBD_SHIFT, &ubd_blops); INIT_GENDISK(MAJOR_NR, 1),
INIT_GENDISK(MAJOR_NR, 2),
INIT_GENDISK(MAJOR_NR, 3),
INIT_GENDISK(MAJOR_NR, 4),
INIT_GENDISK(MAJOR_NR, 5),
INIT_GENDISK(MAJOR_NR, 6),
INIT_GENDISK(MAJOR_NR, 7)
};
static struct gendisk fake_gendisk[MAX_DEV] = {
INIT_GENDISK(0, 0),
INIT_GENDISK(0, 1),
INIT_GENDISK(0, 2),
INIT_GENDISK(0, 3),
INIT_GENDISK(0, 4),
INIT_GENDISK(0, 5),
INIT_GENDISK(0, 6),
INIT_GENDISK(0, 7)
};
#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
...@@ -220,11 +234,12 @@ static int ubd_setup_common(char *str, int *index_out) ...@@ -220,11 +234,12 @@ 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 n; int i, n;
if(index_out) *index_out = -1; if(index_out) *index_out = -1;
n = *str++; n = *str++;
if(n == '='){ if(n == '='){
static int fake_major_allowed = 1;
char *end; char *end;
int major; int major;
...@@ -238,8 +253,17 @@ static int ubd_setup_common(char *str, int *index_out) ...@@ -238,8 +253,17 @@ static int ubd_setup_common(char *str, int *index_out)
"ubd_setup : didn't parse major number\n"); "ubd_setup : didn't parse major number\n");
return(1); return(1);
} }
fake_gendisk.major = major;
if(!fake_major_allowed){
printk(KERN_ERR "Can't assign a fake major twice\n");
return(1);
}
for(i = 0; i < MAX_DEV; i++)
fake_gendisk[i].major = major;
fake_major = major; fake_major = major;
fake_major_allowed = 0;
printk(KERN_INFO "Setting extra ubd major number to %d\n", printk(KERN_INFO "Setting extra ubd major number to %d\n",
major); major);
return(0); return(0);
...@@ -315,9 +339,14 @@ __uml_help(ubd_setup, ...@@ -315,9 +339,14 @@ __uml_help(ubd_setup,
static int fakehd(char *str) static int fakehd(char *str)
{ {
int i;
printk(KERN_INFO printk(KERN_INFO
"fakehd : Changing ubd_gendisk.major_name to \"hd\".\n"); "fakehd : Changing ubd_gendisk.major_name to \"hd\".\n");
ubd_gendisk.major_name = "hd";
for(i = 0; i < MAX_DEV; i++)
ubd_gendisk[i].major_name = "hd";
return(1); return(1);
} }
...@@ -401,14 +430,9 @@ static int ubd_add(int n) ...@@ -401,14 +430,9 @@ static int ubd_add(int n)
{ {
devfs_handle_t real, fake; devfs_handle_t real, fake;
char name[sizeof("nnnnnn\0")], dev_name[sizeof("ubd0x")]; char name[sizeof("nnnnnn\0")], dev_name[sizeof("ubd0x")];
int err;
if(ubd_dev[n].file == NULL) return(-1); if(ubd_dev[n].file == NULL) return(-1);
err = ubd_revalidate(mk_kdev(MAJOR_NR, n << UBD_SHIFT));
if(err)
return(err);
sprintf(name, "%d", n); sprintf(name, "%d", n);
real = devfs_register(ubd_dir_handle, name, DEVFS_FL_REMOVABLE, real = devfs_register(ubd_dir_handle, name, DEVFS_FL_REMOVABLE,
MAJOR_NR, n << UBD_SHIFT, MAJOR_NR, n << UBD_SHIFT,
...@@ -427,9 +451,9 @@ static int ubd_add(int n) ...@@ -427,9 +451,9 @@ static int ubd_add(int n)
if(real == NULL) return(-1); if(real == NULL) return(-1);
ubd_dev[n].real = real; ubd_dev[n].real = real;
if(!strcmp(ubd_gendisk.major_name, "ubd")) if(!strcmp(ubd_gendisk[n].major_name, "ubd"))
sprintf(dev_name, "%s%d", ubd_gendisk.major_name, n); sprintf(dev_name, "%s%d", ubd_gendisk[n].major_name, n);
else sprintf(dev_name, "%s%c", ubd_gendisk.major_name, else sprintf(dev_name, "%s%c", ubd_gendisk[n].major_name,
n + 'a'); n + 'a');
make_ide_entries(dev_name); make_ide_entries(dev_name);
...@@ -510,7 +534,8 @@ int ubd_init(void) ...@@ -510,7 +534,8 @@ int ubd_init(void)
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); INIT_ELV(ubd_queue, &ubd_queue->elevator);
INIT_HARDSECT(hardsect_size, MAJOR_NR, hardsect_sizes); INIT_HARDSECT(hardsect_size, MAJOR_NR, hardsect_sizes);
add_gendisk(&ubd_gendisk); for(i = 0; i < MAX_DEV; i++)
add_disk(&ubd_gendisk[i]);
if(fake_major != 0){ if(fake_major != 0){
char name[sizeof("ubd_nnn\0")]; char name[sizeof("ubd_nnn\0")];
...@@ -523,9 +548,11 @@ int ubd_init(void) ...@@ -523,9 +548,11 @@ int ubd_init(void)
} }
blk_dev[fake_major].queue = ubd_get_queue; blk_dev[fake_major].queue = ubd_get_queue;
INIT_HARDSECT(hardsect_size, fake_major, hardsect_sizes); INIT_HARDSECT(hardsect_size, fake_major, hardsect_sizes);
add_gendisk(&fake_gendisk); for(i = 0; i < MAX_DEV; i++)
add_disk(&fake_gendisk[i]);
} }
for(i=0;i<MAX_DEV;i++) ubd_add(i); for(i = 0; i < MAX_DEV; i++)
ubd_add(i);
return(0); return(0);
} }
...@@ -647,9 +674,8 @@ static int ubd_open(struct inode *inode, struct file *filp) ...@@ -647,9 +674,8 @@ static int ubd_open(struct inode *inode, struct file *filp)
"errno = %d\n", n, dev->file, -err); "errno = %d\n", n, dev->file, -err);
return(err); return(err);
} }
err = ubd_file_size(dev, &dev->size); err = ubd_revalidate(inode->i_rdev);
if(err) return(err); if(err) return(err);
ubd_part[offset].nr_sects = dev->size / hardsect_sizes[offset];
} }
dev->count++; dev->count++;
if((filp->f_mode & FMODE_WRITE) && !dev->openflags.w){ if((filp->f_mode & FMODE_WRITE) && !dev->openflags.w){
...@@ -667,10 +693,14 @@ static int ubd_release(struct inode * inode, struct file * file) ...@@ -667,10 +693,14 @@ static int ubd_release(struct inode * inode, struct file * file)
offset = n << UBD_SHIFT; offset = n << UBD_SHIFT;
if(n > MAX_DEV) if(n > MAX_DEV)
return -ENODEV; return -ENODEV;
if(--ubd_dev[n].count == 0){ if(--ubd_dev[n].count == 0){
ubd_close(&ubd_dev[n]); ubd_close(&ubd_dev[n]);
ubd_part[offset].nr_sects = 0; del_gendisk(&ubd_gendisk[n]);
if(fake_major != 0)
del_gendisk(&fake_gendisk[n]);
} }
return(0); return(0);
} }
...@@ -741,7 +771,6 @@ static int prepare_request(struct request *req, struct io_thread_req *io_req) ...@@ -741,7 +771,6 @@ static int prepare_request(struct request *req, struct io_thread_req *io_req)
return(1); return(1);
} }
req->sector += ubd_part[min].start_sect;
block = req->sector; block = req->sector;
nsect = req->current_nr_sectors; nsect = req->current_nr_sectors;
...@@ -816,15 +845,6 @@ static int ubd_ioctl(struct inode * inode, struct file * file, ...@@ -816,15 +845,6 @@ static int ubd_ioctl(struct inode * inode, struct file * file,
g.cylinders = dev->size / (128 * 32 * hardsect_sizes[min]); g.cylinders = dev->size / (128 * 32 * hardsect_sizes[min]);
g.start = 2; g.start = 2;
return(copy_to_user(loc, &g, sizeof(g)) ? -EFAULT : 0); return(copy_to_user(loc, &g, sizeof(g)) ? -EFAULT : 0);
case BLKGETSIZE: /* Return device size */
if(!arg) return(-EINVAL);
err = verify_area(VERIFY_WRITE, (long *) arg, sizeof(long));
if(err)
return(err);
put_user(ubd_part[min].nr_sects, (long *) arg);
return(0);
case BLKRRPART: /* Re-read partition tables */
return(ubd_revalidate(inode->i_rdev));
case HDIO_SET_UNMASKINTR: case HDIO_SET_UNMASKINTR:
if(!capable(CAP_SYS_ADMIN)) return(-EACCES); if(!capable(CAP_SYS_ADMIN)) return(-EACCES);
...@@ -877,9 +897,9 @@ static int ubd_ioctl(struct inode * inode, struct file * file, ...@@ -877,9 +897,9 @@ static int ubd_ioctl(struct inode * inode, struct file * file,
static int ubd_revalidate(kdev_t rdev) static int ubd_revalidate(kdev_t rdev)
{ {
int i, n, offset, err, pcount = 1 << UBD_SHIFT; __u64 size;
int n, offset, err;
struct ubd *dev; struct ubd *dev;
struct hd_struct *part;
n = minor(rdev) >> UBD_SHIFT; n = minor(rdev) >> UBD_SHIFT;
offset = n << UBD_SHIFT; offset = n << UBD_SHIFT;
...@@ -887,45 +907,20 @@ static int ubd_revalidate(kdev_t rdev) ...@@ -887,45 +907,20 @@ static int ubd_revalidate(kdev_t rdev)
if(dev->is_dir) if(dev->is_dir)
return(0); return(0);
part = &ubd_part[offset]; err = ubd_file_size(dev, &size);
if(err) {
/* clear all old partition counts */
for(i = 1; i < pcount; i++) {
part[i].start_sect = 0;
part[i].nr_sects = 0;
}
/* If it already has been opened we can check the partitions
* directly
*/
if(dev->count){
part->start_sect = 0;
register_disk(&ubd_gendisk, mk_kdev(MAJOR_NR, offset), pcount,
&ubd_blops, part->nr_sects);
}
else if(dev->file){
err = ubd_open_dev(dev);
if(err){
printk(KERN_ERR "unable to open %s for validation\n",
dev->file);
return(err);
}
/* have to recompute sizes since we opened it */
err = ubd_file_size(dev, &dev->size);
if(err) {
ubd_close(dev);
return(err);
}
part->start_sect = 0;
part->nr_sects = dev->size / hardsect_sizes[offset];
register_disk(&ubd_gendisk, mk_kdev(MAJOR_NR, offset), pcount,
&ubd_blops, part->nr_sects);
/* we are done so close it */
ubd_close(dev); ubd_close(dev);
} return(err);
else return(-ENODEV); }
if(size != dev->size){
set_capacity(&ubd_gendisk[n], size / hardsect_sizes[offset]);
if(fake_major != 0)
set_capacity(&fake_gendisk[n],
size / hardsect_sizes[offset]);
dev->size = size;
}
return(0); return(0);
} }
......
...@@ -10,7 +10,6 @@ obj-y = config.o exec_kern.o exec_user.o exitcode.o frame_kern.o frame.o \ ...@@ -10,7 +10,6 @@ obj-y = config.o exec_kern.o exec_user.o exitcode.o frame_kern.o frame.o \
umid.o user_util.o umid.o user_util.o
obj-$(CONFIG_BLK_DEV_INITRD) += initrd_kern.o initrd_user.o obj-$(CONFIG_BLK_DEV_INITRD) += initrd_kern.o initrd_user.o
endif
# 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
......
...@@ -233,7 +233,7 @@ struct page *arch_validate(struct page *page, int mask, int order) ...@@ -233,7 +233,7 @@ struct page *arch_validate(struct page *page, int mask, int order)
addr += PAGE_SIZE; addr += PAGE_SIZE;
} }
if(i == (1 << order)) return(page); if(i == (1 << order)) return(page);
page = _alloc_pages(mask, order); page = alloc_pages(mask, order);
goto again; goto again;
} }
......
...@@ -48,7 +48,7 @@ struct task_struct *get_task(int pid, int require) ...@@ -48,7 +48,7 @@ struct task_struct *get_task(int pid, int require)
ret = NULL; ret = NULL;
read_lock(&tasklist_lock); read_lock(&tasklist_lock);
for_each_task(task){ for_each_process(task){
if(task->pid == pid){ if(task->pid == pid){
ret = task; ret = task;
break; break;
...@@ -64,7 +64,7 @@ int is_valid_pid(int pid) ...@@ -64,7 +64,7 @@ int is_valid_pid(int pid)
struct task_struct *task; struct task_struct *task;
read_lock(&tasklist_lock); read_lock(&tasklist_lock);
for_each_task(task){ for_each_process(task){
if(task->thread.extern_pid == pid){ if(task->thread.extern_pid == pid){
read_unlock(&tasklist_lock); read_unlock(&tasklist_lock);
return(1); return(1);
......
...@@ -15,7 +15,7 @@ static void kill_off_processes(void) ...@@ -15,7 +15,7 @@ static void kill_off_processes(void)
int me; int me;
me = os_getpid(); me = os_getpid();
for_each_task(p){ for_each_process(p){
if(p->thread.extern_pid != me) if(p->thread.extern_pid != me)
os_kill_process(p->thread.extern_pid); os_kill_process(p->thread.extern_pid);
} }
......
...@@ -223,6 +223,12 @@ extern syscall_handler_t sys_sendfile64; ...@@ -223,6 +223,12 @@ extern syscall_handler_t sys_sendfile64;
extern syscall_handler_t sys_futex; extern syscall_handler_t sys_futex;
extern syscall_handler_t sys_sched_setaffinity; extern syscall_handler_t sys_sched_setaffinity;
extern syscall_handler_t sys_sched_getaffinity; extern syscall_handler_t sys_sched_getaffinity;
extern syscall_handler_t sys_io_setup;
extern syscall_handler_t sys_io_destroy;
extern syscall_handler_t sys_io_getevents;
extern syscall_handler_t sys_io_submit;
extern syscall_handler_t sys_io_cancel;
extern syscall_handler_t sys_exit_group;
#if CONFIG_NFSD #if CONFIG_NFSD
#define NFSSERVCTL sys_nfsserctl #define NFSSERVCTL sys_nfsserctl
...@@ -234,7 +240,7 @@ extern syscall_handler_t um_mount; ...@@ -234,7 +240,7 @@ extern syscall_handler_t um_mount;
extern syscall_handler_t um_time; extern syscall_handler_t um_time;
extern syscall_handler_t um_stime; extern syscall_handler_t um_stime;
#define LAST_GENERIC_SYSCALL __NR_sched_getaffinity #define LAST_GENERIC_SYSCALL __NR_exit_group
#if LAST_GENERIC_SYSCALL > LAST_ARCH_SYSCALL #if LAST_GENERIC_SYSCALL > LAST_ARCH_SYSCALL
#define LAST_SYSCALL LAST_GENERIC_SYSCALL #define LAST_SYSCALL LAST_GENERIC_SYSCALL
...@@ -465,6 +471,14 @@ syscall_handler_t *sys_call_table[] = { ...@@ -465,6 +471,14 @@ syscall_handler_t *sys_call_table[] = {
[ __NR_futex ] = sys_futex, [ __NR_futex ] = sys_futex,
[ __NR_sched_setaffinity ] = sys_sched_setaffinity, [ __NR_sched_setaffinity ] = sys_sched_setaffinity,
[ __NR_sched_getaffinity ] = sys_sched_getaffinity, [ __NR_sched_getaffinity ] = sys_sched_getaffinity,
[ __NR_io_setup ] = sys_io_setup,
[ __NR_io_destroy ] = sys_io_destroy,
[ __NR_io_getevents ] = sys_io_getevents,
[ __NR_io_submit ] = sys_io_submit,
[ __NR_io_cancel ] = sys_io_cancel,
[ __NR_alloc_hugepages ] = sys_ni_syscall,
[ __NR_free_hugepages ] = sys_ni_syscall,
[ __NR_exit_group ] = sys_exit_group,
ARCH_SYSCALLS ARCH_SYSCALLS
[ LAST_SYSCALL + 1 ... NR_syscalls ] = [ LAST_SYSCALL + 1 ... NR_syscalls ] =
......
OUTPUT_FORMAT("ELF_FORMAT") OUTPUT_FORMAT(ELF_FORMAT)
OUTPUT_ARCH(ELF_ARCH) OUTPUT_ARCH(ELF_ARCH)
ENTRY(_start) ENTRY(_start)
jiffies = jiffies_64; jiffies = jiffies_64;
SECTIONS SECTIONS
{ {
. = START() + SIZEOF_HEADERS; . = START + SIZEOF_HEADERS;
. = ALIGN(4096); . = ALIGN(4096);
__binary_start = .; __binary_start = .;
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
*/ */
struct task_struct; struct task_struct;
#include "asm/arch/irq.h"
#include "asm/ptrace.h" #include "asm/ptrace.h"
#undef NR_IRQS #undef NR_IRQS
......
#ifndef __UM_CACHEFLUSH_H #ifndef __UM_PERCPU_H
#define __UM_CACHEFLUSH_H #define __UM_PERCPU_H
#include "asm/arch/percpu.h" #include "asm/arch/percpu.h"
......
...@@ -358,6 +358,18 @@ static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address) ...@@ -358,6 +358,18 @@ static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)
#define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0) #define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0)
#define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1) #define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1)
#if defined(CONFIG_HIGHPTE) && defined(CONFIG_HIGHMEM4G)
typedef u32 pte_addr_t;
#endif
#if defined(CONFIG_HIGHPTE) && defined(CONFIG_HIGHMEM64G)
typedef u64 pte_addr_t;
#endif
#if !defined(CONFIG_HIGHPTE)
typedef pte_t *pte_addr_t;
#endif
#define update_mmu_cache(vma,address,pte) do ; while (0) #define update_mmu_cache(vma,address,pte) do ; while (0)
/* Encode and de-code a swap entry */ /* Encode and de-code a swap entry */
......
...@@ -3,4 +3,35 @@ ...@@ -3,4 +3,35 @@
#include "asm/system-generic.h" #include "asm/system-generic.h"
static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
unsigned long new, int size)
{
unsigned long prev;
switch (size) {
case 1:
__asm__ __volatile__(LOCK_PREFIX "cmpxchgb %b1,%2"
: "=a"(prev)
: "q"(new), "m"(*__xg(ptr)), "0"(old)
: "memory");
return prev;
case 2:
__asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2"
: "=a"(prev)
: "q"(new), "m"(*__xg(ptr)), "0"(old)
: "memory");
return prev;
case 4:
__asm__ __volatile__(LOCK_PREFIX "cmpxchgl %1,%2"
: "=a"(prev)
: "q"(new), "m"(*__xg(ptr)), "0"(old)
: "memory");
return prev;
}
return old;
}
#define cmpxchg(ptr,o,n)\
((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\
(unsigned long)(n),sizeof(*(ptr))))
#endif #endif
...@@ -12,4 +12,6 @@ static inline cycles_t get_cycles (void) ...@@ -12,4 +12,6 @@ static inline cycles_t get_cycles (void)
return 0; return 0;
} }
#define CLOCK_TICK_RATE (HZ)
#endif #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