summaryrefslogtreecommitdiffstats
path: root/apps/ecparam.c
AgeCommit message (Expand)Author
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
2015-01-22mark all block comments that need format preserving so thatTim Hudson
2014-02-14Fix various spelling errorsScott Schaefer
2010-06-15Fix warnings (From HEAD, original patch by Ben).Dr. Stephen Henson
2009-04-23Make no-ec workDr. Stephen Henson
2005-05-31include opensslconf.h if OPENSSL_NO_* is usedNils Larsch
2005-05-16ecc api cleanup; summary:Nils Larsch
2005-05-10give EC_GROUP_new_by_nid a more meanigful name:Nils Larsch
2005-04-05some const fixesNils Larsch
2004-10-21Update ECDSA and ECDH for OPENSSL_NO_ENGINE.Geoff Thorpe
2004-03-25Adds warnings about two curves and fixes the "seed" value for two otherGeoff Thorpe
2004-01-24Fix declaration inconsistency in ecparam.c.Andy Polyakov
2003-01-16avoid potential confusion about curves (prime192v1 and prime256v1 areBodo Möller
2002-12-03EXIT() may mean return(). That's confusing, so let's have it really meanRichard Levitte
2002-10-29Sun has agreed to removing the covenant language from most files.Bodo Möller
2002-09-02change API for looking at the internal curve listBodo Möller
2002-08-27change 'usage' formattingBodo Möller
2002-08-26fix spacingBodo Möller
2002-08-16typoBodo Möller
2002-08-15Simplify handling of named curves: get rid of EC_GROUP_new_by_name(),Bodo Möller
2002-08-07use a generic EC_KEY structure (EC keys are not ECDSA specific)Bodo Möller
2002-08-02extend curve list (additional curves over binary fields)Bodo Möller
2002-07-14Replace 'ecdsaparam' commandline utility by 'ecparam'Bodo Möller
{ 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 */
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _XEN_MULTICALLS_H
#define _XEN_MULTICALLS_H

#include <trace/events/xen.h>

#include "xen-ops.h"

/* Multicalls */
struct multicall_space
{
	struct multicall_entry *mc;
	void *args;
};

/* Allocate room for a multicall and its args */
struct multicall_space __xen_mc_entry(size_t args);

DECLARE_PER_CPU(unsigned long, xen_mc_irq_flags);

/* Call to start a batch of multiple __xen_mc_entry()s.  Must be
   paired with xen_mc_issue() */
static inline void xen_mc_batch(void)
{
	unsigned long flags;

	/* need to disable interrupts until this entry is complete */
	local_irq_save(flags);
	trace_xen_mc_batch(paravirt_get_lazy_mode());
	__this_cpu_write(xen_mc_irq_flags, flags);
}

static inline struct multicall_space xen_mc_entry(size_t args)
{
	xen_mc_batch();
	return __xen_mc_entry(args);
}

/* Flush all pending multicalls */
void xen_mc_flush(void);

/* Issue a multicall if we're not in a lazy mode */
static inline void xen_mc_issue(unsigned mode)
{
	trace_xen_mc_issue(mode);

	if ((paravirt_get_lazy_mode() & mode) == 0)
		xen_mc_flush();

	/* restore flags saved in xen_mc_batch */
	local_irq_restore(this_cpu_read(xen_mc_irq_flags));
}

/* Set up a callback to be called when the current batch is flushed */
void xen_mc_callback(void (*fn)(void *), void *data);

/*
 * Try to extend the arguments of the previous multicall command.  The
 * previous command's op must match.  If it does, then it attempts to
 * extend the argument space allocated to the multicall entry by
 * arg_size bytes.
 *
 * The returned multicall_space will return with mc pointing to the
 * command on success, or NULL on failure, and args pointing to the
 * newly allocated space.
 */
struct multicall_space xen_mc_extend_args(unsigned long op, size_t arg_size);

#endif /* _XEN_MULTICALLS_H */