Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7b3ca08 authored by Kyle McMartin's avatar Kyle McMartin
Browse files

Merge branch 'parisc' from /home/kyle/repos/parisc-2.6.git

Conflicts:

	arch/parisc/hpux/sys_hpux.c
	arch/parisc/mm/ioremap.c
parents 62d0cfcb cb6efb39
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -35,12 +35,8 @@ FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align

OBJCOPY_FLAGS =-O binary -R .note -R .comment -S

GCC_VERSION     := $(call cc-version)
ifneq ($(shell if [ -z $(GCC_VERSION) ] ; then echo "bad"; fi ;),)
$(error Sorry, couldn't find ($(cc-version)).)
endif
ifneq ($(shell if [ $(GCC_VERSION) -lt 0303 ] ; then echo "bad"; fi ;),)
$(error Sorry, your compiler is too old ($(GCC_VERSION)).  GCC v3.3 or above is required.)
ifneq ($(call cc-ifversion, -lt, 0303, "bad"),)
$(error Sorry, GCC v3.3 or above is required.)
endif

cflags-y	:= -pipe
+13 −13
Original line number Diff line number Diff line
@@ -35,13 +35,13 @@ int hpux_execve(struct pt_regs *regs)
	int error;
	char *filename;

	filename = getname((char *) regs->gr[26]);
	filename = getname((char __user *) regs->gr[26]);
	error = PTR_ERR(filename);
	if (IS_ERR(filename))
		goto out;

	error = do_execve(filename, (char **) regs->gr[25],
		(char **)regs->gr[24], regs);
	error = do_execve(filename, (char __user * __user *) regs->gr[25],
		(char __user * __user *) regs->gr[24], regs);

	if (error == 0) {
		task_lock(current);
@@ -63,19 +63,19 @@ struct hpux_dirent {
};

struct getdents_callback {
	struct hpux_dirent *current_dir;
	struct hpux_dirent *previous;
	struct hpux_dirent __user *current_dir;
	struct hpux_dirent __user *previous;
	int count;
	int error;
};

#define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de)))
#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
#define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1))

static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
		u64 ino, unsigned d_type)
{
	struct hpux_dirent * dirent;
	struct hpux_dirent __user * dirent;
	struct getdents_callback * buf = (struct getdents_callback *) __buf;
	ino_t d_ino;
	int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
@@ -105,10 +105,10 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
#undef NAME_OFFSET
#undef ROUND_UP

int hpux_getdents(unsigned int fd, struct hpux_dirent *dirent, unsigned int count)
int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count)
{
	struct file * file;
	struct hpux_dirent * lastdirent;
	struct hpux_dirent __user * lastdirent;
	struct getdents_callback buf;
	int error = -EBADF;

@@ -143,7 +143,7 @@ int hpux_mount(const char *fs, const char *path, int mflag,
	return -ENOSYS;
}

static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf)
static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 __user *statbuf)
{
	struct hpux_stat64 tmp;

@@ -169,7 +169,7 @@ static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf)
	return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
}

long hpux_stat64(char *filename, struct hpux_stat64 *statbuf)
long hpux_stat64(char __user *filename, struct hpux_stat64 __user *statbuf)
{
	struct kstat stat;
	int error = vfs_stat(filename, &stat);
@@ -180,7 +180,7 @@ long hpux_stat64(char *filename, struct hpux_stat64 *statbuf)
	return error;
}

long hpux_fstat64(unsigned int fd, struct hpux_stat64 *statbuf)
long hpux_fstat64(unsigned int fd, struct hpux_stat64 __user *statbuf)
{
	struct kstat stat;
	int error = vfs_fstat(fd, &stat);
@@ -191,7 +191,7 @@ long hpux_fstat64(unsigned int fd, struct hpux_stat64 *statbuf)
	return error;
}

long hpux_lstat64(char *filename, struct hpux_stat64 *statbuf)
long hpux_lstat64(char __user *filename, struct hpux_stat64 __user *statbuf)
{
	struct kstat stat;
	int error = vfs_lstat(filename, &stat);
+16 −14
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ int hpux_ptrace(void)
	return -ENOSYS;
}

int hpux_wait(int *stat_loc)
int hpux_wait(int __user *stat_loc)
{
	return sys_waitpid(-1, stat_loc, 0);
}
@@ -255,7 +255,7 @@ asmlinkage long hpux_fstatfs(unsigned int fd, struct hpux_statfs __user * buf)
/*  TODO: Are these put_user calls OK?  Should they pass an int?
 *        (I copied it from sys_i386.c like this.)
 */
