/* * Copyright 2014 IBM Corp. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #ifndef _MISC_CXL_BASE_H #define _MISC_CXL_BASE_H #include #ifdef CONFIG_CXL_BASE #define CXL_IRQ_RANGES 4 struct cxl_irq_ranges { irq_hw_number_t offset[CXL_IRQ_RANGES]; irq_hw_number_t range[CXL_IRQ_RANGES]; }; extern atomic_t cxl_use_count; static inline bool cxl_ctx_in_use(void) { return (atomic_read(&cxl_use_count) != 0); } static inline void cxl_ctx_get(void) { atomic_inc(&cxl_use_count); } static inline void cxl_ctx_put(void) { atomic_dec(&cxl_use_count); } struct cxl_afu *cxl_afu_get(struct cxl_afu *afu); void cxl_afu_put(struct cxl_afu *afu); void cxl_slbia(struct mm_struct *mm); bool cxl_pci_associate_default_context(struct pci_dev *dev, struct cxl_afu *afu); void cxl_pci_disable_device(struct pci_dev *dev); int cxl_cx4_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type); void cxl_cx4_teardown_msi_irqs(struct pci_dev *pdev); #else /* CONFIG_CXL_BASE */ static inline bool cxl_ctx_in_use(void) { return false; } static inline struct cxl_afu *cxl_afu_get(struct cxl_afu *afu) { return NULL; } static inline void cxl_afu_put(struct cxl_afu *afu) {} static inline void cxl_slbia(struct mm_struct *mm) {} static inline bool cxl_pci_associate_default_context(struct pci_dev *dev, struct cxl_afu *afu) { return false; } static inline void cxl_pci_disable_device(struct pci_dev *dev) {} static inline int cxl_cx4_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) { return -ENODEV; } static inline void cxl_cx4_teardown_msi_irqs(struct pci_dev *pdev) {} #endif /* CONFIG_CXL_BASE */ #endif b1e806d20762ea6327b43d'>treecommitdiff
path: root/include
AgeCommit message (Expand)AuthorFilesLines
2017-02-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-nextDavid S. Miller11-40/+60
2017-02-03sched: cls_flower: expose priority to offloading netdeviceJiri Pirko1-0/+1
2017-02-03lib: Introduce priority array area managerJiri Pirko1-0/+76
2017-02-03list: introduce list_for_each_entry_from_reverse helperJiri Pirko1-0/+13
2017-02-03trace: rename trace_print_hex_seq arg and add kdocDaniel Borkmann2-3/+3
2017-02-03bridge: uapi: add per vlan tunnel infoRoopa Prabhu3-0/+13
2017-02-03vxlan: support fdb and learning in COLLECT_METADATA modeRoopa Prabhu1-0/+1
2017-02-03ip_tunnels: new IP_TUNNEL_INFO_BRIDGE flag for ip_tunnel_info modeRoopa Prabhu1-0/+1
2017-02-03net/sched: act_ife: Change to use ife moduleYotam Gigi2-10/+1
2017-02-03net: Introduce ife encapsulation moduleYotam Gigi3-0/+70
2017-02-03net/sched: act_ife: Unexport ife_tlv_meta_encodeYotam Gigi1-2/+0
2017-02-03tcp: add tcp_mss_clamp() helperEric Dumazet1-0/+9
2017-02-02net: add LINUX_MIB_PFMEMALLOCDROP counterEric Dumazet1-0/+1
2017-02-02net: phy: marvell: Add support for 88e1545 PHYAndrew Lunn1-0/+1
2017-02-02unix: add ioctl to open a unix socket file with O_PATHAndrey Vagin1-0/+2
2017-02-02net: phy: Marvell: Add mv88e6390 internal PHYAndrew Lunn1-0/+6
2017-02-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller9-30/+40
2017-02-02netfilter: allow logging from non-init namespacesMichal Kubeček1-0/+3
2017-02-02ipvs: free ip_vs_dest structs when refcnt=0David Windsor1-1/+1
2017-02-02netfilter: merge ctinfo into nfct pointer storage areaFlorian Westphal2-17/+15
2017-02-02netfilter: guarantee 8 byte minalign for template addressesFlorian Westphal1-0/+2
2017-02-02netfilter: add and use nf_ct_set helperFlorian Westphal2-2/+9
2017-02-02skbuff: add and use skb_nfct helperFlorian Westphal2-4/+11
2017-02-02netfilter: reduce direct skb->nfct usageFlorian Westphal1-3/+6
2017-02-02netfilter: conntrack: no need to pass ctinfo to error handlerFlorian Westphal1-1/+1