diff options
Diffstat (limited to 'arch/alpha/boot')
| -rw-r--r-- | arch/alpha/boot/bootp.c | 4 | ||||
| -rw-r--r-- | arch/alpha/boot/bootpz.c | 4 | ||||
| -rw-r--r-- | arch/alpha/boot/head.S | 2 | ||||
| -rw-r--r-- | arch/alpha/boot/main.c | 4 | ||||
| -rw-r--r-- | arch/alpha/boot/misc.c | 40 | ||||
| -rw-r--r-- | arch/alpha/boot/tools/objstrip.c | 4 |
6 files changed, 12 insertions, 46 deletions
diff --git a/arch/alpha/boot/bootp.c b/arch/alpha/boot/bootp.c index 3af21c78933..2a542a50655 100644 --- a/arch/alpha/boot/bootp.c +++ b/arch/alpha/boot/bootp.c @@ -8,11 +8,11 @@ * based significantly on the arch/alpha/boot/main.c of Linus Torvalds */ #include <linux/kernel.h> +#include <linux/slab.h> #include <linux/string.h> -#include <linux/utsrelease.h> +#include <generated/utsrelease.h> #include <linux/mm.h> -#include <asm/system.h> #include <asm/console.h> #include <asm/hwrpb.h> #include <asm/pgtable.h> diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c index 1036b515e20..d6ad191698d 100644 --- a/arch/alpha/boot/bootpz.c +++ b/arch/alpha/boot/bootpz.c @@ -10,11 +10,11 @@ * and the decompression code from MILO. */ #include <linux/kernel.h> +#include <linux/slab.h> #include <linux/string.h> -#include <linux/utsrelease.h> +#include <generated/utsrelease.h> #include <linux/mm.h> -#include <asm/system.h> #include <asm/console.h> #include <asm/hwrpb.h> #include <asm/pgtable.h> diff --git a/arch/alpha/boot/head.S b/arch/alpha/boot/head.S index f3d98089b3d..8efb26686d4 100644 --- a/arch/alpha/boot/head.S +++ b/arch/alpha/boot/head.S @@ -4,7 +4,7 @@ * initial bootloader stuff.. */ -#include <asm/system.h> +#include <asm/pal.h> .set noreorder .globl __start diff --git a/arch/alpha/boot/main.c b/arch/alpha/boot/main.c index 89f3be071ae..3baf2d1e908 100644 --- a/arch/alpha/boot/main.c +++ b/arch/alpha/boot/main.c @@ -6,11 +6,11 @@ * This file is the bootloader for the Linux/AXP kernel */ #include <linux/kernel.h> +#include <linux/slab.h> #include <linux/string.h> -#include <linux/utsrelease.h> +#include <generated/utsrelease.h> #include <linux/mm.h> -#include <asm/system.h> #include <asm/console.h> #include <asm/hwrpb.h> #include <asm/pgtable.h> diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c index c00646b25f6..3ff9a957a25 100644 --- a/arch/alpha/boot/misc.c +++ b/arch/alpha/boot/misc.c @@ -19,6 +19,7 @@ */ #include <linux/kernel.h> +#include <linux/slab.h> #include <asm/uaccess.h> @@ -78,8 +79,6 @@ static unsigned outcnt; /* bytes in output buffer */ static int fill_inbuf(void); static void flush_window(void); static void error(char *m); -static void gzip_mark(void **); -static void gzip_release(void **); static char *input_data; static int input_data_size; @@ -88,51 +87,18 @@ static uch *output_data; static ulg output_ptr; static ulg bytes_out; -static void *malloc(int size); -static void free(void *where); static void error(char *m); static void gzip_mark(void **); static void gzip_release(void **); extern int end; static ulg free_mem_ptr; -static ulg free_mem_ptr_end; +static ulg free_mem_end_ptr; #define HEAP_SIZE 0x3000 #include "../../../lib/inflate.c" -static void *malloc(int size) -{ - void *p; - - if (size <0) error("Malloc error"); - if (free_mem_ptr <= 0) error("Memory error"); - - free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ - - p = (void *)free_mem_ptr; - free_mem_ptr += size; - - if (free_mem_ptr >= free_mem_ptr_end) - error("Out of memory"); - return p; -} - -static void free(void *where) -{ /* gzip_mark & gzip_release do the free */ -} - -static void gzip_mark(void **ptr) -{ - *ptr = (void *) free_mem_ptr; -} - -static void gzip_release(void **ptr) -{ - free_mem_ptr = (long) *ptr; -} - /* =========================================================================== * Fill the input buffer. This is called only when the buffer is empty * and at least one byte is really needed. @@ -193,7 +159,7 @@ decompress_kernel(void *output_start, /* FIXME FIXME FIXME */ free_mem_ptr = (ulg)output_start + ksize; - free_mem_ptr_end = (ulg)output_start + ksize + 0x200000; + free_mem_end_ptr = (ulg)output_start + ksize + 0x200000; /* FIXME FIXME FIXME */ /* put in temp area to reduce initial footprint */ diff --git a/arch/alpha/boot/tools/objstrip.c b/arch/alpha/boot/tools/objstrip.c index ef183823029..367d53d031f 100644 --- a/arch/alpha/boot/tools/objstrip.c +++ b/arch/alpha/boot/tools/objstrip.c @@ -35,7 +35,7 @@ const char * prog_name; -void +static void usage (void) { fprintf(stderr, @@ -93,7 +93,7 @@ main (int argc, char *argv[]) ofd = 1; if (i < argc) { ofd = open(argv[i++], O_WRONLY | O_CREAT | O_TRUNC, 0666); - if (fd == -1) { + if (ofd == -1) { perror("open"); exit(1); } |
