| /kernel/linux/linux-5.10/arch/powerpc/platforms/powernv/ |
| D | pci-cxl.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright 2014-2016 IBM Corp. 7 #include <asm/pnv-pci.h> 14 struct pci_controller *hose = pci_bus_to_host(dev->bus); in pnv_phb_to_cxl_mode() 15 struct pnv_phb *phb = hose->private_data; in pnv_phb_to_cxl_mode() 21 return -ENODEV; in pnv_phb_to_cxl_mode() 25 rc = opal_pci_set_phb_cxl_mode(phb->opal_id, mode, pe->pe_number); in pnv_phb_to_cxl_mode() 27 dev_err(&dev->dev, "Required cxl mode not supported by firmware - update skiboot\n"); in pnv_phb_to_cxl_mode() 29 dev_err(&dev->dev, "opal_pci_set_phb_cxl_mode failed: %i\n", rc); in pnv_phb_to_cxl_mode() 38 int pnv_cxl_alloc_hwirqs(struct pci_dev *dev, int num) in pnv_cxl_alloc_hwirqs() argument [all …]
|
| /kernel/linux/linux-4.19/arch/powerpc/platforms/powernv/ |
| D | pci-cxl.c | 2 * Copyright 2014-2016 IBM Corp. 11 #include <asm/pnv-pci.h> 18 struct pci_controller *hose = pci_bus_to_host(dev->bus); in pnv_phb_to_cxl_mode() 19 struct pnv_phb *phb = hose->private_data; in pnv_phb_to_cxl_mode() 25 return -ENODEV; in pnv_phb_to_cxl_mode() 29 rc = opal_pci_set_phb_cxl_mode(phb->opal_id, mode, pe->pe_number); in pnv_phb_to_cxl_mode() 31 dev_err(&dev->dev, "Required cxl mode not supported by firmware - update skiboot\n"); in pnv_phb_to_cxl_mode() 33 dev_err(&dev->dev, "opal_pci_set_phb_cxl_mode failed: %i\n", rc); in pnv_phb_to_cxl_mode() 42 int pnv_cxl_alloc_hwirqs(struct pci_dev *dev, int num) in pnv_cxl_alloc_hwirqs() argument 44 struct pci_controller *hose = pci_bus_to_host(dev->bus); in pnv_cxl_alloc_hwirqs() [all …]
|
| /kernel/linux/linux-5.10/drivers/gpio/ |
| D | gpio-reg.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * gpio-reg: single register individually fixed-direction GPIOs 8 #include <linux/gpio/gpio-reg.h> 20 const int *irqs; member 29 return r->direction & BIT(offset) ? GPIO_LINE_DIRECTION_IN : in gpio_reg_get_direction() 38 if (r->direction & BIT(offset)) in gpio_reg_direction_output() 39 return -ENOTSUPP; in gpio_reg_direction_output() 41 gc->set(gc, offset, value); in gpio_reg_direction_output() 49 return r->direction & BIT(offset) ? 0 : -ENOTSUPP; in gpio_reg_direction_input() 58 spin_lock_irqsave(&r->lock, flags); in gpio_reg_set() [all …]
|
| /kernel/linux/linux-4.19/drivers/gpio/ |
| D | gpio-reg.c | 2 * gpio-reg: single register individually fixed-direction GPIOs 11 #include <linux/gpio/gpio-reg.h> 23 const int *irqs; member 32 return r->direction & BIT(offset) ? 1 : 0; in gpio_reg_get_direction() 40 if (r->direction & BIT(offset)) in gpio_reg_direction_output() 41 return -ENOTSUPP; in gpio_reg_direction_output() 43 gc->set(gc, offset, value); in gpio_reg_direction_output() 51 return r->direction & BIT(offset) ? 0 : -ENOTSUPP; in gpio_reg_direction_input() 60 spin_lock_irqsave(&r->lock, flags); in gpio_reg_set() 61 val = r->out; in gpio_reg_set() [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/interrupt-controller/ |
| D | fsl,irqsteer.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/interrupt-controller/fsl,irqsteer.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Lucas Stach <l.stach@pengutronix.de> 15 - const: fsl,imx-irqsteer 16 - items: 17 - const: fsl,imx8m-irqsteer 18 - const: fsl,imx-irqsteer 29 - description: output interrupt 0 [all …]
|
| /kernel/linux/linux-4.19/drivers/scsi/cxlflash/ |
| D | ocxl_hw.c | 30 * Pseudo-filesystem to allocate inodes. 43 * ocxlflash_fs_mount() - mount the pseudo-filesystem 67 * ocxlflash_release_mapping() - release the memory mapping 72 if (ctx->mapping) in ocxlflash_release_mapping() 74 ctx->mapping = NULL; in ocxlflash_release_mapping() 78 * ocxlflash_getfile() - allocate pseudo filesystem, inode, and the file 95 if (fops->owner && !try_module_get(fops->owner)) { in ocxlflash_getfile() 97 rc = -ENOENT; in ocxlflash_getfile() 109 inode = alloc_anon_inode(ocxlflash_vfs_mount->mnt_sb); in ocxlflash_getfile() 126 file->private_data = priv; in ocxlflash_getfile() [all …]
|
| /kernel/linux/linux-5.10/drivers/scsi/cxlflash/ |
| D | ocxl_hw.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 28 * Pseudo-filesystem to allocate inodes. 38 return init_pseudo(fc, OCXLFLASH_FS_MAGIC) ? 0 : -ENOMEM; in ocxlflash_fs_init_fs_context() 49 * ocxlflash_release_mapping() - release the memory mapping 54 if (ctx->mapping) in ocxlflash_release_mapping() 56 ctx->mapping = NULL; in ocxlflash_release_mapping() 60 * ocxlflash_getfile() - allocate pseudo filesystem, inode, and the file 77 if (fops->owner && !try_module_get(fops->owner)) { in ocxlflash_getfile() 79 rc = -ENOENT; in ocxlflash_getfile() 91 inode = alloc_anon_inode(ocxlflash_vfs_mount->mnt_sb); in ocxlflash_getfile() [all …]
|
| D | cxl_hw.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 37 static int cxlflash_map_afu_irq(void *ctx_cookie, int num, in cxlflash_map_afu_irq() argument 40 return cxl_map_afu_irq(ctx_cookie, num, handler, cookie, name); in cxlflash_map_afu_irq() 43 static void cxlflash_unmap_afu_irq(void *ctx_cookie, int num, void *cookie) in cxlflash_unmap_afu_irq() argument 45 cxl_unmap_afu_irq(ctx_cookie, num, cookie); in cxlflash_unmap_afu_irq() 100 static int cxlflash_allocate_afu_irqs(void *ctx_cookie, int num) in cxlflash_allocate_afu_irqs() argument 102 return cxl_allocate_afu_irqs(ctx_cookie, num); in cxlflash_allocate_afu_irqs() 131 static int cxlflash_start_work(void *ctx_cookie, u64 irqs) in cxlflash_start_work() argument 135 work.num_interrupts = irqs; in cxlflash_start_work()
|
| /kernel/linux/linux-5.10/arch/powerpc/sysdev/ |
| D | msi_bitmap.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright 2006-2008, Michael Ellerman, IBM Corporation. 14 int msi_bitmap_alloc_hwirqs(struct msi_bitmap *bmp, int num) in msi_bitmap_alloc_hwirqs() argument 17 int offset, order = get_count_order(num); in msi_bitmap_alloc_hwirqs() 19 spin_lock_irqsave(&bmp->lock, flags); in msi_bitmap_alloc_hwirqs() 21 offset = bitmap_find_next_zero_area(bmp->bitmap, bmp->irq_count, 0, in msi_bitmap_alloc_hwirqs() 22 num, (1 << order) - 1); in msi_bitmap_alloc_hwirqs() 23 if (offset > bmp->irq_count) in msi_bitmap_alloc_hwirqs() 26 bitmap_set(bmp->bitmap, offset, num); in msi_bitmap_alloc_hwirqs() 27 spin_unlock_irqrestore(&bmp->lock, flags); in msi_bitmap_alloc_hwirqs() [all …]
|
| /kernel/linux/linux-4.19/arch/powerpc/sysdev/ |
| D | msi_bitmap.c | 2 * Copyright 2006-2008, Michael Ellerman, IBM Corporation. 19 int msi_bitmap_alloc_hwirqs(struct msi_bitmap *bmp, int num) in msi_bitmap_alloc_hwirqs() argument 22 int offset, order = get_count_order(num); in msi_bitmap_alloc_hwirqs() 24 spin_lock_irqsave(&bmp->lock, flags); in msi_bitmap_alloc_hwirqs() 26 offset = bitmap_find_next_zero_area(bmp->bitmap, bmp->irq_count, 0, in msi_bitmap_alloc_hwirqs() 27 num, (1 << order) - 1); in msi_bitmap_alloc_hwirqs() 28 if (offset > bmp->irq_count) in msi_bitmap_alloc_hwirqs() 31 bitmap_set(bmp->bitmap, offset, num); in msi_bitmap_alloc_hwirqs() 32 spin_unlock_irqrestore(&bmp->lock, flags); in msi_bitmap_alloc_hwirqs() 34 pr_debug("msi_bitmap: allocated 0x%x at offset 0x%x\n", num, offset); in msi_bitmap_alloc_hwirqs() [all …]
|
| /kernel/linux/linux-5.10/drivers/usb/gadget/udc/ |
| D | goku_udc.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Toshiba TC86C001 ("Goku-S") USB Device Controller driver 5 * Copyright (C) 2000-2002 Lineo 12 * This device has ep0 and three semi-configurable bulk/interrupt endpoints. 14 * - Endpoint numbering is fixed: ep{1,2,3}-bulk 15 * - Gadget drivers can choose ep maxpacket (8/16/32/64) 16 * - Gadget drivers can choose direction (IN, OUT) 17 * - DMA works with ep1 (OUT transfers) and ep2 (IN transfers). 21 // #define USB_TRACE /* packet-level success messages */ 49 #define DRIVER_VERSION "30-Oct 2003" [all …]
|
| /kernel/linux/linux-4.19/drivers/usb/gadget/udc/ |
| D | goku_udc.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Toshiba TC86C001 ("Goku-S") USB Device Controller driver 5 * Copyright (C) 2000-2002 Lineo 12 * This device has ep0 and three semi-configurable bulk/interrupt endpoints. 14 * - Endpoint numbering is fixed: ep{1,2,3}-bulk 15 * - Gadget drivers can choose ep maxpacket (8/16/32/64) 16 * - Gadget drivers can choose direction (IN, OUT) 17 * - DMA works with ep1 (OUT transfers) and ep2 (IN transfers). 21 // #define USB_TRACE /* packet-level success messages */ 49 #define DRIVER_VERSION "30-Oct 2003" [all …]
|
| /kernel/linux/linux-5.10/arch/powerpc/include/asm/ |
| D | pnv-pci.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 12 #include <misc/cxl-base.h> 13 #include <asm/opal-api.h> 32 int pnv_cxl_alloc_hwirqs(struct pci_dev *dev, int num); 33 void pnv_cxl_release_hwirqs(struct pci_dev *dev, int hwirq, int num); 40 int pnv_cxl_alloc_hwirq_ranges(struct cxl_irq_ranges *irqs, 41 struct pci_dev *dev, int num); 42 void pnv_cxl_release_hwirq_ranges(struct cxl_irq_ranges *irqs,
|
| /kernel/linux/linux-4.19/drivers/irqchip/ |
| D | irq-imgpdc.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright 2010-2013 Imagination Technologies Ltd. 66 * struct pdc_intc_priv - private pdc interrupt data. 71 * @domain: IRQ domain for PDC peripheral and syswake IRQs. 92 iowrite32(data, priv->pdc_base + reg_offs); in pdc_write() 98 return ioread32(priv->pdc_base + reg_offs); in pdc_read() 112 return hw - SYS0_HWIRQ; in hwirq_to_syswake() 122 return (struct pdc_intc_priv *)data->domain->host_data; in irqd_to_priv() 135 raw_spin_lock(&priv->lock); in perip_irq_mask() 136 priv->irq_route &= ~data->mask; in perip_irq_mask() [all …]
|
| /kernel/linux/linux-5.10/drivers/irqchip/ |
| D | irq-imgpdc.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright 2010-2013 Imagination Technologies Ltd. 66 * struct pdc_intc_priv - private pdc interrupt data. 71 * @domain: IRQ domain for PDC peripheral and syswake IRQs. 92 iowrite32(data, priv->pdc_base + reg_offs); in pdc_write() 98 return ioread32(priv->pdc_base + reg_offs); in pdc_read() 112 return hw - SYS0_HWIRQ; in hwirq_to_syswake() 122 return (struct pdc_intc_priv *)data->domain->host_data; in irqd_to_priv() 135 raw_spin_lock(&priv->lock); in perip_irq_mask() 136 priv->irq_route &= ~data->mask; in perip_irq_mask() [all …]
|
| /kernel/linux/linux-4.19/arch/powerpc/include/asm/ |
| D | pnv-pci.h | 16 #include <misc/cxl-base.h> 17 #include <asm/opal-api.h> 41 int pnv_cxl_alloc_hwirqs(struct pci_dev *dev, int num); 42 void pnv_cxl_release_hwirqs(struct pci_dev *dev, int hwirq, int num); 49 int pnv_cxl_alloc_hwirq_ranges(struct cxl_irq_ranges *irqs, 50 struct pci_dev *dev, int num); 51 void pnv_cxl_release_hwirq_ranges(struct cxl_irq_ranges *irqs,
|
| /kernel/linux/linux-5.10/drivers/misc/cxl/ |
| D | api.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 19 * Since we want to track memory mappings to be able to force-unmap 25 * Therefore we implement our own simple pseudo-filesystem and inode 27 * meta-data associated with it (address_space) and it is shared by 39 return init_pseudo(fc, CXL_PSEUDO_FS_MAGIC) ? 0 : -ENOMEM; in cxl_fs_init_fs_context() 52 if (ctx->kernelapi && ctx->mapping) in cxl_release_mapping() 66 if (fops->owner && !try_module_get(fops->owner)) in cxl_getfile() 67 return ERR_PTR(-ENOENT); in cxl_getfile() 76 inode = alloc_anon_inode(cxl_vfs_mount->mnt_sb); in cxl_getfile() 87 file->private_data = priv; in cxl_getfile() [all …]
|
| /kernel/linux/linux-4.19/drivers/s390/cio/ |
| D | airq.c | 1 // SPDX-License-Identifier: GPL-2.0 31 * register_adapter_interrupt() - register adapter interrupt handler 34 * Returns 0 on success, or -EINVAL. 40 if (!airq->handler || airq->isc > MAX_ISC) in register_adapter_interrupt() 41 return -EINVAL; in register_adapter_interrupt() 42 if (!airq->lsi_ptr) { in register_adapter_interrupt() 43 airq->lsi_ptr = kzalloc(1, GFP_KERNEL); in register_adapter_interrupt() 44 if (!airq->lsi_ptr) in register_adapter_interrupt() 45 return -ENOMEM; in register_adapter_interrupt() 46 airq->flags |= AIRQ_PTR_ALLOCATED; in register_adapter_interrupt() [all …]
|
| /kernel/linux/linux-5.10/include/misc/ |
| D | cxl.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 35 * - cxl_dev_context_init() 36 * - cxl_start_context() 37 * - cxl_stop_context() 38 * - cxl_start_context() 39 * - cxl_stop_context() 41 * - cxl_release_context() 52 * Once a context has been inited, IRQs may be configured. Firstly these IRQs 56 * These IRQs can be unmapped (cxl_unmap_afu_irq()) and finally released 92 * Allocate AFU interrupts for this context. num=0 will allocate the default [all …]
|
| /kernel/linux/linux-4.19/include/misc/ |
| D | cxl.h | 39 * - cxl_dev_context_init() 40 * - cxl_start_context() 41 * - cxl_stop_context() 42 * - cxl_start_context() 43 * - cxl_stop_context() 45 * - cxl_release_context() 56 * Once a context has been inited, IRQs may be configured. Firstly these IRQs 60 * These IRQs can be unmapped (cxl_unmap_afu_irq()) and finally released 96 * Allocate AFU interrupts for this context. num=0 will allocate the default 101 int cxl_allocate_afu_irqs(struct cxl_context *cxl, int num); [all …]
|
| /kernel/linux/linux-5.10/drivers/s390/cio/ |
| D | airq.c | 1 // SPDX-License-Identifier: GPL-2.0 35 * register_adapter_interrupt() - register adapter interrupt handler 38 * Returns 0 on success, or -EINVAL. 44 if (!airq->handler || airq->isc > MAX_ISC) in register_adapter_interrupt() 45 return -EINVAL; in register_adapter_interrupt() 46 if (!airq->lsi_ptr) { in register_adapter_interrupt() 47 airq->lsi_ptr = kzalloc(1, GFP_KERNEL); in register_adapter_interrupt() 48 if (!airq->lsi_ptr) in register_adapter_interrupt() 49 return -ENOMEM; in register_adapter_interrupt() 50 airq->flags |= AIRQ_PTR_ALLOCATED; in register_adapter_interrupt() [all …]
|
| /kernel/linux/linux-4.19/drivers/misc/cxl/ |
| D | api.c | 22 * Since we want to track memory mappings to be able to force-unmap 28 * Therefore we implement our own simple pseudo-filesystem and inode 30 * meta-data associated with it (address_space) and it is shared by 61 if (ctx->kernelapi && ctx->mapping) in cxl_release_mapping() 75 if (fops->owner && !try_module_get(fops->owner)) in cxl_getfile() 76 return ERR_PTR(-ENOENT); in cxl_getfile() 85 inode = alloc_anon_inode(cxl_vfs_mount->mnt_sb); in cxl_getfile() 96 file->private_data = priv; in cxl_getfile() 105 module_put(fops->owner); in cxl_getfile() 121 return ERR_PTR(-ENOMEM); in cxl_dev_context_init() [all …]
|
| /kernel/linux/linux-4.19/kernel/irq/ |
| D | matrix.c | 1 // SPDX-License-Identifier: GPL-2.0 43 * irq_alloc_matrix - Allocate a irq_matrix structure and initialize it 62 m->matrix_bits = matrix_bits; in irq_alloc_matrix() 63 m->alloc_start = alloc_start; in irq_alloc_matrix() 64 m->alloc_end = alloc_end; in irq_alloc_matrix() 65 m->alloc_size = alloc_end - alloc_start; in irq_alloc_matrix() 66 m->maps = alloc_percpu(*m->maps); in irq_alloc_matrix() 67 if (!m->maps) { in irq_alloc_matrix() 75 * irq_matrix_online - Bring the local CPU matrix online 80 struct cpumap *cm = this_cpu_ptr(m->maps); in irq_matrix_online() [all …]
|
| /kernel/linux/linux-5.10/kernel/irq/ |
| D | matrix.c | 1 // SPDX-License-Identifier: GPL-2.0 43 * irq_alloc_matrix - Allocate a irq_matrix structure and initialize it 62 m->matrix_bits = matrix_bits; in irq_alloc_matrix() 63 m->alloc_start = alloc_start; in irq_alloc_matrix() 64 m->alloc_end = alloc_end; in irq_alloc_matrix() 65 m->alloc_size = alloc_end - alloc_start; in irq_alloc_matrix() 66 m->maps = alloc_percpu(*m->maps); in irq_alloc_matrix() 67 if (!m->maps) { in irq_alloc_matrix() 75 * irq_matrix_online - Bring the local CPU matrix online 80 struct cpumap *cm = this_cpu_ptr(m->maps); in irq_matrix_online() [all …]
|
| /kernel/linux/linux-4.19/arch/mips/loongson64/loongson-3/ |
| D | smp.c | 259 void loongson3_send_irq_by_ipi(int cpu, int irqs) in loongson3_send_irq_by_ipi() argument 261 loongson3_ipi_write32(irqs << IPI_IRQ_OFFSET, ipi_set0_regs[cpu_logical_map(cpu)]); in loongson3_send_irq_by_ipi() 267 unsigned int action, c0count, irqs; in loongson3_ipi_interrupt() local 271 irqs = action >> IPI_IRQ_OFFSET; in loongson3_ipi_interrupt() 294 if (irqs) { in loongson3_ipi_interrupt() 296 while ((irq = ffs(irqs))) { in loongson3_ipi_interrupt() 297 do_IRQ(irq-1); in loongson3_ipi_interrupt() 298 irqs &= ~(1<<(irq-1)); in loongson3_ipi_interrupt() 359 int i = 0, num = 0; /* i: physical id, num: logical id */ in loongson3_smp_setup() local 368 __cpu_number_map[i] = -1; in loongson3_smp_setup() [all …]
|