0
     GˆÆÑƒsÅ¿Î &    G#ifndef _LINUX_SCHED_ISOLATION_H
#define _LINUX_SCHED_ISOLATION_H

#include <linux/cpumask.h>
#include <linux/cpuset.h>
#include <linux/init.h>
#include <linux/tick.h>

enum hk_type {
	HK_TYPE_DOMAIN,
	HK_TYPE_MANAGED_IRQ,
	HK_TYPE_KERNEL_NOISE,
	HK_TYPE_MAX,

	/*
	 * The following housekeeping types are only set by the nohz_full
	 * boot commandline option. So they can share the same value.
	 */
	HK_TYPE_TICK    = HK_TYPE_KERNEL_NOISE,
	HK_TYPE_TIMER   = HK_TYPE_KERNEL_NOISE,
	HK_TYPE_RCU     = HK_TYPE_KERNEL_NOISE,
	HK_TYPE_MISC    = HK_TYPE_KERNEL_NOISE,
	HK_TYPE_WQ      = HK_TYPE_KERNEL_NOISE,
	HK_TYPE_KTHREAD = HK_TYPE_KERNEL_NOISE
};

#ifdef CONFIG_CPU_ISOLATION
DECLARE_STATIC_KEY_FALSE(housekeeping_overridden);
extern int housekeeping_any_cpu(enum hk_type type);
extern const struct cpumask *housekeeping_cpumask(enum hk_type type);
extern bool housekeeping_enabled(enum hk_type type);
extern void housekeeping_affine(struct task_struct *t, enum hk_type type);
extern bool housekeeping_test_cpu(int cpu, enum hk_type type);
extern void __init housekeeping_init(void);

#else

static inline int housekeeping_any_cpu(enum hk_type type)
{
	return smp_processor_id();
}

static inline const struct cpumask *housekeeping_cpumask(enum hk_type type)
{
	return cpu_possible_mask;
}

static inline bool housekeeping_enabled(enum hk_type type)
{
	return false;
}

static inline void housekeeping_affine(struct task_struct *t,
				       enum hk_type type) { }

static inline bool housekeeping_test_cpu(int cpu, enum hk_type type)
{
	return true;
}

static inline void housekeeping_init(void) { }
#endif /* CONFIG_CPU_ISOLATION */

static inline bool housekeeping_cpu(int cpu, enum hk_type type)
{
#ifdef CONFIG_CPU_ISOLATION
	if (static_branch_unlikely(&housekeeping_overridden))
		return housekeeping_test_cpu(cpu, type);
#endif
	return true;
}

static inline bool cpu_is_isolated(int cpu)
{
	return !housekeeping_test_cpu(cpu, HK_TYPE_DOMAIN) ||
	       !housekeeping_test_cpu(cpu, HK_TYPE_TICK) ||
	       cpuset_cpu_is_isolated(cpu);
}

#endif /* _LINUX_SCHED_ISOLATION_H */
     Iˆ¾Ñƒh¹¿Î      I0
     Kˆ¾Ñƒh¹¿Î      K1
     MˆÆÑ„Ï6ïÅ¿Î ?÷     M#ifndef _HIL_H_
#define _HIL_H_

/*
 * Hewlett Packard Human Interface Loop (HP-HIL) Protocol -- header.
 *
 * Copyright (c) 2001 Brian S. Julin
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions, and the following disclaimer,
 *    without modification.
 * 2. The name of the author may not be used to endorse or promote products
 *    derived from this software without specific prior written permission.
 *
 * Alternatively, this software may be distributed under the terms of the
 * GNU General Public License ("GPL").
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 *
 * References:
 * HP-HIL Technical Reference Manual.  Hewlett Packard Product No. 45918A
 *
 * A note of thanks to HP for providing and shipping reference materials
 * free of charge to help in the development of HIL support for Linux.
 *
 */

#include <asm/types.h>

/* Physical constants relevant to raw loop/device timing. 
 */ 

#define HIL_CLOCK		8MHZ
#define HIL_EK1_CLOCK		30HZ
#define HIL_EK2_CLOCK		60HZ

#define HIL_TIMEOUT_DEV    