| /linux/Documentation/arch/x86/ | 
| H A D | pat.rst | 1 .. SPDX-License-Identifier: GPL-2.07 x86 Page Attribute Table (PAT) allows for setting the memory attribute at the
 9 for setting of memory types over physical address ranges. However, PAT is
 11 and also due to the fact that there are no hardware limitations on number of
 13 not having memory type aliasing for the same physical memory with multiple
 16 PAT allows for different types of memory attributes. The most commonly used
 20 WB   Write-back
 22 WC   Write-combined
 23 WT   Write-through
 24 UC-  Uncached Minus
 [all …]
 
 | 
| /linux/arch/x86/mm/pat/ | 
| H A D | memtype.c | 1 // SPDX-License-Identifier: GPL-2.0-only3  * Page Attribute Table (PAT) support: handle memory caching attributes in page tables.
 14  * memory ranges: uncached, write-combining, write-through, write-protected,
 15  * and the most commonly used and default attribute: write-back caching.
 18  * a hardware interface to enumerate a limited number of physical memory ranges
 20  * Even modern CPUs have MTRRs enabled - but these are typically not touched
 21  * by the kernel or by user-space (such as the X server), we rely on PAT for any
 24  * PAT doesn't work via explicit memory ranges, but uses page table entries to add
 25  * cache attribute information to the mapped memory range: there's 3 bits used,
 71  * various user-requested or hardware-forced reasons:
 [all …]
 
 | 
| /linux/net/sunrpc/xprtrdma/ | 
| H A D | frwr_ops.c | 1 // SPDX-License-Identifier: GPL-2.04  * Copyright (c) 2003-2007 Network Appliance, Inc. All rights reserved.
 7 /* Lightweight memory registration using Fast Registration Work
 11  * of arbitrarily-sized memory regions. This is the fastest and safest
 12  * but most complex memory registration mode.
 17  * A Memory Region is prepared for RDMA Read or Write using a FAST_REG
 19  * Memory Region is invalidated using a LOCAL_INV Work Request
 32  * send lock, just as ->send_request does. This prevents frwr_map and
 51 	struct rpc_rdma_cid *cid = &mr->mr_cid;  in frwr_cid_init()
 53 	cid->ci_queue_id = ep->re_attr.send_cq->res.id;  in frwr_cid_init()
 [all …]
 
 | 
| H A D | verbs.c | 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause3  * Copyright (c) 2014-2017 Oracle.  All rights reserved.
 4  * Copyright (c) 2003-2007 Network Appliance, Inc. All rights reserved.
 9  * COPYING in the main directory of this source tree, or the BSD-type
 32  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 49  *  o buffer memory
 91 	struct rpcrdma_ep *ep = r_xprt->rx_ep;  in rpcrdma_xprt_drain()
 92 	struct rdma_cm_id *id = ep->re_id;  in rpcrdma_xprt_drain()
 97 	if (atomic_inc_return(&ep->re_receiving) > 1)  in rpcrdma_xprt_drain()
 98 		wait_for_completion(&ep->re_done);  in rpcrdma_xprt_drain()
 [all …]
 
 | 
| /linux/tools/testing/selftests/memory-hotplug/ | 
| H A D | mem-on-off-test.sh | 2 # SPDX-License-Identifier: GPL-2.06 # Kselftest framework requirement - SKIP code is 4.
 18 	SYSFS=`mount -t sysfs | head -1 | awk '{ print $3 }'`
 20 	if [ ! -d "$SYSFS" ]; then
 25 	if ! ls $SYSFS/devices/system/memory/memory* > /dev/null 2>&1; then
 26 		echo $msg memory hotplug is not supported >&2
 30 	if ! grep -q 1 $SYSFS/devices/system/memory/memory*/removable; then
 31 		echo $msg no hot-pluggable memory >&2
 37 # list all hot-pluggable memory
 41 	local state=${1:-.\*}
 [all …]
 
 | 
