/linux/tools/testing/selftests/kvm/s390/ |
H A D | ucontrol_test.c | 1 // SPDX-License-Identifier: GPL-2.0-only 39 int rc; in require_ucontrol_admin() local 41 rc = capget(&hdr, data); in require_ucontrol_admin() 42 TEST_ASSERT_EQ(0, rc); in require_ucontrol_admin() 43 TEST_REQUIRE((data->effective & CAP_TO_MASK(CAP_SYS_ADMIN)) > 0); in require_ucontrol_admin() 122 * create VM with single vcpu, map kvm_run and SIE control block for easy access 127 int rc; in FIXTURE_SETUP() local 131 self->kvm_fd = open_kvm_dev_path_or_exit(); in FIXTURE_SETUP() 132 self->vm_fd = ioctl(self->kvm_fd, KVM_CREATE_VM, KVM_VM_S390_UCONTROL); in FIXTURE_SETUP() 133 ASSERT_GE(self->vm_fd, 0); in FIXTURE_SETUP() [all …]
|
/linux/drivers/accel/habanalabs/common/ |
H A D | state_dump.c | 1 // SPDX-License-Identifier: GPL-2.0 13 * hl_format_as_binary - helper function, format an integer as binary 37 buf_len -= 3; in hl_format_as_binary() 43 bit = n & (1 << (sizeof(n) * BITS_PER_BYTE - 1)); in hl_format_as_binary() 58 * resize_to_fit - helper function, resize buffer to fit given amount of data 79 return -ENOMEM; in resize_to_fit() 89 * hl_snprintf_resize() - print formatted data to buffer, resize as needed 110 int rc; in hl_snprintf_resize() local 113 return -EINVAL; in hl_snprintf_resize() 116 length = vsnprintf(*buf + *offset, *size - *offset, format, args); in hl_snprintf_resize() [all …]
|
/linux/drivers/media/rc/ |
H A D | rc-main.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // rc-main.c - Remote Controller core module 4 // Copyright (C) 2009-2010 by Mauro Carvalho Chehab 8 #include <media/rc-core.h> 18 #include "rc-core-priv.h" 25 const char *name; member 29 [RC_PROTO_UNKNOWN] = { .name = "unknown", .repeat_period = 125 }, 30 [RC_PROTO_OTHER] = { .name = "other", .repeat_period = 125 }, 31 [RC_PROTO_RC5] = { .name = "rc-5", 33 [RC_PROTO_RC5X_20] = { .name = "rc-5x-20", [all …]
|
/linux/fs/jfs/ |
H A D | jfs_imap.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (C) International Business Machines Corp., 2000-2004 7 * jfs_imap.c: inode allocation map manager 16 * There is also a inode lock for the inode map inode. A read lock needs to 17 * be taken whenever an IAG is read from the map or the global level 26 * The control page of the inode map is read into memory by diMount(). 51 #define IAGFREE_LOCK_INIT(imap) mutex_init(&imap->im_freelock) 52 #define IAGFREE_LOCK(imap) mutex_lock(&imap->im_freelock) 53 #define IAGFREE_UNLOCK(imap) mutex_unlock(&imap->im_freelock) 56 #define AG_LOCK_INIT(imap,index) mutex_init(&(imap->im_aglock[index])) [all …]
|
H A D | jfs_mount.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (C) International Business Machines Corp., 2000-2004 18 * allocation map inode" (aka fileset inode): 21 * allocation map inode" (aka aggregate inode) where each inode 23 * on-disk inode in uniform way at both aggregate and fileset level; 33 * mntvfs -> fileset ipimap+ -> aggregate ipbmap -> aggregate ipaimap; 34 * fileset vfs -> vp(1) <-> ... <-> vp(n) <->vproot; 58 * NAME: jfs_mount(sb) 62 * PARAMETER: sb - super block 64 * RETURN: -EBUSY - device already mounted or open for write [all …]
|
/linux/drivers/mtd/ |
H A D | rfd_ftl.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rfd_ftl.c -- resident flash disk (flash translation layer) 95 struct block *block = &part->blocks[block_no]; in build_block_map() 98 block->offset = part->block_size * block_no; in build_block_map() 100 if (le16_to_cpu(part->header_cache[0]) != RFD_MAGIC) { in build_block_map() 101 block->state = BLOCK_UNUSED; in build_block_map() 102 return -ENOENT; in build_block_map() 105 block->state = BLOCK_OK; in build_block_map() 107 for (i=0; i<part->data_sectors_per_block; i++) { in build_block_map() 110 entry = le16_to_cpu(part->header_cache[HEADER_MAP_OFFSET + i]); in build_block_map() [all …]
|
/linux/drivers/reset/hisilicon/ |
H A D | reset-hi3660.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (c) 2016-2017 Linaro Ltd. 4 * Copyright (c) 2016-2017 HiSilicon Technologies Co., Ltd. 12 #include <linux/reset-controller.h> 16 struct regmap *map; member 25 struct hi3660_reset_controller *rc = to_hi3660_reset_controller(rcdev); in hi3660_reset_program_hw() local 30 return regmap_write(rc->map, offset, mask); in hi3660_reset_program_hw() 32 return regmap_write(rc->map, offset + 4, mask); in hi3660_reset_program_hw() 70 offset = reset_spec->args[0]; in hi3660_reset_xlate() 71 bit = reset_spec->args[1]; in hi3660_reset_xlate() [all …]
|
/linux/drivers/mtd/maps/ |
H A D | ts5500_flash.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * ts5500_flash.c -- MTD map driver for Technology Systems TS-5500 board 8 * - In order for detection to work, jumper 3 must be set. 9 * - Drive A and B use the resident flash disk (RFD) flash translation layer. 10 * - If you have created your own jffs file system and the bios overwrites 17 #include <linux/mtd/map.h> 27 .name = "TS-5500 Flash", 35 .name = "Drive A", 40 .name = "BIOS", 45 .name = "Drive B", [all …]
|
H A D | nettel.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * nettel.c -- mappings for NETtel/SecureEdge/SnapGear (x86) boards. 7 * (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com) 8 * (C) Copyright 2001-2002, SnapGear (www.snapgear.com) 18 #include <linux/mtd/map.h> 48 ((((size)-(64*1024)) >> SC520_PAR_SIZE_SHIFT) & SC520_PAR_SIZE_MASK) | \ 68 .name = "SnapGear Intel", 75 .name = "SnapGear kernel", 80 .name = "SnapGear filesystem", 84 .name = "SnapGear config", [all …]
|
/linux/sound/soc/codecs/ |
H A D | hdmi-codec.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright (C) 2015 Texas Instruments Incorporated - https://www.ti.com/ 16 #include <sound/hdmi-codec.h> 22 #define HDMI_CODEC_CHMAP_IDX_UNKNOWN -1 31 * RL RLC RC RRC RR 42 RC = BIT(6), /* Rear Center */ enumerator 61 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } }, 65 /* Channel maps for multi-channel playbacks, up to 8 n_ch */ 68 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } }, 70 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR, SNDRV_CHMAP_LFE, [all …]
|
/linux/drivers/char/ipmi/ |
H A D | kcs_bmc_npcm7xx.c | 1 // SPDX-License-Identifier: GPL-2.0 7 #define pr_fmt(fmt) "nuvoton-kcs-bmc: " fmt 22 #define DEVICE_NAME "npcm-kcs-bmc" 51 * Registers in this module are 8 bits. An 8-bit register must be accessed 52 * by an 8-bit read or write. 71 struct regmap *map; member 91 int rc; in npcm7xx_kcs_inb() local 93 rc = regmap_read(priv->map, reg, &val); in npcm7xx_kcs_inb() 94 WARN(rc != 0, "regmap_read() failed: %d\n", rc); in npcm7xx_kcs_inb() 96 return rc == 0 ? (u8)val : 0; in npcm7xx_kcs_inb() [all …]
|
H A D | kcs_bmc_aspeed.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2015-2018, Intel Corporation. 6 #define pr_fmt(fmt) "aspeed-kcs-bmc: " fmt 27 #define DEVICE_NAME "ast-kcs-bmc" 37 * IDyIRQX Use the specified 4-bit SerIRQ for LPC channel y 116 struct regmap *map; member 139 int rc; in aspeed_kcs_inb() local 141 rc = regmap_read(priv->map, reg, &val); in aspeed_kcs_inb() 142 WARN(rc != 0, "regmap_read() failed: %d\n", rc); in aspeed_kcs_inb() 144 return rc == 0 ? (u8) val : 0; in aspeed_kcs_inb() [all …]
|
/linux/drivers/accel/habanalabs/common/pci/ |
H A D | pci.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright 2016-2019 HabanaLabs, Ltd. 23 * hl_pci_bars_map() - Map PCI BARs. 25 * @name: Array of BAR names. 26 * @is_wc: Array with flag per BAR whether a write-combined mapping is needed. 28 * Request PCI regions and map them to kernel virtual addresses. 30 * Return: 0 on success, non-zero for failure. 32 int hl_pci_bars_map(struct hl_device *hdev, const char * const name[3], in hl_pci_bars_map() 35 struct pci_dev *pdev = hdev->pdev; in hl_pci_bars_map() 36 int rc, i, bar; in hl_pci_bars_map() local [all …]
|
/linux/lib/ |
H A D | dynamic_debug.c | 78 …"( 0 = off (default), 1 = module add/rm, 2 = >control summary, 3 = parsing, 4 = per-site changes)"… 83 int skip = strlen(__FILE__) - strlen("lib/dynamic_debug.c"); in trim_prefix() 106 char *p = fb->buf; in ddebug_describe_flags() 112 if (p == fb->buf) in ddebug_describe_flags() 116 return fb->buf; in ddebug_describe_flags() 135 if (query->format) { in vpr_info_dq() 136 fmtlen = strlen(query->format); in vpr_info_dq() 137 while (fmtlen && query->format[fmtlen - 1] == '\n') in vpr_info_dq() 138 fmtlen--; in vpr_info_dq() 141 v3pr_info("%s: func=\"%s\" file=\"%s\" module=\"%s\" format=\"%.*s\" lineno=%u-%u class=%s\n", in vpr_info_dq() [all …]
|
/linux/Documentation/devicetree/bindings/media/ |
H A D | hix5hd2-ir.txt | 1 Device-Tree bindings for hix5hd2 ir IP 4 - compatible: Should contain "hisilicon,hix5hd2-ir", or: 5 - "hisilicon,hi3796cv300-ir" for Hi3796CV300 IR device. 6 - reg: Base physical address of the controller and length of memory 8 - interrupts: interrupt-specifier for the sole interrupt generated by 11 - clocks: clock phandle and specifier pair. 14 - linux,rc-map-name: see rc.txt file in the same directory. 15 - hisilicon,power-syscon: DEPRECATED. Don't use this in new dts files. 21 compatible = "hisilicon,hix5hd2-ir"; 25 linux,rc-map-name = "rc-tivo";
|
/linux/security/selinux/ss/ |
H A D | services.c | 1 // SPDX-License-Identifier: GPL-2.0-only 17 * Updated: Hewlett-Packard <paul@paul-moore.com> 35 * Copyright (C) 2006, 2007 Hewlett-Packard Development Company, L.P. 36 * Copyright (C) 2004-2006 Trusted Computer Solutions, Inc. 37 * Copyright (C) 2003 - 2004, 2006 Tresys Technology, LLC 97 const struct security_class_mapping *map, in selinux_set_mapping() argument 104 if (!map) in selinux_set_mapping() 105 return -EINVAL; in selinux_set_mapping() 107 while (map[i].name) in selinux_set_mapping() 111 out_map->mapping = kcalloc(++i, sizeof(*out_map->mapping), GFP_ATOMIC); in selinux_set_mapping() [all …]
|
/linux/drivers/firmware/efi/ |
H A D | esrt.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 * through the sysfs file system. The ESRT provides a read-only catalog of 96 return attr->show(entry, buf); in esre_attr_show() 108 efi_guid_to_str(&entry->esre.esre1->fw_class, str); in fw_class_show() 112 return str - buf; in fw_class_show() 117 #define esre_attr_decl(name, size, fmt) \ argument 118 static ssize_t name##_show(struct esre_entry *entry, char *buf) \ 121 le##size##_to_cpu(entry->esre.esre1->name)); \ 124 static struct esre_attribute esre_##name = __ATTR_RO_MODE(name, 0400) 149 list_del(&entry->list); in esre_release() [all …]
|
/linux/tools/testing/selftests/ia64/ |
H A D | aliasing-test.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * (c) Copyright 2007 Hewlett-Packard Development Company, L.P. 26 int fd, rc; in map_mem() local 31 if (fd == -1) { in map_mem() 33 return -1; in map_mem() 37 rc = ioctl(fd, PCIIOC_MMAP_IS_MEM); in map_mem() 38 if (rc == -1) in map_mem() 52 rc = munmap(addr, length); in map_mem() 53 if (rc == -1) { in map_mem() 55 return -1; in map_mem() [all …]
|
/linux/drivers/input/serio/ |
H A D | hil_mlc.c | 13 * 2. The name of the author may not be used to endorse or promote products 30 * HP-HIL Technical Reference Manual. Hewlett Packard Product No. 45918A 35 * Some access methods and an ISR is defined by the sub-driver 39 * sub-driver and invoked directly, must check for record 48 * at some point with a sub-driver-specific mechanism.) 92 mlc->di_map[j] = -1; in hil_mlc_clear_di_map() 97 memset(&mlc->di_scratch, 0, sizeof(mlc->di_scratch)); in hil_mlc_clear_di_scratch() 102 memcpy(&mlc->di[idx], &mlc->di_scratch, sizeof(mlc->di_scratch)); in hil_mlc_copy_di_scratch() 112 /* In-use slots are not eligible. */ in hil_mlc_match_di_scratch() 114 if (mlc->di_map[j] == idx) in hil_mlc_match_di_scratch() [all …]
|
/linux/arch/powerpc/platforms/powernv/ |
H A D | opal-irqchip.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 51 hwirq = fls64(e) - 1; in opal_handle_events() 79 clear_bit(d->hwirq, &opal_event_irqchip.mask); in opal_event_mask() 84 set_bit(d->hwirq, &opal_event_irqchip.mask); in opal_event_unmask() 97 return -EINVAL; in opal_event_set_type() 104 .name = "OPAL EVT", 152 .map = opal_event_map, 178 int i, rc = 0; in opal_event_init() local 183 return -ENODEV; in opal_event_init() 193 dn = of_find_compatible_node(NULL, NULL, "ibm,opal-event"); in opal_event_init() [all …]
|
/linux/tools/perf/arch/x86/util/ |
H A D | event.c | 1 // SPDX-License-Identifier: GPL-2.0 8 #include "../../../util/synthetic-events.h" 11 #include "../../../util/map.h" 24 static int perf_event__synthesize_extra_kmaps_cb(struct map *map, void *data) in perf_event__synthesize_extra_kmaps_cb() argument 27 union perf_event *event = args->event; in perf_event__synthesize_extra_kmaps_cb() 31 if (!__map__is_extra_kernel_map(map)) in perf_event__synthesize_extra_kmaps_cb() 34 kmap = map__kmap(map); in perf_event__synthesize_extra_kmaps_cb() 36 size = sizeof(event->mmap) - sizeof(event->mmap.filename) + in perf_event__synthesize_extra_kmaps_cb() 37 PERF_ALIGN(strlen(kmap->name) + 1, sizeof(u64)) + in perf_event__synthesize_extra_kmaps_cb() 38 args->machine->id_hdr_size; in perf_event__synthesize_extra_kmaps_cb() [all …]
|
/linux/Documentation/devicetree/bindings/pci/ |
H A D | ti-pci.txt | 4 - compatible: Should be "ti,dra7-pcie" for RC (deprecated) 5 Should be "ti,dra7-pcie-ep" for EP (deprecated) 6 Should be "ti,dra746-pcie-rc" for dra74x/dra76 in RC mode 7 Should be "ti,dra746-pcie-ep" for dra74x/dra76 in EP mode 8 Should be "ti,dra726-pcie-rc" for dra72x in RC mode 9 Should be "ti,dra726-pcie-ep" for dra72x in EP mode 10 - phys : list of PHY specifiers (used by generic PHY framework) 11 - phy-names : must be "pcie-phy0", "pcie-phy1", "pcie-phyN".. based on the 13 - ti,hwmods : Name of the hwmod associated to the pcie, "pcie<X>", 15 - num-lanes as specified in ../snps,dw-pcie.yaml [all …]
|
/linux/drivers/net/ethernet/qualcomm/rmnet/ |
H A D | rmnet_map_command.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. 15 struct rmnet_map_header *map_header = (void *)skb->data; in rmnet_map_do_flow_control() 21 mux_id = map_header->mux_id; in rmnet_map_do_flow_control() 34 vnd = ep->egress_dev; in rmnet_map_do_flow_control() 53 struct rmnet_map_header *map_header = (void *)skb->data; in rmnet_map_send_ack() 55 struct net_device *dev = skb->dev; in rmnet_map_send_ack() 57 if (port->data_format & RMNET_FLAGS_INGRESS_MAP_CKSUMV4) in rmnet_map_send_ack() 59 skb->len - sizeof(struct rmnet_map_dl_csum_trailer)); in rmnet_map_send_ack() 61 skb->protocol = htons(ETH_P_MAP); in rmnet_map_send_ack() [all …]
|
/linux/sound/synth/emux/ |
H A D | soundfont.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 * Copyright (c) 1999-2000 Takashi Iwai <tiwai@suse.de> 26 static struct snd_soundfont *newsf(struct snd_sf_list *sflist, int type, char *name); 27 static int is_identical_font(struct snd_soundfont *sf, int type, unsigned char *name); 70 mutex_lock(&sflist->presets_mutex); in lock_preset() 71 spin_lock_irqsave(&sflist->lock, flags); in lock_preset() 72 sflist->presets_locked = 1; in lock_preset() 73 spin_unlock_irqrestore(&sflist->lock, flags); in lock_preset() 84 spin_lock_irqsave(&sflist->lock, flags); in unlock_preset() 85 sflist->presets_locked = 0; in unlock_preset() [all …]
|
/linux/drivers/net/ethernet/qlogic/qed/ |
H A D | qed_main.c | 1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 3 * Copyright (c) 2015-2017 QLogic Corporation 4 * Copyright (c) 2019-2020 Marvell International Ltd. 13 #include <linux/dma-mapping.h> 63 "qed/qed_init_values_zipped-" FW_FILE_VERSION ".bin" 222 static void __init qed_mfw_speed_map_populate(struct qed_mfw_speed_map *map) in qed_mfw_speed_map_populate() argument 224 linkmode_set_bit_array(map->cap_arr, map->arr_size, map->caps); in qed_mfw_speed_map_populate() 226 map->cap_arr = NULL; in qed_mfw_speed_map_populate() 227 map->arr_size = 0; in qed_mfw_speed_map_populate() 259 struct pci_dev *pdev = cdev->pdev; in qed_free_pci() [all …]
|