/*1* segment.c: Prom routine to map segments in other contexts before2* a standalone is completely mapped. This is for sun4 and3* sun4c architectures only.4*5* Copyright (C) 1995 David S. Miller ([email protected])6*/78#include <linux/types.h>9#include <linux/kernel.h>10#include <linux/sched.h>11#include <asm/openprom.h>12#include <asm/oplib.h>1314extern void restore_current(void);1516/* Set physical segment 'segment' at virtual address 'vaddr' in17* context 'ctx'.18*/19void20prom_putsegment(int ctx, unsigned long vaddr, int segment)21{22unsigned long flags;23spin_lock_irqsave(&prom_lock, flags);24(*(romvec->pv_setctxt))(ctx, (char *) vaddr, segment);25restore_current();26spin_unlock_irqrestore(&prom_lock, flags);27}282930