Commit 69d1ef4caf77da7164d3e392bf0a8057b42cf26e

Authored by Paul Mundt
1 parent 2278caa3c8

sh: Move zero page param defs somewhere sensible.

Follows s390 and others.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Showing 2 changed files with 23 additions and 16 deletions Side-by-side Diff

arch/sh/kernel/setup.c
... ... @@ -57,28 +57,21 @@
57 57  
58 58 extern int root_mountflags;
59 59  
60   -/*
61   - * This is set up by the setup-routine at boot-time
62   - */
63   -#define PARAM ((unsigned char *)empty_zero_page)
64   -
65   -#define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000))
66   -#define RAMDISK_FLAGS (*(unsigned long *) (PARAM+0x004))
67   -#define ORIG_ROOT_DEV (*(unsigned long *) (PARAM+0x008))
68   -#define LOADER_TYPE (*(unsigned long *) (PARAM+0x00c))
69   -#define INITRD_START (*(unsigned long *) (PARAM+0x010))
70   -#define INITRD_SIZE (*(unsigned long *) (PARAM+0x014))
71   -/* ... */
72   -#define COMMAND_LINE ((char *) (PARAM+0x100))
73   -
74 60 #define RAMDISK_IMAGE_START_MASK 0x07FF
75 61 #define RAMDISK_PROMPT_FLAG 0x8000
76 62 #define RAMDISK_LOAD_FLAG 0x4000
77 63  
78 64 static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, };
79 65  
80   -static struct resource code_resource = { .name = "Kernel code", };
81   -static struct resource data_resource = { .name = "Kernel data", };
  66 +static struct resource code_resource = {
  67 + .name = "Kernel code",
  68 + .flags = IORESOURCE_BUSY | IORESOURCE_MEM,
  69 +};
  70 +
  71 +static struct resource data_resource = {
  72 + .name = "Kernel data",
  73 + .flags = IORESOURCE_BUSY | IORESOURCE_MEM,
  74 +};
82 75  
83 76 unsigned long memory_start;
84 77 EXPORT_SYMBOL(memory_start);
include/asm-sh/setup.h
... ... @@ -5,6 +5,20 @@
5 5  
6 6 #ifdef __KERNEL__
7 7  
  8 +/*
  9 + * This is set up by the setup-routine at boot-time
  10 + */
  11 +#define PARAM ((unsigned char *)empty_zero_page)
  12 +
  13 +#define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000))
  14 +#define RAMDISK_FLAGS (*(unsigned long *) (PARAM+0x004))
  15 +#define ORIG_ROOT_DEV (*(unsigned long *) (PARAM+0x008))
  16 +#define LOADER_TYPE (*(unsigned long *) (PARAM+0x00c))
  17 +#define INITRD_START (*(unsigned long *) (PARAM+0x010))
  18 +#define INITRD_SIZE (*(unsigned long *) (PARAM+0x014))
  19 +/* ... */
  20 +#define COMMAND_LINE ((char *) (PARAM+0x100))
  21 +
8 22 int setup_early_printk(char *);
9 23 void sh_mv_setup(void);
10 24