| /linux/sound/isa/wavefront/ | 
| H A D | wavefront_synth.c | 1 // SPDX-License-Identifier: GPL-2.0-only2 /* Copyright (C) by Paul Barton-Davis 1998-1999
 5  * copyright (C) by Hannu Savolainen 1993-1996
 14  * of GUS patches during loading, and full user-level access to all
 15  * WaveFront commands. It tries to provide semi-intelligent patch and
 36 			  loading. if non-zer
 1517 wavefront_synth_control(snd_wavefront_card_t * acard,wavefront_control * wc) wavefront_synth_control()  argument
 1668 wavefront_control *wc; snd_wavefront_synth_ioctl()  local
 [all...]
 | 
| /linux/drivers/infiniband/ulp/iser/ | 
| H A D | iscsi_iser.h | 7  * based on code maintained by open-iscsi@googlegroups.com11  * Copyright (c) 2013-2014 Mellanox Technologies. All rights reserved.
 23  *	- Redistributions of source code must retain the above
 27  *	- Redistributions in binary form must reproduce the above
 35  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 58 #include <linux/dma-mapping.h>
 125  * supports -EAGAIN scheme where tx is suspended till the QP has room for more *
 138 /* For Signature we don't support DATAOUTs so no need to make room for them */
 145 					 - ISER_MAX_TX_MISC_PDUS	\
 146 					 - ISER_MAX_RX_MISC_PDUS) /	\
 [all …]
 
 | 
