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

Commit fe00f943 authored by Ralf Baechle's avatar Ralf Baechle
Browse files

Sparseify MIPS.

parent 14f18b7f
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -52,6 +52,21 @@ ifdef CONFIG_CROSSCOMPILE
CROSS_COMPILE		:= $(tool-prefix)
endif

CHECKFLAGS-y				+= -D__linux__ -D__mips__ \
					   -D_ABIO32=1 \
					   -D_ABIN32=2 \
					   -D_ABI64=3
CHECKFLAGS-$(CONFIG_32BIT)		+= -D_MIPS_SIM=_ABIO32 \
					   -D_MIPS_SZLONG=32 \
					   -D__PTRDIFF_TYPE__=int
CHECKFLAGS-$(CONFIG_64BIT)		+= -m64 -D_MIPS_SIM=_ABI64 \
					   -D_MIPS_SZLONG=64 \
					   -D__PTRDIFF_TYPE__="long int"
CHECKFLAGS-$(CONFIG_CPU_BIG_ENDIAN)	+= -D__MIPSEB__
CHECKFLAGS-$(CONFIG_CPU_LITTLE_ENDIAN)	+= -D__MIPSEL__

CHECKFLAGS				= $(CHECKFLAGS-y)

ifdef CONFIG_BUILD_ELF64
gas-abi			= 64
ld-emul			= $(64bit-emul)
+1 −1
Original line number Diff line number Diff line
@@ -321,7 +321,7 @@ void __init init_i8259_irqs (void)

	for (i = 0; i < 16; i++) {
		irq_desc[i].status = IRQ_DISABLED;
		irq_desc[i].action = 0;
		irq_desc[i].action = NULL;
		irq_desc[i].depth = 1;
		irq_desc[i].handler = &i8259A_irq_type;
	}
+7 −7
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ static void padzero(unsigned long elf_bss)
	nbyte = elf_bss & (PAGE_SIZE-1);
	if (nbyte) {
		nbyte = PAGE_SIZE - nbyte;
		clear_user((void *) elf_bss, nbyte);
		clear_user((void __user *) elf_bss, nbyte);
	}
}

@@ -878,10 +878,10 @@ static int load_irix_library(struct file *file)
 * phdrs there are in the USER_PHDRP array.  We return the vaddr the
 * first phdr was successfully mapped to.
 */
unsigned long irix_mapelf(int fd, struct elf_phdr *user_phdrp, int cnt)
unsigned long irix_mapelf(int fd, struct elf_phdr __user *user_phdrp, int cnt)
{
	unsigned long type, vaddr, filesz, offset, flags;
	struct elf_phdr *hp;
	struct elf_phdr __user *hp;
	struct file *filp;
	int i, retval;

@@ -968,9 +968,9 @@ unsigned long irix_mapelf(int fd, struct elf_phdr *user_phdrp, int cnt)
/* These are the only things you should do on a core-file: use only these
 * functions to write out all the necessary info.
 */
static int dump_write(struct file *file, const void *addr, int nr)
static int dump_write(struct file *file, const void __user *addr, int nr)
{
	return file->f_op->write(file, (const char *) addr, nr, &file->f_pos) == nr;
	return file->f_op->write(file, (const char __user *) addr, nr, &file->f_pos) == nr;
}

static int dump_seek(struct file *file, off_t off)
@@ -1204,7 +1204,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file)
		len = current->mm->arg_end - current->mm->arg_start;
		len = len >= ELF_PRARGSZ ? ELF_PRARGSZ : len;
		(void *) copy_from_user(&psinfo.pr_psargs,
			       (const char *)current->mm->arg_start, len);
			       (const char __user *)current->mm->arg_start, len);
		for (i = 0; i < len; i++)
			if (psinfo.pr_psargs[i] == 0)
				psinfo.pr_psargs[i] = ' ';
@@ -1301,7 +1301,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file)
#ifdef DEBUG
		printk("elf_core_dump: writing %08lx %lx\n", addr, len);
#endif
		DUMP_WRITE((void *)addr, len);
		DUMP_WRITE((void __user *)addr, len);
	}

	if ((off_t) file->f_pos != offset) {
+4 −3
Original line number Diff line number Diff line
@@ -30,10 +30,10 @@ void add_to_inventory (int class, int type, int controller, int unit, int state)
	inventory_items++;
}

int dump_inventory_to_user (void *userbuf, int size)
int dump_inventory_to_user (void __user *userbuf, int size)
{
	inventory_t *inv  = &inventory [0];
	inventory_t *user = userbuf;
	inventory_t __user *user = userbuf;
	int v;

	if (!access_ok(VERIFY_WRITE, userbuf, size))
@@ -41,7 +41,8 @@ int dump_inventory_to_user (void *userbuf, int size)

	for (v = 0; v < inventory_items; v++){
		inv = &inventory [v];
		copy_to_user (user, inv, sizeof (inventory_t));
		if (copy_to_user (user, inv, sizeof (inventory_t)))
			return -EFAULT;
		user++;
	}
	return inventory_items * sizeof (inventory_t);
+215 −193

File changed.

Preview size limit exceeded, changes collapsed.

Loading