11.3Spooka/*	$NetBSD: rump_generic_cpu.c,v 1.3 2016/01/26 23:12:18 pooka Exp $	*/
21.1Spooka
31.1Spooka/*
41.1Spooka * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
51.1Spooka *
61.1Spooka * Development of this software was supported by the
71.1Spooka * Finnish Cultural Foundation
81.1Spooka *
91.1Spooka * Redistribution and use in source and binary forms, with or without
101.1Spooka * modification, are permitted provided that the following conditions
111.1Spooka * are met:
121.1Spooka * 1. Redistributions of source code must retain the above copyright
131.1Spooka *    notice, this list of conditions and the following disclaimer.
141.1Spooka * 2. Redistributions in binary form must reproduce the above copyright
151.1Spooka *    notice, this list of conditions and the following disclaimer in the
161.1Spooka *    documentation and/or other materials provided with the distribution.
171.1Spooka *
181.1Spooka * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
191.1Spooka * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
201.1Spooka * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
211.1Spooka * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
221.1Spooka * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
231.1Spooka * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
241.1Spooka * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
251.1Spooka * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
261.1Spooka * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
271.1Spooka * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
281.1Spooka * SUCH DAMAGE.
291.1Spooka */
301.1Spooka
311.1Spooka#include <sys/cdefs.h>
321.3Spooka__KERNEL_RCSID(0, "$NetBSD: rump_generic_cpu.c,v 1.3 2016/01/26 23:12:18 pooka Exp $");
331.1Spooka
341.1Spooka#include <sys/param.h>
351.1Spooka
361.3Spooka#include <rump-sys/kern.h>
371.1Spooka
381.1Spookastruct cpu_info *rumpcpu_info_list;
391.1Spooka
401.1Spookavoid
411.1Spookarump_cpu_attach(struct cpu_info *ci)
421.1Spooka{
431.1Spooka	static int nattached;
441.1Spooka
451.1Spooka	/* XXX: wrong order, but ... */
461.1Spooka	ci->ci_next = rumpcpu_info_list;
471.1Spooka	rumpcpu_info_list = ci;
481.1Spooka
491.1Spooka	ci->ci_index = nattached++;
501.1Spooka
511.1Spooka	kcpuset_set(kcpuset_attached, cpu_index(ci));
521.1Spooka	kcpuset_set(kcpuset_running, cpu_index(ci));
531.1Spooka}
541.2Spooka
551.2Spookastruct clockframe *
561.2Spookarump_cpu_makeclockframe(void)
571.2Spooka{
581.2Spooka
591.2Spooka	return NULL;
601.2Spooka}
61