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

Commit 7e0d8a83 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc32: Fix makefile not generating required files
  sparc32: Fix tftpboot.img Makefile
  sparc: fix tftpboot.img build
  sparc32: Fix obvious build issues for tftpboot.img build.
  sparc64: Fix build warnings in piggyback_64.c
  sparc64: Don't use alloc_bootmem() in init_IRQ() code paths.
parents 987fed3b 8944146d
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -15,7 +15,7 @@ quiet_cmd_elftoaout = ELFTOAOUT $@


ifeq ($(CONFIG_SPARC32),y)
ifeq ($(CONFIG_SPARC32),y)
quiet_cmd_piggy		= PIGGY   $@
quiet_cmd_piggy		= PIGGY   $@
      cmd_piggy		= $(obj)/piggyback_32 $@ $(obj)/System.map $(ROOT_IMG)
      cmd_piggy		= $(obj)/piggyback_32 $@ System.map $(ROOT_IMG)
quiet_cmd_btfix		= BTFIX   $@
quiet_cmd_btfix		= BTFIX   $@
      cmd_btfix		= $(OBJDUMP) -x vmlinux | $(obj)/btfixupprep > $@
      cmd_btfix		= $(OBJDUMP) -x vmlinux | $(obj)/btfixupprep > $@
quiet_cmd_sysmap        = SYSMAP  $(obj)/System.map
quiet_cmd_sysmap        = SYSMAP  $(obj)/System.map
@@ -58,7 +58,7 @@ $(obj)/image: $(obj)/btfix.o FORCE
$(obj)/zImage: $(obj)/image
$(obj)/zImage: $(obj)/image
	$(call if_changed,strip)
	$(call if_changed,strip)


$(obj)/tftpboot.img: $(obj)/piggyback $(obj)/System.map $(obj)/image FORCE
$(obj)/tftpboot.img: $(obj)/image $(obj)/piggyback_32 System.map $(ROOT_IMG) FORCE
	$(call if_changed,elftoaout)
	$(call if_changed,elftoaout)
	$(call if_changed,piggy)
	$(call if_changed,piggy)


@@ -79,7 +79,7 @@ $(obj)/image: vmlinux FORCE
	$(call if_changed,strip)
	$(call if_changed,strip)
	@echo '  kernel: $@ is ready'
	@echo '  kernel: $@ is ready'


$(obj)/tftpboot.img: vmlinux $(obj)/piggyback_64 System.map $(ROOT_IMG) FORCE
$(obj)/tftpboot.img: $(obj)/image $(obj)/piggyback_64 System.map $(ROOT_IMG) FORCE
	$(call if_changed,elftoaout)
	$(call if_changed,elftoaout)
	$(call if_changed,piggy)
	$(call if_changed,piggy)
	@echo '  kernel: $@ is ready'
	@echo '  kernel: $@ is ready'
+2 −2
Original line number Original line Diff line number Diff line
@@ -70,7 +70,7 @@ void die(char *str)
int main(int argc,char **argv)
int main(int argc,char **argv)
{
{
	static char aout_magic[] = { 0x01, 0x03, 0x01, 0x07 };
	static char aout_magic[] = { 0x01, 0x03, 0x01, 0x07 };
	unsigned char buffer[1024], *q, *r;
	char buffer[1024], *q, *r;
	unsigned int i, j, k, start, end, offset;
	unsigned int i, j, k, start, end, offset;
	FILE *map;
	FILE *map;
	struct stat s;
	struct stat s;
@@ -84,7 +84,7 @@ int main(int argc,char **argv)
	while (fgets (buffer, 1024, map)) {
	while (fgets (buffer, 1024, map)) {
		if (!strcmp (buffer + 8, " T start\n") || !strcmp (buffer + 16, " T start\n"))
		if (!strcmp (buffer + 8, " T start\n") || !strcmp (buffer + 16, " T start\n"))
			start = strtoul (buffer, NULL, 16);
			start = strtoul (buffer, NULL, 16);
		else if (!strcmp (buffer + 8, " A end\n") || !strcmp (buffer + 16, " A end\n"))
		else if (!strcmp (buffer + 8, " A _end\n") || !strcmp (buffer + 16, " A _end\n"))
			end = strtoul (buffer, NULL, 16);
			end = strtoul (buffer, NULL, 16);
	}
	}
	fclose (map);
	fclose (map);
+1 −0
Original line number Original line Diff line number Diff line
@@ -46,6 +46,7 @@ int main(int argc,char **argv)
	struct stat s;
	struct stat s;
	int image, tail;
	int image, tail;
	
	
	start = end = 0;
	if (stat (argv[3], &s) < 0) die (argv[3]);
	if (stat (argv[3], &s) < 0) die (argv[3]);
	map = fopen (argv[2], "r");
	map = fopen (argv[2], "r");
	if (!map) die(argv[2]);
	if (!map) die(argv[2]);
+19 −26
Original line number Original line Diff line number Diff line
@@ -20,7 +20,6 @@
#include <linux/delay.h>
#include <linux/delay.h>
#include <linux/proc_fs.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/seq_file.h>
#include <linux/bootmem.h>
#include <linux/irq.h>
#include <linux/irq.h>


#include <asm/ptrace.h>
#include <asm/ptrace.h>
@@ -914,25 +913,19 @@ void __cpuinit notrace sun4v_register_mondo_queues(int this_cpu)
			   tb->nonresum_qmask);
			   tb->nonresum_qmask);
}
}