static int hpux_uname(struct hpux_utsname *name)
static int hpux_uname(struct hpux_utsname __user *name)
{
	int error;

@@ -300,14 +300,14 @@ static int hpux_uname(struct hpux_utsname *name)
/*  Note: HP-UX just uses the old suser() function to check perms
 *  in this system call.  We'll use capable(CAP_SYS_ADMIN).
 */
int hpux_utssys(char *ubuf, int n, int type)
int hpux_utssys(char __user *ubuf, int n, int type)
{
	int len;
	int error;
	switch( type ) {
	case 0:
		/*  uname():  */
		return( hpux_uname( (struct hpux_utsname *)ubuf ) );
		return hpux_uname((struct hpux_utsname __user *)ubuf);
		break ;
	case 1:
		/*  Obsolete (used to be umask().)  */
@@ -315,7 +315,8 @@ int hpux_utssys(char *ubuf, int n, int type)
		break ;
	case 2:
		/*  ustat():  */
		return( hpux_ustat(new_decode_dev(n), (struct hpux_ustat *)ubuf) );
		return hpux_ustat(new_decode_dev(n),
				  (struct hpux_ustat __user *)ubuf);
		break;
	case 3:
		/*  setuname():
@@ -332,7 +333,7 @@ int hpux_utssys(char *ubuf, int n, int type)
			return -EINVAL ;
		/*  Unlike Linux, HP-UX truncates it if n is too big:  */
		len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ;
		return( sys_sethostname(ubuf, len) );
		return sys_sethostname(ubuf, len);
		break ;
	case 4:
		/*  sethostname():
@@ -346,7 +347,7 @@ int hpux_utssys(char *ubuf, int n, int type)
			return -EINVAL ;
		/*  Unlike Linux, HP-UX truncates it if n is too big:  */
		len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ;
		return( sys_sethostname(ubuf, len) );
		return sys_sethostname(ubuf, len);
		break ;
	case 5:
		/*  gethostname():
@@ -356,7 +357,7 @@ int hpux_utssys(char *ubuf, int n, int type)
		/*  Unlike Linux, HP-UX returns an error if n==0:  */
		if ( n <= 0 )
			return -EINVAL ;
		return( sys_gethostname(ubuf, n) );
		return sys_gethostname(ubuf, n);
		break ;
	case 6:
		/*  Supposedly called from setuname() in libc.
@@ -420,7 +421,7 @@ int hpux_utssys(char *ubuf, int n, int type)
	}
}

int hpux_getdomainname(char *name, int len)
int hpux_getdomainname(char __user *name, int len)
{
 	int nlen;
 	int err = -EFAULT;
@@ -471,7 +472,8 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2)
	printk(KERN_DEBUG "hpux_sysfs called with arg1='%lx'\n", arg1);

	if ( opcode == 1 ) { /* GETFSIND */	
		len = strlen_user((char *)arg1);
		char __user *user_fsname = (char __user *)arg1;
		len = strlen_user(user_fsname);
		printk(KERN_DEBUG "len of arg1 = %d\n", len);
		if (len == 0)
			return 0;
@@ -481,7 +483,7 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2)
			return 0;
		}

		if ( copy_from_user(fsname, (char *)arg1, len) ) {
		if (copy_from_user(fsname, user_fsname, len)) {
			printk(KERN_DEBUG "failed to copy_from_user fsname\n");
			kfree(fsname);
			return 0;
@@ -495,7 +497,7 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2)
			fstype = 0;
		} else {
			fstype = 0;
		};
		}

		kfree(fsname);

+5 −3
Original line number Diff line number Diff line
@@ -689,7 +689,9 @@ parse_tree_node(struct device *parent, int index, struct hardware_path *modpath)
		.fn	= check_parent,
	};

	device_for_each_child(parent, &recurse_data, descend_children);
	if (device_for_each_child(parent, &recurse_data, descend_children))
		/* nothing */;

	return d.dev;
}

@@ -835,8 +837,8 @@ static void print_parisc_device(struct parisc_device *dev)
	static int count;

	print_pa_hwpath(dev, hw_path);
	printk(KERN_INFO "%d. %s at 0x%lx [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }",
		++count, dev->name, dev->hpa.start, hw_path, dev->id.hw_type,
	printk(KERN_INFO "%d. %s at 0x%p [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }",
		++count, dev->name, (void*) dev->hpa.start, hw_path, dev->id.hw_type,
		dev->id.hversion_rev, dev->id.hversion, dev->id.sversion);

	if (dev->num_addrs) {
+2 −1
Original line number Diff line number Diff line
@@ -822,7 +822,8 @@ int module_finalize(const Elf_Ehdr *hdr,
	       me->name, strtab, symhdr);

	if(me->arch.got_count > MAX_GOTS) {
		printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d\n", me->name, me->arch.got_count, MAX_GOTS);
		printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d)\n",
				me->name, me->arch.got_count, MAX_GOTS);
		return -EINVAL;
	}
	
Loading