summaryrefslogtreecommitdiffstats
path: root/kernel/include/linux/ramfs.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-07-08 11:53:38 +0200
committerYunhong Jiang <yunhong.jiang@linux.intel.com>2016-07-18 08:10:02 -0700
commitc81c5f9e9856d3149ec81c099dfddca212a50e54 (patch)
treeaed449672211b1eecfc284eb512dc4f0fd512b9c /kernel/include/linux/ramfs.h
parent4304209a4fdfc9b1b8be8f0937ba6a7b7e3557a0 (diff)
KVM: VMX: reflect broken preemption timer in vmcs_config
Simplify cpu_has_vmx_preemption_timer. This is consistent with the rest of setup_vmcs_config and preparatory for the next patch. Tested-by: Wanpeng Li <kernellwp@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Change-Id: I3b33a881c5e47d5d3046e28374d0b0ca363ffad7 upstream-status: backport Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
Diffstat (limited to 'kernel/include/linux/ramfs.h')
0 files changed, 0 insertions, 0 deletions
.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 *  PS3 virtual uart
 *
 *  Copyright (C) 2006 Sony Computer Entertainment Inc.
 *  Copyright 2006 Sony Corp.
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; version 2 of the License.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#if !defined(_PS3_VUART_H)
#define _PS3_VUART_H

#include <asm/ps3.h>

struct ps3_vuart_stats {
	unsigned long bytes_written;
	unsigned long bytes_read;
	unsigned long tx_interrupts;
	unsigned long rx_interrupts;
	unsigned long disconnect_interrupts;
};

struct ps3_vuart_work {
	struct work_struct work;
	unsigned long trigger;
	struct ps3_system_bus_device *dev; /* to convert work to device */
};

/**
 * struct ps3_vuart_port_driver - a driver for a device on a vuart port
 */

struct ps3_vuart_port_driver {
	struct ps3_system_bus_driver core;
	int (*probe)(struct ps3_system_bus_device *);
	int (*remove)(struct ps3_system_bus_device *);
	void (*shutdown)(struct ps3_system_bus_device *);
	void (*work)(struct ps3_system_bus_device *);
	/* int (*tx_event)(struct ps3_system_bus_device *dev); */
	/* int (*rx_event)(struct ps3_system_bus_device *dev); */
	/* int (*disconnect_event)(struct ps3_system_bus_device *dev); */
	/* int (*suspend)(struct ps3_system_bus_device *, pm_message_t); */
	/* int (*resume)(struct ps3_system_bus_device *); */
};

int ps3_vuart_port_driver_register(struct ps3_vuart_port_driver *drv);
void ps3_vuart_port_driver_unregister(struct ps3_vuart_port_driver *drv);

static inline struct ps3_vuart_port_driver *
	ps3_system_bus_dev_to_vuart_drv(struct ps3_system_bus_device *_dev)
{
	struct ps3_system_bus_driver *sbd =
		ps3_system_bus_dev_to_system_bus_drv(_dev);
	BUG_ON(!sbd);
	return container_of(sbd, struct ps3_vuart_port_driver, core);
}
static inline struct ps3_system_bus_device *ps3_vuart_work_to_system_bus_dev(
	struct work_struct *_work)
{
	struct ps3_vuart_work *vw = container_of(_work, struct ps3_vuart_work,
		work);
	return vw->dev;
}

int ps3_vuart_write(struct ps3_system_bus_device *dev, const void *buf,
	unsigned int bytes);
int ps3_vuart_read(struct ps3_system_bus_device *dev, void *buf,
	unsigned int bytes);
int ps3_vuart_read_async(struct ps3_system_bus_device *dev, unsigned int bytes);
void ps3_vuart_cancel_async(struct ps3_system_bus_device *dev);
void ps3_vuart_clear_rx_bytes(struct ps3_system_bus_device *dev,
	unsigned int bytes);

struct vuart_triggers {
	unsigned long rx;
	unsigned long tx;
};

int ps3_vuart_get_triggers(struct ps3_system_bus_device *dev,
	struct vuart_triggers *trig);
int ps3_vuart_set_triggers(struct ps3_system_bus_device *dev, unsigned int tx,
	unsigned int rx);
int ps3_vuart_enable_interrupt_tx(struct ps3_system_bus_device *dev);
int ps3_vuart_disable_interrupt_tx(struct ps3_system_bus_device *dev);
int ps3_vuart_enable_interrupt_rx(struct ps3_system_bus_device *dev);
int ps3_vuart_disable_interrupt_rx(struct ps3_system_bus_device *dev);
int ps3_vuart_enable_interrupt_disconnect(struct ps3_system_bus_device *dev);
int ps3_vuart_disable_interrupt_disconnect(struct ps3_system_bus_device *dev);

#endif