ia64/linux-2.6.18-xen.hg

annotate arch/sparc/prom/segment.c @ 0:831230e53067

Import 2.6.18 from kernel.org tarball.
author Ian Campbell <ian.campbell@xensource.com>
date Wed Apr 11 14:15:44 2007 +0100 (2007-04-11)
parents
children
rev   line source
ian@0 1 /* $Id: segment.c,v 1.7 2000/08/26 02:38:03 anton Exp $
ian@0 2 * segment.c: Prom routine to map segments in other contexts before
ian@0 3 * a standalone is completely mapped. This is for sun4 and
ian@0 4 * sun4c architectures only.
ian@0 5 *
ian@0 6 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
ian@0 7 */
ian@0 8
ian@0 9 #include <linux/types.h>
ian@0 10 #include <linux/kernel.h>
ian@0 11 #include <linux/sched.h>
ian@0 12 #include <asm/openprom.h>
ian@0 13 #include <asm/oplib.h>
ian@0 14
ian@0 15 extern void restore_current(void);
ian@0 16
ian@0 17 /* Set physical segment 'segment' at virtual address 'vaddr' in
ian@0 18 * context 'ctx'.
ian@0 19 */
ian@0 20 void
ian@0 21 prom_putsegment(int ctx, unsigned long vaddr, int segment)
ian@0 22 {
ian@0 23 unsigned long flags;
ian@0 24 spin_lock_irqsave(&prom_lock, flags);
ian@0 25 (*(romvec->pv_setctxt))(ctx, (char *) vaddr, segment);
ian@0 26 restore_current();
ian@0 27 spin_unlock_irqrestore(&prom_lock, flags);
ian@0 28 return;
ian@0 29 }