4
  #   ˆl–ß=¿JÅ!¶e8 EpÜ TÅ£Ìƒ!wËÃÉ %    /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
 * Interfaces for vfio-ccw
 *
 * Copyright IBM Corp. 2017
 *
 * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
 */

#ifndef _VFIO_CCW_H_
#define _VFIO_CCW_H_

#include <linux/types.h>

/* used for START SUBCHANNEL, always present */
struct ccw_io_region {
#define ORB_AREA_SIZE 12
	__u8	orb_area[ORB_AREA_SIZE];
#define SCSW_AREA_SIZE 12
	__u8	scsw_area[SCSW_AREA_SIZE];
#define IRB_AREA_SIZE 96
	__u8	irb_area[IRB_AREA_SIZE];
	__u32	ret_code;
} __attribute__((packed));

/*
 * used for processing commands that trigger asynchronous actions
 * Note: this is controlled by a capability
 */
#define VFIO_CCW_ASYNC_CMD_HSCH (1 << 0)
#define VFIO_CCW_ASYNC_CMD_CSCH (1 << 1)
struct ccw_cmd_region {
	__u32 command;
	__u32 ret_code;
} __attribute__((packed));

/*
 * Used for processing commands that read the subchannel-information block
 * Reading this region triggers a stsch() to hardware
 * Note: this is controlled by a capability
 */
struct ccw_schib_region {
#define SCHIB_AREA_SIZE 52
	__u8 schib_area[SCHIB_AREA_SIZE];
} __attribute__((packed));

/*
 * Used for returning a Channel Report Word to userspace.
 * Note: this is controlled by a capability
 */
struct ccw_crw_region {
	__u32 crw;
	__u32 pad;
} __attribute__((packed));

#endif
  1   ˆl–ß=¿J	µ2ÛR‚ œP ¸'n4Ú˜´oÍ938_�uÐb&=LyZof¯ÅË ª    ‹     ­UMoÛ8½ëW|Ø&…-»)ºi÷æMÔ@ã–ÚE]hq$±¥H…Nuéoß!-;Îa·‡Z°›ïÍ¼y3~UNÀ%iñ&ù×¼ÈînËÙçÛìK9Ë³¢ø”•¤y¶ù²ºÉ&0yOozÙÁ:ì8\½»zþ5ów3‹ÎIL-š�¨p’¤?ûÝ'¢¼†[¬…B°ºCèµql+¤pXçëúŒL?÷‰(­sý_óùÖ76å¸L¥Ú4ów‹ë?¯ßžž�Â:›6ÊÇ}fªVìpÞºNÎ£ëz~µX|˜-®æ�m‹Å›·iØ;W¤¡Ti)·°|„ò‚=&)JØ?ãê«³’Lkæ¥ƒZ›Ž9'TsF
.,ÛJ„vè[TÌ	­’Tµ/ö¾yëD-ª¸Œ‡pøƒ>4H¬tÌ4B�Vr¸LRÆAžU†»åj7÷ë"[�ËM‘ÃÇl“ÁësÑäÔÕëå]6Iþ§I¡œÁ?LÄR “zTœêá,à•³A’-éÉ—È÷Àù×õýC¾Ê©Éed(G
#ÉþÊm–ßlVÅê~½¿U´ÂÂ!ŽŠÈmRÖÆ;AêMBôO!D¯œ�1ÈC\-sÖ)<TðèÑ#‡íp€¡Ë×—Éó‰Þè
­EN±ÁÊñ3¨�%†^Mˆ‰ú”þÄLHßîAÈC•Þ¡Ù£äûø-ùe€ÞSpdwšÉÚp4´Œ�E¹£Ó¬v´ Ü‘3èOû{Ýc&£ìØõn ¦(YY¯>ÛPžôUi+ÝuT¿YP®h)L’V ¥¡ñÌ0åÒ�¹@M¡'¹í3EóµÇ*t
8Ñá”p*æ-ÆP¿£Q4+¸¦|ŽPV±«˜TÕ­´·r˜F*¤ÉMm	ÃÆJ7ÊçØw’
ˆ{ ©C†Ä·— 
3ß ã#“Vã\&Ÿ¹C	(Ñ^ú¦¡ˆgL"`Å’+ò)ãÓƒr$a«½ä`ýÖVFl#ã©õQW±PJáÓ3!YBDý‡'‚Ê¤#ÇÑ �J«Z4ÞÄ©3üAÚº£&G%ˆ¨ï‘™iLˆˆh
Š"üíAÍ„ô�:ˆÅÔ´w�6öÓøû�XÈˆnèPQe;Fï†>ªú?xŠ,øËNöÖ³`+õõƒ&ÛYÑ¨8K•e>8„„é�)í=ÂÇæõÊ dŽ:ŽýçJ–ÁòS~?í~ÒÇÓ“éVÞ_&ÿÞEœÀ       ˆÏÎƒYgÍÅË U    #ifndef __LINUX_SPINLOCK_UP_H
#define __LINUX_SPINLOCK_UP_H

#ifndef __LINUX_INSIDE_SPINLOCK_H
# error "please don't include this file directly"
#endif

#include <asm/processor.h>	/* for cpu_relax() */
#include <asm/barrier.h>

/*
 * include/linux/spinlock_up.h - UP-debug version of spinlocks.
 *
 * portions Copyright 2005, Red Hat, Inc., Ingo Molnar
 * Released under the General Public License (GPL).
 *
 * In the debug case, 1 means unlocked, 0 means locked. (the values
 * are inverted, to catch initialization bugs)
 *
 * No atomicity anywhere, we are on UP. However, we still need
 * the compiler barriers, because we do not want the compiler to
 * move potentially faulting instructions (notably user accesses)
 * into the locked sequence, resulting in non-atomic execution.
 */

#ifdef CONFIG_DEBUG_SPINLOCK
#define arch_spin_is_locked(x)		((x)->slock == 0)

static inline void arch_spin_lock(arch_spinlock_t *lock)
{
	lock->slock = 0;
	barrier();
}

static inline int arch_spin_trylock(arch_spinlock_t *lock)
{
	char oldval = lock->slock;

	lock->slock = 0;
	barrier();

	return oldval > 0;
}

static inline void arch_spin_unlock(arch_spinlock_t *lock)
{
	barrier();
	lock->slock = 1;
}

/*
 * Read-write spinlocks. No debug version.
 */
#define arch_read_lock(lock)		do { barrier(); (void)(lock); } while (0)
#define arch_write_lock(lock)		do { barrier(); (void)(lock); } while (0)
#define arch_read_trylock(lock)	({ barrier(); (void)(lock); 1; })
#define arch_write_trylock(lock)	({ barrier(); (void)(lock); 1; })
#define arch_read_unlock(lock)		do { barrier(); (void)(lock); } while (0)
#define arch_write_unlock(lock)	do { barrier(); (void)(lock); } while (0)

#else /* DEBU