| /linux/drivers/pcmcia/ |
| H A D | rsrc_nonstatic.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rsrc_nonstatic.c -- Resource management routines for !SS_CAP_STATIC_MAP sockets 49 u_long base, num; member 83 if (s && s->cb_dev) in claim_region() 84 parent = pci_find_parent_resource(s->cb_dev, res); in claim_region() 108 static int add_interval(struct resource_map *map, u_long base, u_long num) in add_interval() argument 112 for (p = map; ; p = p->next) { in add_interval() 113 if ((p != map) && (p->base+p->num >= base)) { in add_interval() 114 p->num = max(num + base - p->base, p->num); in add_interval() 117 if ((p->next == map) || (p->next->base > base+num-1)) in add_interval() [all …]
|
| /linux/drivers/net/wireless/realtek/rtw88/ |
| H A D | debug.c | 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2 /* Copyright(c) 2018-2019 Realtek Corporation 21 int (*cb_read)(struct seq_file *m, void *v); 107 static int rtw_debugfs_single_show(struct seq_file *m, void *v) in rtw_debugfs_single_show() argument 109 struct rtw_debugfs_priv *debugfs_priv = m->private; in rtw_debugfs_single_show() 111 return debugfs_priv->cb_read(m, v); in rtw_debugfs_single_show() 118 struct rtw_debugfs_priv *debugfs_priv = filp->private_data; in rtw_debugfs_common_write() 120 return debugfs_priv->cb_write(filp, buffer, count, loff); in rtw_debugfs_common_write() 127 struct seq_file *seqpriv = (struct seq_file *)filp->private_data; in rtw_debugfs_single_write() 128 struct rtw_debugfs_priv *debugfs_priv = seqpriv->private; in rtw_debugfs_single_write() [all …]
|
| /linux/arch/mips/include/asm/ |
| H A D | bitops.h | 6 * Copyright (c) 1994 - 1997, 99, 2000, 06, 07 Ralf Baechle (ralf@linux-mips.org) 23 #include <asm/cpu-features.h> 80 * set_bit - Atomically set a bit in memory 87 * restricted to acting on a single-word quantity. 91 volatile unsigned long *m = &addr[BIT_WORD(nr)]; in set_bit() local 100 __bit_op(*m, __stringify(LONG_INS) " %0, %3, %2, 1", "i"(bit), "r"(~0)); in set_bit() 104 __bit_op(*m, "or\t%0, %2", "ir"(BIT(bit))); in set_bit() 108 * clear_bit - Clears a bit in memory 119 volatile unsigned long *m = &addr[BIT_WORD(nr)]; in clear_bit() local 128 __bit_op(*m, __stringify(LONG_INS) " %0, $0, %2, 1", "i"(bit)); in clear_bit() [all …]
|
| /linux/drivers/xen/ |
| H A D | privcmd.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Interface to privileged domain-0 commands. 7 * Copyright (c) 2002-2004, K A Fraser, B Dragovic 47 #include <xen/xen-ops.h> 82 struct privcmd_data *data = file->private_data; in privcmd_ioctl_hypercall() 87 if (data->domid != DOMID_INVALID) in privcmd_ioctl_hypercall() 88 return -EPERM; in privcmd_ioctl_hypercall() 91 return -EFAULT; in privcmd_ioctl_hypercall() 132 while (nelem--) { in gather_array() 133 if (pageidx > PAGE_SIZE-size) { in gather_array() [all …]
|
| H A D | mcelog.c | 79 (xen_mce_chrdev_open_count && (file->f_flags & O_EXCL))) { in xen_mce_chrdev_open() 82 return -EBUSY; in xen_mce_chrdev_open() 85 if (file->f_flags & O_EXCL) in xen_mce_chrdev_open() 98 xen_mce_chrdev_open_count--; in xen_mce_chrdev_release() 110 unsigned num; in xen_mce_chrdev_read() local 115 num = xen_mcelog.next; in xen_mce_chrdev_read() 118 err = -EINVAL; in xen_mce_chrdev_read() 123 for (i = 0; i < num; i++) { in xen_mce_chrdev_read() 124 struct xen_mce *m = &xen_mcelog.entry[i]; in xen_mce_chrdev_read() local 126 err |= copy_to_user(buf, m, sizeof(*m)); in xen_mce_chrdev_read() [all …]
|
| /linux/drivers/clk/qcom/ |
| H A D | clk-rcg2.c | 1 // SPDX-License-Identifier: GPL-2.0 12 #include <linux/clk-provider.h> 23 #include "clk-rcg.h" 49 #define RCG_CFG_OFFSET(rcg) ((rcg)->cmd_rcgr + (rcg)->cfg_off + CFG_REG) 50 #define RCG_M_OFFSET(rcg) ((rcg)->cmd_rcgr + (rcg)->cfg_off + M_REG) 51 #define RCG_N_OFFSET(rcg) ((rcg)->cmd_rcgr + (rcg)->cfg_off + N_REG) 52 #define RCG_D_OFFSET(rcg) ((rcg)->cmd_rcgr + (rcg)->cfg_off + D_REG) 73 ret = regmap_read(rcg->clkr.regmap, rcg->cmd_rcgr + CMD_REG, &cmd); in clk_rcg2_is_enabled() 90 if (cfg == rcg->parent_map[i].cfg) in __clk_rcg2_get_parent() 104 ret = regmap_read(rcg->clkr.regmap, RCG_CFG_OFFSET(rcg), &cfg); in clk_rcg2_get_parent() [all …]
|
| /linux/fs/proc/ |
| H A D | proc_tty.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * proc_tty.c -- handles /proc/tty 26 static void show_tty_range(struct seq_file *m, struct tty_driver *p, in show_tty_range() argument 27 dev_t from, int num) in show_tty_range() argument 29 seq_printf(m, "%-20s ", p->driver_name ? p->driver_name : "unknown"); in show_tty_range() 30 seq_printf(m, "/dev/%-8s ", p->name); in show_tty_range() 31 if (p->num > 1) { in show_tty_range() 32 seq_printf(m, "%3d %d-%d ", MAJOR(from), MINOR(from), in show_tty_range() 33 MINOR(from) + num - 1); in show_tty_range() 35 seq_printf(m, "%3d %7d ", MAJOR(from), MINOR(from)); in show_tty_range() [all …]
|
| /linux/drivers/base/ |
| H A D | component.c | 1 // SPDX-License-Identifier: GPL-2.0 16 * The component helper allows drivers to collect a pile of sub-devices, 20 * subsystem-specific way to find a device is not available: The component 52 size_t num; member 85 struct aggregate_device *m = s->private; in component_devices_show() local 86 struct component_match *match = m->match; in component_devices_show() 90 seq_printf(s, "%-50s %20s\n", "aggregate_device name", "status"); in component_devices_show() 91 seq_puts(s, "-----------------------------------------------------------------------\n"); in component_devices_show() 92 seq_printf(s, "%-50s %20s\n\n", in component_devices_show() 93 dev_name(m->parent), m->bound ? "bound" : "not bound"); in component_devices_show() [all …]
|
| /linux/drivers/video/fbdev/core/ |
| H A D | fbmon.c | 11 * Copyright (C) 1991-2002 SciTech Software, Inc. All rights reserved. 14 * Copyright 1998 by Egbert Eich <Egbert.Eich@Physik.TU-Darmstadt.DE> 65 /* DEC FR-PCXAV-YZ */ 96 while (i-- && (*--s == 0x20)) *s = 0; in copy_string() 243 b[9] = 17; /* pixclock - 170 MHz*/ in fix_edid() 251 for (i = 0; i < EDID_LENGTH - 1; i++) in fix_edid() 254 edid[127] = 256 - csum; in fix_edid() 297 specs->manufacturer[0] = ((block[0] & 0x7c) >> 2) + '@'; in parse_vendor_block() 298 specs->manufacturer[1] = ((block[0] & 0x03) << 3) + in parse_vendor_block() 300 specs->manufacturer[2] = (block[1] & 0x1f) + '@'; in parse_vendor_block() [all …]
|
| /linux/arch/arm64/mm/ |
| H A D | ptdump.c | 1 // SPDX-License-Identifier: GPL-2.0-only 25 #include <asm/pgtable-hwdef.h> 29 #define pt_dump_seq_printf(m, fmt, args...) \ argument 31 if (m) \ 32 seq_printf(m, fmt, ##args); \ 35 #define pt_dump_seq_puts(m, fmt) \ argument 37 if (m) \ 38 seq_printf(m, fmt); \ 108 .set = "MEM/NORMAL-NC", 116 .set = "MEM/NORMAL-TAGGED", [all …]
|
| /linux/drivers/video/fbdev/ |
| H A D | asiliantfb.c | 4 * Copyright (C) 2001-2003 Saito.K & Jeanne 8 * drivers/video/asiliantfb.c -- frame buffer device for 17 * chip, and to the twin-display mode of the 69030. 18 * Contains code from Thomas Hhenleitner <th@visuelle-maschinen.de> (thanks) 24 * And from the frame buffer device for Open Firmware-initialized devices: 49 #define mmio_base (p->screen_base + 0x400000) 51 #define mm_write_ind(num, val, ap, dp) do { \ argument 52 writeb((num), mmio_base + (ap)); writeb((val), mmio_base + (dp)); \ 59 #define write_xr(num, val) mm_write_xr(p, num, val) argument 65 #define write_fr(num, val) mm_write_fr(p, num, val) argument [all …]
|
| /linux/drivers/virt/nitro_enclaves/ |
| H A D | ne_misc_dev_test.c | 1 // SPDX-License-Identifier: GPL-2.0 17 * Add the region from 0x1000 to (0x1000 + 0x200000 - 1): 19 * Failed, start address is not 2M-aligned 22 * num = 0 25 {0x1000, 0x200000, -EINVAL, 0, INVALID_VALUE, INVALID_VALUE}, 28 * Add the region from 0x200000 to (0x200000 + 0x1000 - 1): 30 * Failed, size is not 2M-aligned 33 * num = 0 36 {0x200000, 0x1000, -EINVAL, 0, INVALID_VALUE, INVALID_VALUE}, 39 * Add the region from 0x200000 to (0x200000 + 0x200000 - 1): [all …]
|
| /linux/tools/power/cpupower/utils/idle_monitor/ |
| H A D | cpupower-monitor.c | 1 // SPDX-License-Identifier: GPL-2.0-only 20 #include "idle_monitor/cpupower-monitor.h" 46 static char range_abbr[RANGE_MAX] = { 'T', 'C', 'P', 'M', }; 57 if ((end.tv_nsec - start.tv_nsec) < 0) { in timespec_diff_us() 58 temp.tv_sec = end.tv_sec - start.tv_sec - 1; in timespec_diff_us() 59 temp.tv_nsec = 1000000000 + end.tv_nsec - start.tv_nsec; in timespec_diff_us() 61 temp.tv_sec = end.tv_sec - start.tv_sec; in timespec_diff_us() 62 temp.tv_nsec = end.tv_nsec - start.tv_nsec; in timespec_diff_us() 83 return -1; in fill_string_with_spaces() 107 fill_string_with_spaces(buf, topology_depth * 5 - 1); in print_header() [all …]
|
| /linux/drivers/media/common/saa7146/ |
| H A D | saa7146_i2c.c | 1 // SPDX-License-Identifier: GPL-2.0 4 #include <media/drv-intf/saa7146_vv.h> 8 /* DEB_I2C("'%s'\n", adapter->name); */ in saa7146_i2c_func() 16 /* this function returns the status-register of our i2c-device */ 24 /* this function runs through the i2c-messages and prepares the data to be 26 to understand this. it returns the number of u32s to send, or -1 28 static int saa7146_i2c_msg_prepare(const struct i2c_msg *m, int num, __le32 *op) in saa7146_i2c_msg_prepare() argument 35 for(i = 0; i < num; i++) { in saa7146_i2c_msg_prepare() 36 mem += m[i].len + 1; in saa7146_i2c_msg_prepare() 41 mem = 1 + ((mem-1) / 3); in saa7146_i2c_msg_prepare() [all …]
|
| /linux/fs/jfs/ |
| H A D | jfs_dmap.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * Copyright (C) International Business Machines Corp., 2000-2002 13 #define LPERDMAP 256 /* num leaves per dmap tree */ 18 #define BPERDMAP (LPERDMAP * DBWORD) /* num of blks per dmap */ 19 #define L2BPERDMAP 13 /* l2 num of blks per dmap */ 22 #define LPERCTL 1024 /* num of leaves per dmapctl tree */ 23 #define L2LPERCTL 10 /* l2 num of leaves per dmapctl tree */ 25 #define NOFREE ((s8) -1) /* no blocks free */ 27 #define L2MAXAG 7 /* l2 max num of AG */ 66 * - the number of dmaps preceding it [all …]
|
| /linux/drivers/net/wireless/realtek/rtlwifi/ |
| H A D | debug.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 2009-2012 Realtek Corporation.*/ 14 if (unlikely((comp & rtlpriv->cfg->mod_params->debug_mask) && in _rtl_dbg_print() 15 level <= rtlpriv->cfg->mod_params->debug_level)) { in _rtl_dbg_print() 35 if (unlikely(((comp) & rtlpriv->cfg->mod_params->debug_mask) && in _rtl_dbg_print_data() 36 ((level) <= rtlpriv->cfg->mod_params->debug_level))) { in _rtl_dbg_print_data() 38 current->comm, current->pid, titlestring); in _rtl_dbg_print_data() 47 int (*cb_read)(struct seq_file *m, void *v); 55 static int rtl_debug_get_common(struct seq_file *m, void *v) in rtl_debug_get_common() argument 57 struct rtl_debugfs_priv *debugfs_priv = m->private; in rtl_debug_get_common() [all …]
|
| /linux/drivers/firmware/efi/ |
| H A D | earlycon.c | 1 // SPDX-License-Identifier: GPL-2.0 42 return efi_fb ? 0 : -ENOMEM; in efi_earlycon_remap_fb() 105 for (i = 0; i < height - font->height; i++) { in efi_earlycon_scroll_up() 110 src = efi_earlycon_map((i + font->height) * len, len); in efi_earlycon_scroll_up() 128 int m, n, bytes; in efi_earlycon_write_char() local 131 bytes = BITS_TO_BYTES(font->width); in efi_earlycon_write_char() 132 src = font->data + c * font->height * bytes + h * bytes; in efi_earlycon_write_char() 134 for (m = 0; m < font->width; m++) { in efi_earlycon_write_char() 135 n = m % 8; in efi_earlycon_write_char() 136 x = *(src + m / 8); in efi_earlycon_write_char() [all …]
|
| /linux/arch/m68k/include/asm/ |
| H A D | bitops.h | 22 * ColdFire - supports standard bset/bclr/bchg with register operand only 23 * 68000 - supports standard bset/bclr/bchg with memory operand 24 * >= 68020 - also supports the bfset/bfclr/bfchg instructions 46 : "+m" (*p) in bset_mem_set_bit() 89 : "+m" (*p) in bclr_mem_clear_bit() 132 : "+m" (*p) in bchg_mem_change_bit() 183 : "=d" (retval), "+m" (*p) in bset_mem_test_and_set_bit() 236 : "=d" (retval), "+m" (*p) in bclr_mem_test_and_clear_bit() 289 : "=d" (retval), "+m" (*p) in bchg_mem_test_and_change_bit() 327 : "+m" (*p) in xor_unlock_is_negative_byte() [all …]
|
| /linux/drivers/hsi/controllers/ |
| H A D | omap_ssi_core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 17 #include <linux/dma-mapping.h> 40 static int ssi_regs_show(struct seq_file *m, void *p __maybe_unused) in ssi_regs_show() argument 42 struct hsi_controller *ssi = m->private; in ssi_regs_show() 44 void __iomem *sys = omap_ssi->sys; in ssi_regs_show() 46 pm_runtime_get_sync(ssi->device.parent); in ssi_regs_show() 47 seq_printf(m, "REVISION\t: 0x%08x\n", readl(sys + SSI_REVISION_REG)); in ssi_regs_show() 48 seq_printf(m, "SYSCONFIG\t: 0x%08x\n", readl(sys + SSI_SYSCONFIG_REG)); in ssi_regs_show() 49 seq_printf(m, "SYSSTATUS\t: 0x%08x\n", readl(sys + SSI_SYSSTATUS_REG)); in ssi_regs_show() 50 pm_runtime_put(ssi->device.parent); in ssi_regs_show() [all …]
|
| /linux/drivers/clk/ti/ |
| H A D | clkt_dpll.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2005-2008 Texas Instruments, Inc. 6 * Copyright (C) 2004-2010 Nokia Corporation 9 * Richard Woodruff <r-woodruff2@ti.com> 17 #include <linux/clk-provider.h> 30 #define DPLL_MULT_UNDERFLOW -1 51 #define DPLL_FINT_UNDERFLOW -1 52 #define DPLL_FINT_INVALID -2 57 * _dpll_test_fint - test whether an Fint value is valid for the DPLL 63 * Correction". Returns 0 if OK, -1 if the enclosing loop can terminate [all …]
|
| /linux/drivers/usb/gadget/udc/ |
| H A 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 …]
|
| /linux/drivers/irqchip/ |
| H A D | irq-gic-v2m.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * ARM GIC v2m MSI(-X) support 26 #include <linux/irqchip/arm-gic.h> 27 #include <linux/irqchip/arm-gic-common.h> 29 #include <linux/irqchip/irq-msi-lib.h> 52 /* APM X-Gene with GICv2m MSI_IIDR register value */ 79 if (v2m->flags & GICV2M_GRAVITON_ADDRESS_ONLY) in gicv2m_get_msi_addr() 80 return v2m->res.start | ((hwirq - 32) << 3); in gicv2m_get_msi_addr() 82 return v2m->res.start + V2M_MSI_SETSPI_NS; in gicv2m_get_msi_addr() 88 phys_addr_t addr = gicv2m_get_msi_addr(v2m, data->hwirq); in gicv2m_compose_msi_msg() [all …]
|
| /linux/arch/arm/mm/ |
| H A D | dump.c | 1 // SPDX-License-Identifier: GPL-2.0-only 33 { -1, NULL }, 36 #define pt_dump_seq_printf(m, fmt, args...) \ argument 38 if (m) \ 39 seq_printf(m, fmt, ##args); \ 42 #define pt_dump_seq_puts(m, fmt) \ argument 44 if (m) \ 45 seq_printf(m, fmt); \ 205 size_t num; member 219 .num = ARRAY_SIZE(section_bits), [all …]
|
| /linux/kernel/irq/ |
| H A D | matrix.c | 1 // SPDX-License-Identifier: GPL-2.0 41 * irq_alloc_matrix - Allocate a irq_matrix structure and initialize it 52 struct irq_matrix *m; in irq_alloc_matrix() local 54 m = kzalloc(struct_size(m, scratch_map, matrix_size * 2), GFP_KERNEL); in irq_alloc_matrix() 55 if (!m) in irq_alloc_matrix() 58 m->system_map = &m->scratch_map[matrix_size]; in irq_alloc_matrix() 60 m->matrix_bits = matrix_bits; in irq_alloc_matrix() 61 m->alloc_start = alloc_start; in irq_alloc_matrix() 62 m->alloc_end = alloc_end; in irq_alloc_matrix() 63 m->alloc_size = alloc_end - alloc_start; in irq_alloc_matrix() [all …]
|
| /linux/lib/ |
| H A D | extable.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 16 #define ex_to_insn(x) ((x)->insn) 20 return (unsigned long)&x->insn + x->insn; in ex_to_insn() 30 int delta = b - a; in swap_ex() 33 x->insn = y->insn + delta; in swap_ex() 34 y->insn = tmp.insn - delta; in swap_ex() 39 x->fixup = y->fixup + delta; in swap_ex() 40 y->fixup = tmp.fixup - delta; in swap_ex() 59 return -1; in cmp_ex_sort() 66 sort(start, finish - start, sizeof(struct exception_table_entry), in sort_extable() [all …]
|