static void __init alloc_one_mondo(unsigned long *pa_ptr, unsigned long qmask)
/* Each queue region must be a power of 2 multiple of 64 bytes in
{
 * size.  The base real address must be aligned to the size of the
	unsigned long size = PAGE_ALIGN(qmask + 1);
 * region.  Thus, an 8KB queue must be 8KB aligned, for example.
	void *p = __alloc_bootmem(size, size, 0);
 */
	if (!p) {
static void __init alloc_one_queue(unsigned long *pa_ptr, unsigned long qmask)
		prom_printf("SUN4V: Error, cannot allocate mondo queue.\n");
		prom_halt();
	}

	*pa_ptr = __pa(p);
}

static void __init alloc_one_kbuf(unsigned long *pa_ptr, unsigned long qmask)
{
{
	unsigned long size = PAGE_ALIGN(qmask + 1);
	unsigned long size = PAGE_ALIGN(qmask + 1);
	void *p = __alloc_bootmem(size, size, 0);
	unsigned long order = get_order(size);
	unsigned long p;


	p = __get_free_pages(GFP_KERNEL, order);
	if (!p) {
	if (!p) {
		prom_printf("SUN4V: Error, cannot allocate kbuf page.\n");
		prom_printf("SUN4V: Error, cannot allocate queue.\n");
		prom_halt();
		prom_halt();
	}
	}


@@ -942,11 +935,11 @@ static void __init alloc_one_kbuf(unsigned long *pa_ptr, unsigned long qmask)
static void __init init_cpu_send_mondo_info(struct trap_per_cpu *tb)
static void __init init_cpu_send_mondo_info(struct trap_per_cpu *tb)
{
{
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
	void *page;
	unsigned long page;


	BUILD_BUG_ON((NR_CPUS * sizeof(u16)) > (PAGE_SIZE - 64));
	BUILD_BUG_ON((NR_CPUS * sizeof(u16)) > (PAGE_SIZE - 64));


	page = alloc_bootmem_pages(PAGE_SIZE);
	page = get_zeroed_page(GFP_KERNEL);
	if (!page) {
	if (!page) {
		prom_printf("SUN4V: Error, cannot allocate cpu mondo page.\n");
		prom_printf("SUN4V: Error, cannot allocate cpu mondo page.\n");
		prom_halt();
		prom_halt();
@@ -965,12 +958,12 @@ static void __init sun4v_init_mondo_queues(void)
	for_each_possible_cpu(cpu) {
	for_each_possible_cpu(cpu) {
		struct trap_per_cpu *tb = &trap_block[cpu];
		struct trap_per_cpu *tb = &trap_block[cpu];


		alloc_one_mondo(&tb->cpu_mondo_pa, tb->cpu_mondo_qmask);
		alloc_one_queue(&tb->cpu_mondo_pa, tb->cpu_mondo_qmask);
		alloc_one_mondo(&tb->dev_mondo_pa, tb->dev_mondo_qmask);
		alloc_one_queue(&tb->dev_mondo_pa, tb->dev_mondo_qmask);
		alloc_one_mondo(&tb->resum_mondo_pa, tb->resum_qmask);
		alloc_one_queue(&tb->resum_mondo_pa, tb->resum_qmask);
		alloc_one_kbuf(&tb->resum_kernel_buf_pa, tb->resum_qmask);
		alloc_one_queue(&tb->resum_kernel_buf_pa, tb->resum_qmask);
		alloc_one_mondo(&tb->nonresum_mondo_pa, tb->nonresum_qmask);
		alloc_one_queue(&tb->nonresum_mondo_pa, tb->nonresum_qmask);
		alloc_one_kbuf(&tb->nonresum_kernel_buf_pa,
		alloc_one_queue(&tb->nonresum_kernel_buf_pa,
				tb->nonresum_qmask);
				tb->nonresum_qmask);
	}
	}
}
}
@@ -999,7 +992,7 @@ void __init init_IRQ(void)
	kill_prom_timer();
	kill_prom_timer();


	size = sizeof(struct ino_bucket) * NUM_IVECS;
	size = sizeof(struct ino_bucket) * NUM_IVECS;
	ivector_table = alloc_bootmem(size);
	ivector_table = kzalloc(size, GFP_KERNEL);
	if (!ivector_table) {
	if (!ivector_table) {
		prom_printf("Fatal error, cannot allocate ivector_table\n");
		prom_printf("Fatal error, cannot allocate ivector_table\n");
		prom_halt();
		prom_halt();