|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * The contents of this file constitute Original Code as defined in and ! 7: * are subject to the Apple Public Source License Version 1.1 (the ! 8: * "License"). You may not use this file except in compliance with the ! 9: * License. Please obtain a copy of the License at ! 10: * http://www.apple.com/publicsource and read it before using this file. ! 11: * ! 12: * This Original Code and all software distributed under the License are ! 13: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 14: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 15: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 16: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 17: * License for the specific language governing rights and limitations ! 18: * under the License. ! 19: * ! 20: * @APPLE_LICENSE_HEADER_END@ ! 21: */ ! 22: /* ! 23: * @OSF_FREE_COPYRIGHT@ ! 24: * ! 25: */ ! 26: ! 27: #ifndef _PPC_KKT_H_ ! 28: #define _PPC_KKT_H_ ! 29: ! 30: #include <norma_scsi.h> ! 31: #include <dipc_xkern.h> ! 32: ! 33: #if NORMA_SCSI ! 34: #define splkkt splbio ! 35: #elif DIPC_XKERN ! 36: /* ! 37: * With DIPC/KKT/x-kernel, the whole protocol stack ! 38: * is executed in thread context. Thus, splkkt results ! 39: * in a no-op. ! 40: */ ! 41: #include <cpus.h> ! 42: #if NCPUS > 1 ! 43: ! 44: #if defined(__GNUC__) ! 45: #include <kern/spl.h> ! 46: #include <ppc/cpu_number.h> ! 47: ! 48: #warning This code has been compiled but not tested ! 49: ! 50: extern int curr_ipl[]; ! 51: extern spl_t __inline__ splkkt(void); ! 52: ! 53: extern spl_t __inline__ splkkt(void) { ! 54: spl_t ss; ! 55: disable_preemption(); ! 56: ss = (spl_t)curr_ipl[cpu_number()]; ! 57: enable_preemption(); ! 58: return ss; ! 59: } ! 60: #else /* __GNUC__ */ ! 61: #error Not implemented ! 62: #endif /* __GNUC__ */ ! 63: ! 64: #else /* NCPUS == 1 */ ! 65: ! 66: extern int curr_ipl; ! 67: #define splkkt() ((spl_t)curr_ipl) ! 68: ! 69: #endif /* NCPUS == 1 */ ! 70: #endif /* DIPC_XKERN */ ! 71: ! 72: typedef struct transport { ! 73: struct request_block *next; ! 74: #if NORMA_SCSI ! 75: void *kkte; ! 76: #else /* NORMA_SCSI */ ! 77: vm_offset_t save_address; ! 78: vm_size_t save_size; ! 79: boolean_t save_sg; ! 80: #endif /* NORMA_SCSI */ ! 81: } transport_t; ! 82: ! 83: #endif /* _PPC_KKT_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.