| H A D | iser_initiator.c | 3  * Copyright (c) 2013-2014 Mellanox Technologies. All rights reserved.15  *	- Redistributions of source code must retain the above
 19  *	- Redistributions in binary form must reproduce the above
 27  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 43 /* Register user buffer memory and initialize passive rdma
 45  *  task->data[ISER_DIR_IN].data_len, Protection size
 46  *  os stored in task->prot[ISER_DIR_IN].data_len
 51 	struct iscsi_iser_task *iser_task = task->dd_data;  in iser_prepare_read_cmd()
 54 	struct iser_ctrl *hdr = &iser_task->desc.iser_header;  in iser_prepare_read_cmd()
 64 		iser_err("Failed to set up Data-IN RDMA\n");  in iser_prepare_read_cmd()
 [all …]
 
 | 
| H A D | iser_verbs.c | 4  * Copyright (c) 2013-2014 Mellanox Technologies. All rights reserved.16  *	- Redistributions of source code must retain the above
 20  *	- Redistributions in binary form must reproduce the above
 28  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 43 		 ib_event_msg(cause->event), cause->event);  in iser_qp_event_callback()
 50 		 ib_event_msg(event->event), event->event,  in iser_event_handler()
 51 		dev_name(&event->device->dev), event->element.port_num);  in iser_event_handler()
 55  * iser_create_device_ib_res - creates Protection Domain (PD), Completion
 56  * Queue (CQ), DMA Memory Region (DMA MR) with the device associated with
 59  * Return: 0 on success, -1 on failure
 [all …]
 
 | 
| /linux/drivers/md/ | 
| H A D | dm-writecache.c | 1 // SPDX-License-Identifier: GPL-2.0-only8 #include <linux/device-mapper.h>
 13 #include <linux/dm-io.h>
 14 #include <linux/dm-kcopyd.h>
 18 #include "dm-io-tracker.h"
 31 #define MAX_AGE_UNSPECIFIED		-1UL
 100 #define WC_MODE_PMEM(wc)			((wc)->pmem_mode)  argument
 101 #define WC_MODE_FUA(wc)				((wc)->writeback_fua)  argument
 103 #define WC_MODE_PMEM(wc)			false  argument
 104 #define WC_MODE_FUA(wc)				false  argument
 [all …]
 
 | 
| /linux/net/rds/ | 
| H A D | ib_cm.c | 14  *      - Redistributions of source code must retain the above18  *      - Redistributions in binary form must reproduce the above
 26  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 51 	conn->c_version = version;  in rds_ib_set_protocol()
 59 	struct rds_ib_connection *ic = conn->c_transport_data;  in rds_ib_set_flow_control()
 63 		ic->i_flowctl = 1;  in rds_ib_set_flow_control()
 66 		ic->i_flowctl = 0;  in rds_ib_set_flow_control()
 76 	struct rds_ib_connection *ic = conn->c_transport_data;  in rds_ib_cm_connect_complete()
 84 	dp = event->param.conn.private_data;  in rds_ib_cm_connect_complete()
 85 	if (conn->c_isv6) {  in rds_ib_cm_connect_complete()
 [all …]
 
 | 
| H A D | ib_frmr.c | 14  *      - Redistributions of source code must retain the above18  *      - Redistributions in binary form must reproduce the above
 26  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 40 	if (cmpxchg(&ibmr->u.frmr.fr_state,  in rds_transition_frwr_state()
 43 		/* enforce order of ibmr->u.frmr.fr_state update  in rds_transition_frwr_state()
 47 		atomic_dec(&ibmr->ic->i_fastreg_inuse_count);  in rds_transition_frwr_state()
 62 		pool = rds_ibdev->mr_8k_pool;  in rds_ib_alloc_frmr()
 64 		pool = rds_ibdev->mr_1m_pool;  in rds_ib_alloc_frmr()
 73 		err = -ENOMEM;  in rds_ib_alloc_frmr()
 77 	frmr = &ibmr->u.frmr;  in rds_ib_alloc_frmr()
 [all …]
 
 | 
| /linux/drivers/gpu/drm/i915/ | 
| H A D | i915_memcpy.c | 17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL55 		    :: "r" (src), "r" (dst) : "memory");  in __memcpy_ntdqa()
 58 		len -= 4;  in __memcpy_ntdqa()
 60 	while (len--) {  in __memcpy_ntdqa()
 63 		    :: "r" (src), "r" (dst) : "memory");  in __memcpy_ntdqa()
 84 		    :: "r" (src), "r" (dst) : "memory");  in __memcpy_ntdqu()
 87 		len -= 4;  in __memcpy_ntdqu()
 89 	while (len--) {  in __memcpy_ntdqu()
 92 		    :: "r" (src), "r" (dst) : "memory");  in __memcpy_ntdqu()
 101  * i915_memcpy_from_wc: perform an accelerated *aligned* read from WC
 [all …]
 
 | 
| /linux/drivers/gpu/drm/ | 
| H A D | drm_cache.c | 3  * Copyright (c) 2006-2007 Tungsten Graphics, Inc., Cedar Park, TX., USA20  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
 28  * Authors: Thomas Hellström <thomas-at-tungstengraphics-dot-com>
 34 #include <linux/iosys-map.h>
 71 	mb(); /*Full memory barrier used before so that CLFLUSH is ordered*/  in drm_cache_flush_clflush()
 79  * drm_clflush_pages - Flush dcache lines of a set of pages.
 114 	WARN_ONCE(1, "Architecture has no drm_cache.c support\n");  in drm_clflush_pages()
 120  * drm_clflush_sg - Flush dcache lines pointing to a scather-gather.
 133 		mb(); /*CLFLUSH is ordered only by using memory barriers*/  in drm_clflush_sg()
 143 	WARN_ONCE(1, "Architecture has no drm_cache.c support\n");  in drm_clflush_sg()
 [all …]
 
 | 
| /linux/arch/x86/kernel/cpu/mtrr/ | 
| H A D | mtrr.c | 1 // SPDX-License-Identifier: LGPL-2.0+2 /*  Generic MTRR (Memory Type Range Register) driver.
 4     Copyright (C) 1997-2000  Richard Gooch
 16     on 6-7 March 2002.
 18     System Programming Guide; Section 9.11. (1997 edition - PPro).
 61 /*  Returns non-zero if we have the write-combining memory type  */
 70 		 * write-combining. Don't allow it and leave room for other  in have_wrcomb()
 73 		if (dev->vendor == PCI_VENDOR_ID_SERVERWORKS &&  in have_wrcomb()
 74 		    dev->device == PCI_DEVICE_ID_SERVERWORKS_LE &&  in have_wrcomb()
 75 		    dev->revision <= 5) {  in have_wrcomb()
 [all …]
 
 | 
| /linux/sound/core/ | 
| H A D | memalloc.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later6  *  Generic memory allocators
 11 #include <linux/dma-mapping.h>
 12 #include <linux/dma-map-ops.h>
 34 	 __GFP_RETRY_MAYFAIL | /* don't trigger OOM-killer */ \
 35 	 __GFP_NOWARN)   /* no stack trace print - this call is non-critical */
 43 	if (WARN_ON_ONCE(!ops || !ops->alloc))  in __snd_dma_alloc_pages()
 45 	return ops->alloc(dmab, size);  in __snd_dma_alloc_pages()
 49  * snd_dma_alloc_dir_pages - allocate the buffer area according to the given
 57  * Calls the memory-allocator function for the corresponding
 [all …]
 
 | 
