~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to arch/tile/include/asm/hv_driver.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2010 Tilera Corporation. All Rights Reserved.
 
3
 *
 
4
 *   This program is free software; you can redistribute it and/or
 
5
 *   modify it under the terms of the GNU General Public License
 
6
 *   as published by the Free Software Foundation, version 2.
 
7
 *
 
8
 *   This program is distributed in the hope that it will be useful, but
 
9
 *   WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 *   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
 
11
 *   NON INFRINGEMENT.  See the GNU General Public License for
 
12
 *   more details.
 
13
 *
 
14
 * This header defines a wrapper interface for managing hypervisor
 
15
 * device calls that will result in an interrupt at some later time.
 
16
 * In particular, this provides wrappers for hv_preada() and
 
17
 * hv_pwritea().
 
18
 */
 
19
 
 
20
#ifndef _ASM_TILE_HV_DRIVER_H
 
21
#define _ASM_TILE_HV_DRIVER_H
 
22
 
 
23
#include <hv/hypervisor.h>
 
24
 
 
25
struct hv_driver_cb;
 
26
 
 
27
/* A callback to be invoked when an operation completes. */
 
28
typedef void hv_driver_callback_t(struct hv_driver_cb *cb, __hv32 result);
 
29
 
 
30
/*
 
31
 * A structure to hold information about an outstanding call.
 
32
 * The driver must allocate a separate structure for each call.
 
33
 */
 
34
struct hv_driver_cb {
 
35
        hv_driver_callback_t *callback;  /* Function to call on interrupt. */
 
36
        void *dev;                       /* Driver-specific state variable. */
 
37
};
 
38
 
 
39
/* Wrapper for invoking hv_dev_preada(). */
 
40
static inline int
 
41
tile_hv_dev_preada(int devhdl, __hv32 flags, __hv32 sgl_len,
 
42
                   HV_SGL sgl[/* sgl_len */], __hv64 offset,
 
43
                   struct hv_driver_cb *callback)
 
44
{
 
45
        return hv_dev_preada(devhdl, flags, sgl_len, sgl,
 
46
                             offset, (HV_IntArg)callback);
 
47
}
 
48
 
 
49
/* Wrapper for invoking hv_dev_pwritea(). */
 
50
static inline int
 
51
tile_hv_dev_pwritea(int devhdl, __hv32 flags, __hv32 sgl_len,
 
52
                    HV_SGL sgl[/* sgl_len */], __hv64 offset,
 
53
                    struct hv_driver_cb *callback)
 
54
{
 
55
        return hv_dev_pwritea(devhdl, flags, sgl_len, sgl,
 
56
                              offset, (HV_IntArg)callback);
 
57
}
 
58
 
 
59
 
 
60
#endif /* _ASM_TILE_HV_DRIVER_H */