arm: Add const attribute to some arm_boot_info pointers

Parameter 'info' is const, so add the missing attribute.

v2:
Add 'const' to the local variable info in do_cpu_reset() and to
the boot_info field in CPUARMState (suggested by Peter Maydell).

Cc: Andrzej Zaborowski <balrogg@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
This commit is contained in:
Stefan Weil 2011-06-23 17:53:48 +02:00 committed by Andrzej Zaborowski
parent 75ef849696
commit 462a8bc646
4 changed files with 7 additions and 7 deletions

View File

@ -31,7 +31,7 @@ struct arm_boot_info {
target_phys_addr_t smp_priv_base;
int nb_cpus;
int board_id;
int (*atag_board)(struct arm_boot_info *info, void *p);
int (*atag_board)(const struct arm_boot_info *info, void *p);
/* Used internally by arm_boot.c */
int is_linux;
target_phys_addr_t initrd_size;

View File

@ -49,7 +49,7 @@ static uint32_t smpboot[] = {
p += 4; \
} while (0)
static void set_kernel_args(struct arm_boot_info *info,
static void set_kernel_args(const struct arm_boot_info *info,
int initrd_size, target_phys_addr_t base)
{
target_phys_addr_t p;
@ -102,7 +102,7 @@ static void set_kernel_args(struct arm_boot_info *info,
WRITE_WORD(p, 0);
}
static void set_kernel_args_old(struct arm_boot_info *info,
static void set_kernel_args_old(const struct arm_boot_info *info,
int initrd_size, target_phys_addr_t base)
{
target_phys_addr_t p;
@ -178,7 +178,7 @@ static void set_kernel_args_old(struct arm_boot_info *info,
static void do_cpu_reset(void *opaque)
{
CPUState *env = opaque;
struct arm_boot_info *info = env->boot_info;
const struct arm_boot_info *info = env->boot_info;
cpu_reset(env);
if (info) {

View File

@ -1254,12 +1254,12 @@ static int n8x0_atag_setup(void *p, int model)
return (void *) w - p;
}
static int n800_atag_setup(struct arm_boot_info *info, void *p)
static int n800_atag_setup(const struct arm_boot_info *info, void *p)
{
return n8x0_atag_setup(p, 800);
}
static int n810_atag_setup(struct arm_boot_info *info, void *p)
static int n810_atag_setup(const struct arm_boot_info *info, void *p)
{
return n8x0_atag_setup(p, 810);
}

View File

@ -221,7 +221,7 @@ typedef struct CPUARMState {
void *opaque;
} cp[15];
void *nvic;
struct arm_boot_info *boot_info;
const struct arm_boot_info *boot_info;
} CPUARMState;
CPUARMState *cpu_arm_init(const char *cpu_model);