ia64/linux-2.6.18-xen.hg

annotate drivers/char/rio/cmdpkt.h @ 893:f994bfe9b93b

linux/blktap2: reduce TLB flush scope

c/s 885 added very coarse TLB flushing. Since these flushes always
follow single page updates, single page flushes (when available) are
sufficient.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 04 10:32:57 2009 +0100 (2009-06-04)
parents 831230e53067
children
rev   line source
ian@0 1 /*
ian@0 2 ** -----------------------------------------------------------------------------
ian@0 3 **
ian@0 4 ** Perle Specialix driver for Linux
ian@0 5 ** Ported from existing RIO Driver for SCO sources.
ian@0 6 *
ian@0 7 * (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
ian@0 8 *
ian@0 9 * This program is free software; you can redistribute it and/or modify
ian@0 10 * it under the terms of the GNU General Public License as published by
ian@0 11 * the Free Software Foundation; either version 2 of the License, or
ian@0 12 * (at your option) any later version.
ian@0 13 *
ian@0 14 * This program is distributed in the hope that it will be useful,
ian@0 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ian@0 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ian@0 17 * GNU General Public License for more details.
ian@0 18 *
ian@0 19 * You should have received a copy of the GNU General Public License
ian@0 20 * along with this program; if not, write to the Free Software
ian@0 21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
ian@0 22 **
ian@0 23 ** Module : cmdpkt.h
ian@0 24 ** SID : 1.2
ian@0 25 ** Last Modified : 11/6/98 11:34:09
ian@0 26 ** Retrieved : 11/6/98 11:34:20
ian@0 27 **
ian@0 28 ** ident @(#)cmdpkt.h 1.2
ian@0 29 **
ian@0 30 ** -----------------------------------------------------------------------------
ian@0 31 */
ian@0 32 #ifndef __rio_cmdpkt_h__
ian@0 33 #define __rio_cmdpkt_h__
ian@0 34
ian@0 35 #ifdef SCCS_LABELS
ian@0 36 #ifndef lint
ian@0 37 static char *_cmdpkt_h_sccs_ = "@(#)cmdpkt.h 1.2";
ian@0 38 #endif
ian@0 39 #endif
ian@0 40
ian@0 41 /*
ian@0 42 ** overlays for the data area of a packet. Used in both directions
ian@0 43 ** (to build a packet to send, and to interpret a packet that arrives)
ian@0 44 ** and is very inconvenient for MIPS, so they appear as two separate
ian@0 45 ** structures - those used for modifying/reading packets on the card
ian@0 46 ** and those for modifying/reading packets in real memory, which have an _M
ian@0 47 ** suffix.
ian@0 48 */
ian@0 49
ian@0 50 #define RTA_BOOT_DATA_SIZE (PKT_MAX_DATA_LEN-2)
ian@0 51
ian@0 52 /*
ian@0 53 ** The boot information packet looks like this:
ian@0 54 ** This structure overlays a PktCmd->CmdData structure, and so starts
ian@0 55 ** at Data[2] in the actual pkt!
ian@0 56 */
ian@0 57 struct BootSequence {
ian@0 58 u16 NumPackets;
ian@0 59 u16 LoadBase;
ian@0 60 u16 CodeSize;
ian@0 61 };
ian@0 62
ian@0 63 #define BOOT_SEQUENCE_LEN 8
ian@0 64
ian@0 65 struct SamTop {
ian@0 66 u8 Unit;
ian@0 67 u8 Link;
ian@0 68 };
ian@0 69
ian@0 70 struct CmdHdr {
ian@0 71 u8 PcCommand;
ian@0 72 union {
ian@0 73 u8 PcPhbNum;
ian@0 74 u8 PcLinkNum;
ian@0 75 u8 PcIDNum;
ian@0 76 } U0;
ian@0 77 };
ian@0 78
ian@0 79
ian@0 80 struct PktCmd {
ian@0 81 union {
ian@0 82 struct {
ian@0 83 struct CmdHdr CmdHdr;
ian@0 84 struct BootSequence PcBootSequence;
ian@0 85 } S1;
ian@0 86 struct {
ian@0 87 u16 PcSequence;
ian@0 88 u8 PcBootData[RTA_BOOT_DATA_SIZE];
ian@0 89 } S2;
ian@0 90 struct {
ian@0 91 u16 __crud__;
ian@0 92 u8 PcUniqNum[4]; /* this is really a uint. */
ian@0 93 u8 PcModuleTypes; /* what modules are fitted */
ian@0 94 } S3;
ian@0 95 struct {
ian@0 96 struct CmdHdr CmdHdr;
ian@0 97 u8 __undefined__;
ian@0 98 u8 PcModemStatus;
ian@0 99 u8 PcPortStatus;
ian@0 100 u8 PcSubCommand; /* commands like mem or register dump */
ian@0 101 u16 PcSubAddr; /* Address for command */
ian@0 102 u8 PcSubData[64]; /* Date area for command */
ian@0 103 } S4;
ian@0 104 struct {
ian@0 105 struct CmdHdr CmdHdr;
ian@0 106 u8 PcCommandText[1];
ian@0 107 u8 __crud__[20];
ian@0 108 u8 PcIDNum2; /* It had to go somewhere! */
ian@0 109 } S5;
ian@0 110 struct {
ian@0 111 struct CmdHdr CmdHdr;
ian@0 112 struct SamTop Topology[LINKS_PER_UNIT];
ian@0 113 } S6;
ian@0 114 } U1;
ian@0 115 };
ian@0 116
ian@0 117 struct PktCmd_M {
ian@0 118 union {
ian@0 119 struct {
ian@0 120 struct {
ian@0 121 u8 PcCommand;
ian@0 122 union {
ian@0 123 u8 PcPhbNum;
ian@0 124 u8 PcLinkNum;
ian@0 125 u8 PcIDNum;
ian@0 126 } U0;
ian@0 127 } CmdHdr;
ian@0 128 struct {
ian@0 129 u16 NumPackets;
ian@0 130 u16 LoadBase;
ian@0 131 u16 CodeSize;
ian@0 132 } PcBootSequence;
ian@0 133 } S1;
ian@0 134 struct {
ian@0 135 u16 PcSequence;
ian@0 136 u8 PcBootData[RTA_BOOT_DATA_SIZE];
ian@0 137 } S2;
ian@0 138 struct {
ian@0 139 u16 __crud__;
ian@0 140 u8 PcUniqNum[4]; /* this is really a uint. */
ian@0 141 u8 PcModuleTypes; /* what modules are fitted */
ian@0 142 } S3;
ian@0 143 struct {
ian@0 144 u16 __cmd_hdr__;
ian@0 145 u8 __undefined__;
ian@0 146 u8 PcModemStatus;
ian@0 147 u8 PcPortStatus;
ian@0 148 u8 PcSubCommand;
ian@0 149 u16 PcSubAddr;
ian@0 150 u8 PcSubData[64];
ian@0 151 } S4;
ian@0 152 struct {
ian@0 153 u16 __cmd_hdr__;
ian@0 154 u8 PcCommandText[1];
ian@0 155 u8 __crud__[20];
ian@0 156 u8 PcIDNum2; /* Tacked on end */
ian@0 157 } S5;
ian@0 158 struct {
ian@0 159 u16 __cmd_hdr__;
ian@0 160 struct Top Topology[LINKS_PER_UNIT];
ian@0 161 } S6;
ian@0 162 } U1;
ian@0 163 };
ian@0 164
ian@0 165 #define Command U1.S1.CmdHdr.PcCommand
ian@0 166 #define PhbNum U1.S1.CmdHdr.U0.PcPhbNum
ian@0 167 #define IDNum U1.S1.CmdHdr.U0.PcIDNum
ian@0 168 #define IDNum2 U1.S5.PcIDNum2
ian@0 169 #define LinkNum U1.S1.CmdHdr.U0.PcLinkNum
ian@0 170 #define Sequence U1.S2.PcSequence
ian@0 171 #define BootData U1.S2.PcBootData
ian@0 172 #define BootSequence U1.S1.PcBootSequence
ian@0 173 #define UniqNum U1.S3.PcUniqNum
ian@0 174 #define ModemStatus U1.S4.PcModemStatus
ian@0 175 #define PortStatus U1.S4.PcPortStatus
ian@0 176 #define SubCommand U1.S4.PcSubCommand
ian@0 177 #define SubAddr U1.S4.PcSubAddr
ian@0 178 #define SubData U1.S4.PcSubData
ian@0 179 #define CommandText U1.S5.PcCommandText
ian@0 180 #define RouteTopology U1.S6.Topology
ian@0 181 #define ModuleTypes U1.S3.PcModuleTypes
ian@0 182
ian@0 183 #endif