Sprinkle const.

This commit is contained in:
christos 2005-05-29 21:37:02 +00:00
parent 2056c915d2
commit e73f21e6cb
8 changed files with 33 additions and 29 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: apicvar.h,v 1.2 2003/10/27 13:43:48 junyoung Exp $ */
/* $NetBSD: apicvar.h,v 1.3 2005/05/29 21:37:02 christos Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -52,6 +52,6 @@ struct apic_attach_args {
int apic_vecbase;
};
void apic_format_redir(char *, char *, int, u_int32_t, u_int32_t);
void apic_format_redir(const char *, const char *, int, u_int32_t, u_int32_t);
#endif /* !_X86_APICVAR_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: i82093var.h,v 1.2 2003/10/27 13:43:48 junyoung Exp $ */
/* $NetBSD: i82093var.h,v 1.3 2005/05/29 21:37:02 christos Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -88,8 +88,8 @@ struct ioapic_softc {
void *apic_intr_establish(int, int, int, int (*)(void *), void *);
void apic_intr_disestablish(void *);
void ioapic_print_redir(struct ioapic_softc *, char *, int);
void ioapic_format_redir(char *, char *, int, u_int32_t, u_int32_t);
void ioapic_print_redir(struct ioapic_softc *, const char *, int);
void ioapic_format_redir(char *, const char *, int, u_int32_t, u_int32_t);
struct ioapic_softc *ioapic_find(int);
struct ioapic_softc *ioapic_find_bybase(int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mpconfig.h,v 1.7 2005/04/16 07:45:59 yamt Exp $ */
/* $NetBSD: mpconfig.h,v 1.8 2005/05/29 21:37:02 christos Exp $ */
/*
* Definitions originally from the mpbios code, but now used for ACPI
@ -37,7 +37,7 @@ struct mpbios_int;
struct mp_bus
{
char *mb_name; /* XXX bus name */
const char *mb_name; /* XXX bus name */
int mb_idx; /* XXX bus index */
void (*mb_intr_print)(int);
void (*mb_intr_cfg)(const struct mpbios_int *, u_int32_t *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: apic.c,v 1.2 2003/07/14 22:32:39 lukem Exp $ */
/* $NetBSD: apic.c,v 1.3 2005/05/29 21:37:03 christos Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: apic.c,v 1.2 2003/07/14 22:32:39 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: apic.c,v 1.3 2005/05/29 21:37:03 christos Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -67,8 +67,8 @@ const char redirhifmt[] = "\177\20"
void
apic_format_redir(where1, where2, idx, redirhi, redirlo)
char *where1;
char *where2;
const char *where1;
const char *where2;
int idx;
u_int32_t redirhi;
u_int32_t redirlo;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cacheinfo.c,v 1.6 2004/08/17 15:27:46 briggs Exp $ */
/* $NetBSD: cacheinfo.c,v 1.7 2005/05/29 21:37:03 christos Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cacheinfo.c,v 1.6 2004/08/17 15:27:46 briggs Exp $");
__KERNEL_RCSID(0, "$NetBSD: cacheinfo.c,v 1.7 2005/05/29 21:37:03 christos Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@ -46,11 +46,14 @@ __KERNEL_RCSID(0, "$NetBSD: cacheinfo.c,v 1.6 2004/08/17 15:27:46 briggs Exp $")
#include <machine/cpu.h>
#include <machine/specialreg.h>
static char *print_cache_config(struct cpu_info *, int, char *, char *);
static char *print_tlb_config(struct cpu_info *, int, char *, char *);
static const char *print_cache_config(struct cpu_info *, int, const char *,
const char *);
static const char *print_tlb_config(struct cpu_info *, int, const char *,
const char *);
static char *
print_cache_config(struct cpu_info *ci, int cache_tag, char *name, char *sep)
static const char *
print_cache_config(struct cpu_info *ci, int cache_tag, const char *name,
const char *sep)
{
char cbuf[7];
struct x86_cache_info *cai = &ci->ci_cinfo[cache_tag];
@ -88,8 +91,9 @@ print_cache_config(struct cpu_info *ci, int cache_tag, char *name, char *sep)
return ", ";
}
static char *
print_tlb_config(struct cpu_info *ci, int cache_tag, char *name, char *sep)
static const char *
print_tlb_config(struct cpu_info *ci, int cache_tag, const char *name,
const char *sep)
{
char cbuf[7];
struct x86_cache_info *cai = &ci->ci_cinfo[cache_tag];
@ -332,7 +336,7 @@ via_cpu_cacheinfo(struct cpu_info *ci)
void
x86_print_cacheinfo(struct cpu_info *ci)
{
char *sep;
const char *sep;
if (ci->ci_cinfo[CAI_ICACHE].cai_totalsize != 0 ||
ci->ci_cinfo[CAI_DCACHE].cai_totalsize != 0) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.c,v 1.20 2004/10/23 21:27:35 yamt Exp $ */
/* $NetBSD: intr.c,v 1.21 2005/05/29 21:37:03 christos Exp $ */
/*
* Copyright 2002 (c) Wasabi Systems, Inc.
@ -104,7 +104,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.20 2004/10/23 21:27:35 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.21 2005/05/29 21:37:03 christos Exp $");
#include "opt_multiprocessor.h"
@ -778,7 +778,7 @@ struct intrhand fake_timer_intrhand;
struct intrhand fake_ipi_intrhand;
#if NLAPIC > 0 && defined(MULTIPROCESSOR)
static char *x86_ipi_names[X86_NIPI] = X86_IPI_NAMES;
static const char *x86_ipi_names[X86_NIPI] = X86_IPI_NAMES;
#endif
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: ioapic.c,v 1.9 2004/08/23 17:24:23 fvdl Exp $ */
/* $NetBSD: ioapic.c,v 1.10 2005/05/29 21:37:03 christos Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.9 2004/08/23 17:24:23 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.10 2005/05/29 21:37:03 christos Exp $");
#include "opt_ddb.h"
@ -246,7 +246,7 @@ ioapic_add(struct ioapic_softc *sc)
}
void
ioapic_print_redir (struct ioapic_softc *sc, char *why, int pin)
ioapic_print_redir (struct ioapic_softc *sc, const char *why, int pin)
{
u_int32_t redirlo = ioapic_read(sc, IOAPIC_REDLO(pin));
u_int32_t redirhi = ioapic_read(sc, IOAPIC_REDHI(pin));

View File

@ -1,4 +1,4 @@
/* $NetBSD: mpacpi.c,v 1.32 2004/12/21 11:33:04 fvdl Exp $ */
/* $NetBSD: mpacpi.c,v 1.33 2005/05/29 21:37:03 christos Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.32 2004/12/21 11:33:04 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.33 2005/05/29 21:37:03 christos Exp $");
#include "opt_acpi.h"
#include "opt_mpbios.h"
@ -804,7 +804,7 @@ mpacpi_print_intr(struct mp_intr_map *mpi)
char buf[256];
int pin;
struct ioapic_softc *sc;
char *busname;
const char *busname;
sc = mpi->ioapic;
pin = mpi->ioapic_pin;