| /linux/fs/btrfs/ | 
| H A D | tree-log.c | 1 // SPDX-License-Identifier: GPL-2.013 #include "tree-log.h"
 14 #include "disk-io.h"
 19 #include "block-group.h"
 20 #include "space-info.h"
 21 #include "inode-item.h"
 24 #include "extent-tree.h"
 25 #include "root-tree.h"
 26 #include "dir-item.h"
 27 #include "file-item.h"
 [all …]
 
 | 
| H A D | extent-tree.c | 1 // SPDX-License-Identifier: GPL-2.020 #include "extent-tree.h"
 22 #include "disk-io.h"
 23 #include "print-tree.h"
 27 #include "free-space-cache.h"
 28 #include "free-space-tree.h"
 30 #include "ref-verify.h"
 31 #include "space-info.h"
 32 #include "block-rsv.h"
 35 #include "dev-replace.h"
 [all …]
 
 | 
| /linux/include/xen/interface/ | 
| H A D | xen.h | 1 /* SPDX-License-Identifier: MIT */69 /* Architecture-specific hypercall definitions. */
 83  * In the side comments, 'V.' denotes a per-VCPU VIRQ while 'G.' denotes a
 84  * global VIRQ. The former can be bound once per VCPU and cannot be re-bound.
 86  * allocated to VCPU0 but can subsequently be re-bound.
 97 #define VIRQ_MEM_EVENT  10 /* G. (DOM0) A memory event has occured           */
 99 #define VIRQ_ENOMEM     12 /* G. (DOM0) Low on heap memory       */
 102 /* Architecture-specific VIRQ definitions. */
 127  *                     x != 0 => PFD == x - 1
 129  * Sub-commands: ptr[1:0] specifies the appropriate MMU_* command.
 [all …]
 
 | 
| /linux/drivers/infiniband/hw/cxgb4/ | 
| H A D | cq.c | 2  * Copyright (c) 2009-2010 Chelsio, Inc. All rights reserved.14  *      - Redistributions of source code must retain the above
 18  *      - Redistributions in binary form must reproduce the above
 26  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 49 	res_wr->op_nres = cpu_to_be32(  in destroy_cq()
 53 	res_wr->len16_pkd = cpu_to_be32(DIV_ROUND_UP(wr_len, 16));  in destroy_cq()
 54 	res_wr->cookie = (uintptr_t)wr_waitp;  in destroy_cq()
 55 	res = res_wr->res;  in destroy_cq()
 56 	res->u.cq.restype = FW_RI_RES_TYPE_CQ;  in destroy_cq()
 57 	res->u.cq.op = FW_RI_RES_OP_RESET;  in destroy_cq()
 [all …]
 
 | 
| /linux/drivers/nvme/host/ | 
| H A D | rdma.c | 1 // SPDX-License-Identifier: GPL-2.04  * Copyright (c) 2015-2016 HGST, a Western Digital Company.
 14 #include <linux/blk-mq.h>
 15 #include <linux/blk-integrity.h>
 25 #include <linux/nvme-rdma.h>
 144  * allows read and write access to all physical memory.
 149 	 "Use memory registration even for contiguous memory regions");
 153 static void nvme_rdma_recv_done(struct ib_cq *cq, struct ib_wc *wc);
 161 	return queue - queue->ctrl->queues;  in nvme_rdma_queue_idx()
 167 		queue->ctrl->io_queues[HCTX_TYPE_DEFAULT] +  in nvme_rdma_poll_queue()
 [all …]
 
 | 
