cmd_page.c revision c498d9365aa68b789215f4f356a9935f70b0fb3b
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Support routines for managing per-page state.
*/
#include <cmd_page.h>
#include <cmd_mem.h>
#include <cmd.h>
#ifdef sun4u
#include <cmd_dp_page.h>
#endif
#include <errno.h>
#include <strings.h>
static void
{
sizeof (cmd_page_pers_t));
}
static void
{
}
if (destroy)
}
void
{
}
static cmd_page_t *
{
return (page);
}
return (NULL);
}
{
(u_longlong_t)pa);
page->page_physbase)) != 0 ||
(u_longlong_t)pa);
return (page);
}
{
return (page_lookup_by_physaddr(pa));
}
static cmd_page_t *
{
if (oldsz != sizeof (cmd_page_0_t)) {
"version 0 state (%u bytes).\n", sizeof (cmd_page_0_t));
}
return (new);
}
static cmd_page_t *
{
if (psz != sizeof (cmd_page_pers_t)) {
"version 1 state (%u bytes).\n", sizeof (cmd_page_pers_t));
}
return (page);
}
void *
{
break;
}
int migrated = 0;
"found. Case is already solved or closed\n",
return (NULL);
} else {
"does not exist in saved state\n",
}
} else if (pagesz > CMD_PAGE_MAXSIZE ||
pagesz < CMD_PAGE_MINSIZE) {
"is out of bounds (is %u bytes, max %u, min %u)\n",
}
}
page->page_version);
if (CMD_PAGE_VERSIONED(page)) {
switch (page->page_version) {
case CMD_PAGE_VERSION_1:
pagesz);
break;
default:
"for page state referenced by case %s.\n",
break;
}
} else {
migrated = 1;
}
if (migrated) {
/* CMD_STAT_BUMP(page_migrat); */
}
}
switch (ptr->ptr_subtype) {
case BUG_PTR_PAGE_CASE:
/*FALLTHROUGH*/
case CMD_PTR_PAGE_CASE:
break;
#ifdef sun4u
case CMD_PTR_DP_PAGE_DEFER:
break;
#endif
default:
}
return (page);
}
/*ARGSUSED*/
void
{
#ifdef sun4u
continue;
#endif
}
}
}
void
{
sizeof (cmd_page_pers_t))
/* No need to rewrite the FMRIs in the page - they don't change */
sizeof (cmd_page_pers_t));
}
void
{
}