~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to roms/skiboot/include/opal-msg.h

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright 2013-2014 IBM Corp.
 
2
 *
 
3
 * Licensed under the Apache License, Version 2.0 (the "License");
 
4
 * you may not use this file except in compliance with the License.
 
5
 * You may obtain a copy of the License at
 
6
 *
 
7
 *      http://www.apache.org/licenses/LICENSE-2.0
 
8
 *
 
9
 * Unless required by applicable law or agreed to in writing, software
 
10
 * distributed under the License is distributed on an "AS IS" BASIS,
 
11
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 
12
 * implied.
 
13
 * See the License for the specific language governing permissions and
 
14
 * limitations under the License.
 
15
 */
 
16
 
 
17
 
 
18
#ifndef __OPALMSG_H
 
19
#define __OPALMSG_H
 
20
 
 
21
#include <opal.h>
 
22
 
 
23
/*
 
24
 * It dictates the number of asynchronous tokens available at the kernel,
 
25
 * ideally the value matches to the number of modules using async
 
26
 * infrastructure, but not necessarily the same..
 
27
 */
 
28
#define OPAL_MAX_ASYNC_COMP     8
 
29
 
 
30
int _opal_queue_msg(enum opal_msg_type msg_type, void *data,
 
31
                    void (*consumed)(void *data), size_t num_params,
 
32
                    const u64 *params);
 
33
 
 
34
#define opal_queue_msg(msg_type, data, cb, ...) \
 
35
        _opal_queue_msg(msg_type, data, cb, \
 
36
                        sizeof((u64[]) {__VA_ARGS__})/sizeof(u64), \
 
37
                        (u64[]) {__VA_ARGS__});
 
38
 
 
39
void opal_init_msg(void);
 
40
 
 
41
#endif /* __OPALMSG_H */