| /linux/fs/smb/client/ | 
| H A D | smbdirect.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later18 	struct smbdirect_socket *sc = &conn->socket;  in smbd_get_parameters()
 20 	return &sc->parameters;  in smbd_get_parameters()
 70 /* SMBD minimum receive size and fragmented sized defined in [MS-SMBD] */
 82 /* No need to retry on Receiver Not Ready since SMBD manages credits */
 87  * as defined in [MS-SMBD] 3.1.1.1
 99 /*  The maximum fragmented upper-layer payload receive size supported */
 102 /*  The maximum single-message size which can be received */
 174 	wake_up_all(&sc->status_wait);  in smbd_disconnect_wake_up_all()
 175 	wake_up_all(&sc->send_io.lcredits.wait_queue);  in smbd_disconnect_wake_up_all()
 [all …]
 
 | 
| /linux/drivers/net/ethernet/mellanox/mlx5/core/ | 
| H A D | wc.c | 1 // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB20 	/* data path - accessed per cqe */
 23 	/* data path - accessed per napi poll */
 50 	struct mlx5_core_cq *mcq = &cq->mcq;  in mlx5_wc_create_cqwq()
 55 	err = mlx5_cqwq_create(mdev, ¶m, cqc, &cq->wq, &cq->wq_ctrl);  in mlx5_wc_create_cqwq()
 59 	mcq->cqe_sz     = 64;  in mlx5_wc_create_cqwq()
 60 	mcq->set_ci_db  = cq->wq_ctrl.db.db;  in mlx5_wc_create_cqwq()
 61 	mcq->arm_db     = cq->wq_ctrl.db.db + 1;  in mlx5_wc_create_cqwq()
 63 	for (i = 0; i < mlx5_cqwq_get_size(&cq->wq); i++) {  in mlx5_wc_create_cqwq()
 64 		struct mlx5_cqe64 *cqe = mlx5_cqwq_get_wqe(&cq->wq, i);  in mlx5_wc_create_cqwq()
 [all …]
 
 | 
| /linux/drivers/infiniband/hw/qedr/ | 
| H A D | qedr_roce_cm.c | 2  * Copyright (c) 2015-2016  QLogic Corporation14  *      - Redistributions of source code must retain the above
 18  *      - Redistributions in binary form must reproduce the above
 26  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 32 #include <linux/dma-mapping.h>
 50 #include <rdma/qedr-abi.h>
 55 	info->gsi_cons = (info->gsi_cons + 1) % info->max_wr;  in qedr_inc_sw_gsi_cons()
 61 	dev->gsi_qp_created = 1;  in qedr_store_gsi_qp_cq()
 62 	dev->gsi_sqcq = get_qedr_cq(attrs->send_cq);  in qedr_store_gsi_qp_cq()
 63 	dev->gsi_rqcq = get_qedr_cq(attrs->recv_cq);  in qedr_store_gsi_qp_cq()
 [all …]
 
 | 
| /linux/drivers/infiniband/ulp/rtrs/ | 
| H A D | rtrs-clt.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later5  * Copyright (c) 2014 - 2018 ProfitBricks GmbH. All rights reserved.
 6  * Copyright (c) 2018 - 2019 1&1 IONOS Cloud GmbH. All rights reserved.
 7  * Copyright (c) 2019 - 2020 1&1 IONOS SE. All rights reserved.
 17 #include "rtrs-clt.h"
 18 #include "rtrs-log.h"
 19 #include "rtrs-clt-trace.h"
 49 	.name = "rtrs-client",
 58 	list_for_each_entry_rcu(clt_path, &clt->paths_list, s.entry)  in rtrs_clt_is_connected()
 59 		if (READ_ONCE(clt_path->state) == RTRS_CLT_CONNECTED) {  in rtrs_clt_is_connected()
 [all …]
 
 |