/linux-6.8/rust/kernel/ |
D | allocator.rs | 5 use core::alloc::{GlobalAlloc, Layout}; 18 unsafe fn krealloc_aligned(ptr: *mut u8, new_layout: Layout, flags: bindings::gfp_t) -> *mut u8 { in krealloc_aligned() argument 19 // Customized layouts from `Layout::from_size_align()` can have size < align, so pad first. in krealloc_aligned() 20 let layout = new_layout.pad_to_align(); in krealloc_aligned() localVariable 22 let mut size = layout.size(); in krealloc_aligned() 24 if layout.align() > bindings::ARCH_SLAB_MINALIGN { in krealloc_aligned() 29 // Note that `layout.size()` (after padding) is guaranteed to be a multiple of in krealloc_aligned() 30 // `layout.align()`, so `next_power_of_two` gives enough alignment guarantee. in krealloc_aligned() 37 // - `size` is greater than 0 since it's either a `layout.size()` (which cannot be zero in krealloc_aligned() 43 unsafe fn alloc(&self, layout: Layout) -> *mut u8 { in alloc() [all …]
|
/linux-6.8/drivers/clk/at91/ |
D | clk-programmable.c | 18 #define PROG_PRES(layout, pckr) ((pckr >> layout->pres_shift) & layout->pres_mask) argument 26 const struct clk_programmable_layout *layout; member 36 const struct clk_programmable_layout *layout = prog->layout; in clk_programmable_recalc_rate() local 42 if (layout->is_pres_direct) in clk_programmable_recalc_rate() 43 rate = parent_rate / (PROG_PRES(layout, pckr) + 1); in clk_programmable_recalc_rate() 45 rate = parent_rate >> PROG_PRES(layout, pckr); in clk_programmable_recalc_rate() 54 const struct clk_programmable_layout *layout = prog->layout; in clk_programmable_determine_rate() local 68 if (layout->is_pres_direct) { in clk_programmable_determine_rate() 69 for (shift = 0; shift <= layout->pres_mask; shift++) { in clk_programmable_determine_rate() 75 for (shift = 0; shift < layout->pres_mask; shift++) { in clk_programmable_determine_rate() [all …]
|
D | clk-pll.c | 20 #define PLL_MUL(reg, layout) (((reg) >> (layout)->mul_shift) & \ argument 21 (layout)->mul_mask) 23 #define PLL_MUL_MASK(layout) ((layout)->mul_mask) argument 24 #define PLL_MUL_MAX(layout) (PLL_MUL_MASK(layout) + 1) argument 41 const struct clk_pll_layout *layout; member 59 const struct clk_pll_layout *layout = pll->layout; in clk_pll_prepare() local 73 mul = PLL_MUL(pllr, layout); in clk_pll_prepare() 87 regmap_update_bits(regmap, offset, layout->pllr_mask, in clk_pll_prepare() 90 ((pll->mul & layout->mul_mask) << layout->mul_shift)); in clk_pll_prepare() 108 unsigned int mask = pll->layout->pllr_mask; in clk_pll_unprepare() [all …]
|
D | clk-generated.c | 29 const struct clk_pcr_layout *layout; member 44 regmap_write(gck->regmap, gck->layout->offset, in clk_generated_set() 45 (gck->id & gck->layout->pid_mask)); in clk_generated_set() 46 regmap_update_bits(gck->regmap, gck->layout->offset, in clk_generated_set() 47 AT91_PMC_PCR_GCKDIV_MASK | gck->layout->gckcss_mask | in clk_generated_set() 48 gck->layout->cmd | enable, in clk_generated_set() 49 field_prep(gck->layout->gckcss_mask, gck->parent_id) | in clk_generated_set() 50 gck->layout->cmd | in clk_generated_set() 76 regmap_write(gck->regmap, gck->layout->offset, in clk_generated_disable() 77 (gck->id & gck->layout->pid_mask)); in clk_generated_disable() [all …]
|
D | clk-peripheral.c | 39 const struct clk_pcr_layout *layout; member 173 regmap_write(periph->regmap, periph->layout->offset, in clk_sam9x5_peripheral_set() 174 (periph->id & periph->layout->pid_mask)); in clk_sam9x5_peripheral_set() 175 regmap_update_bits(periph->regmap, periph->layout->offset, in clk_sam9x5_peripheral_set() 176 periph->layout->div_mask | periph->layout->cmd | in clk_sam9x5_peripheral_set() 178 field_prep(periph->layout->div_mask, periph->div) | in clk_sam9x5_peripheral_set() 179 periph->layout->cmd | enable); in clk_sam9x5_peripheral_set() 201 regmap_write(periph->regmap, periph->layout->offset, in clk_sam9x5_peripheral_disable() 202 (periph->id & periph->layout->pid_mask)); in clk_sam9x5_peripheral_disable() 203 regmap_update_bits(periph->regmap, periph->layout->offset, in clk_sam9x5_peripheral_disable() [all …]
|
D | clk-sam9x60-pll.c | 35 const struct clk_pll_layout *layout; member 96 cmul = (val & core->layout->mul_mask) >> core->layout->mul_shift; in sam9x60_frac_pll_set() 97 cfrac = (val & core->layout->frac_mask) >> core->layout->frac_shift; in sam9x60_frac_pll_set() 111 (frac->mul << core->layout->mul_shift) | in sam9x60_frac_pll_set() 112 (frac->frac << core->layout->frac_shift)); in sam9x60_frac_pll_set() 263 cmul = (val & core->layout->mul_mask) >> core->layout->mul_shift; in sam9x60_frac_pll_set_rate_chg() 264 cfrac = (val & core->layout->frac_mask) >> core->layout->frac_shift; in sam9x60_frac_pll_set_rate_chg() 270 (frac->mul << core->layout->mul_shift) | in sam9x60_frac_pll_set_rate_chg() 271 (frac->frac << core->layout->frac_shift)); in sam9x60_frac_pll_set_rate_chg() 341 u32 ena_msk = enable ? core->layout->endiv_mask : 0; in sam9x60_div_pll_set_div() [all …]
|
D | clk-master.c | 31 const struct clk_master_layout *layout; member 90 const struct clk_master_layout *layout = master->layout; in clk_master_div_recalc_rate() local 96 regmap_read(master->regmap, master->layout->offset, &mckr); in clk_master_div_recalc_rate() 99 mckr &= layout->mask; in clk_master_div_recalc_rate() 121 regmap_read(master->regmap, master->layout->offset, &mckr); in clk_master_div_save_context() 124 mckr &= master->layout->mask; in clk_master_div_save_context() 142 regmap_read(master->regmap, master->layout->offset, &mckr); in clk_master_div_restore_context() 145 mckr &= master->layout->mask; in clk_master_div_restore_context() 188 ret = regmap_read(master->regmap, master->layout->offset, &mckr); in clk_master_div_set() 192 mckr &= master->layout->mask; in clk_master_div_set() [all …]
|
/linux-6.8/rust/alloc/ |
D | alloc.rs | 76 /// use std::alloc::{alloc, dealloc, handle_alloc_error, Layout}; 79 /// let layout = Layout::new::<u16>(); 80 /// let ptr = alloc(layout); 82 /// handle_alloc_error(layout); 88 /// dealloc(ptr, layout); 94 pub unsafe fn alloc(layout: Layout) -> *mut u8 { in alloc() 100 __rust_alloc(layout.size(), layout.align()) in alloc() 118 pub unsafe fn dealloc(ptr: *mut u8, layout: Layout) { in dealloc() argument 119 unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } in dealloc() 137 pub unsafe fn realloc(ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 { in realloc() argument [all …]
|
D | raw_vec.rs | 14 use crate::alloc::{Allocator, Global, Layout}; 184 let layout = match Layout::array::<T>(capacity) { in allocate_in() localVariable 185 Ok(layout) => layout, in allocate_in() 188 match alloc_guard(layout.size()) { in allocate_in() 193 AllocInit::Uninitialized => alloc.allocate(layout), in allocate_in() 194 AllocInit::Zeroed => alloc.allocate_zeroed(layout), in allocate_in() 198 Err(_) => handle_alloc_error(layout), in allocate_in() 218 let layout = Layout::array::<T>(capacity).map_err(|_| CapacityOverflow)?; in try_allocate_in() localVariable 219 alloc_guard(layout.size())?; in try_allocate_in() 221 AllocInit::Uninitialized => alloc.allocate(layout), in try_allocate_in() [all …]
|
/linux-6.8/drivers/net/can/spi/mcp251xfd/ |
D | mcp251xfd-ethtool.c | 22 struct can_ram_layout layout; in mcp251xfd_ring_get_ringparam() local 24 can_ram_get_layout(&layout, &mcp251xfd_ram_config, NULL, NULL, fd_mode); in mcp251xfd_ring_get_ringparam() 25 ring->rx_max_pending = layout.max_rx; in mcp251xfd_ring_get_ringparam() 26 ring->tx_max_pending = layout.max_tx; in mcp251xfd_ring_get_ringparam() 40 struct can_ram_layout layout; in mcp251xfd_ring_set_ringparam() local 42 can_ram_get_layout(&layout, &mcp251xfd_ram_config, ring, NULL, fd_mode); in mcp251xfd_ring_set_ringparam() 43 if ((layout.cur_rx != priv->rx_obj_num || in mcp251xfd_ring_set_ringparam() 44 layout.cur_tx != priv->tx->obj_num) && in mcp251xfd_ring_set_ringparam() 48 priv->rx_obj_num = layout.cur_rx; in mcp251xfd_ring_set_ringparam() 49 priv->rx_obj_num_coalesce_irq = layout.rx_coalesce; in mcp251xfd_ring_set_ringparam() [all …]
|
D | mcp251xfd-ram.c | 60 void can_ram_get_layout(struct can_ram_layout *layout, in can_ram_get_layout() argument 79 layout->default_rx = can_ram_rounddown_pow_of_two(config, &config->rx, 0, num_rx); in can_ram_get_layout() 80 layout->default_tx = num_tx; in can_ram_get_layout() 92 layout->max_rx = can_ram_rounddown_pow_of_two(config, &config->rx, 0, num_rx); in can_ram_get_layout() 93 layout->max_tx = can_ram_rounddown_pow_of_two(config, &config->tx, 0, num_tx); in can_ram_get_layout() 143 layout->cur_rx = num_rx; in can_ram_get_layout() 144 layout->cur_tx = num_tx; in can_ram_get_layout() 145 layout->rx_coalesce = num_rx_coalesce; in can_ram_get_layout() 146 layout->tx_coalesce = num_tx_coalesce; in can_ram_get_layout() 148 layout->cur_rx = layout->default_rx; in can_ram_get_layout() [all …]
|
/linux-6.8/drivers/gpu/drm/msm/disp/dpu1/ |
D | dpu_formats.c | 636 struct dpu_hw_fmt_layout *layout) in _dpu_format_get_plane_sizes_ubwc() argument 642 memset(layout, 0, sizeof(struct dpu_hw_fmt_layout)); in _dpu_format_get_plane_sizes_ubwc() 643 layout->format = fmt; in _dpu_format_get_plane_sizes_ubwc() 644 layout->width = width; in _dpu_format_get_plane_sizes_ubwc() 645 layout->height = height; in _dpu_format_get_plane_sizes_ubwc() 646 layout->num_planes = fmt->num_planes; in _dpu_format_get_plane_sizes_ubwc() 655 if (DPU_FORMAT_IS_YUV(layout->format)) { in _dpu_format_get_plane_sizes_ubwc() 660 layout->num_planes = 2; in _dpu_format_get_plane_sizes_ubwc() 661 layout->plane_pitch[0] = VENUS_Y_STRIDE(color, width); in _dpu_format_get_plane_sizes_ubwc() 663 layout->plane_size[0] = MSM_MEDIA_ALIGN(layout->plane_pitch[0] * in _dpu_format_get_plane_sizes_ubwc() [all …]
|
/linux-6.8/drivers/gpio/ |
D | gpio-creg-snps.c | 27 const struct creg_layout *layout; member 33 const struct creg_layout *layout = hcg->layout; in creg_gpio_set() local 38 value = val ? hcg->layout->on[offset] : hcg->layout->off[offset]; in creg_gpio_set() 40 reg_shift = layout->shift[offset]; in creg_gpio_set() 42 reg_shift += layout->bit_per_gpio[i] + layout->shift[i]; in creg_gpio_set() 46 reg &= ~(GENMASK(layout->bit_per_gpio[i] - 1, 0) << reg_shift); in creg_gpio_set() 62 const struct creg_layout *layout = hcg->layout; in creg_gpio_validate_pg() local 64 if (layout->bit_per_gpio[i] < 1 || layout->bit_per_gpio[i] > 8) in creg_gpio_validate_pg() 68 if (GENMASK(31, layout->bit_per_gpio[i]) & layout->on[i]) in creg_gpio_validate_pg() 72 if (GENMASK(31, layout->bit_per_gpio[i]) & layout->off[i]) in creg_gpio_validate_pg() [all …]
|
/linux-6.8/sound/soc/intel/avs/ |
D | apl.c | 53 struct apl_log_buffer_layout layout; in apl_log_buffer_status() local 60 memcpy_fromio(&layout, addr, sizeof(layout)); in apl_log_buffer_status() 68 if (layout.read_ptr > layout.write_ptr) { in apl_log_buffer_status() 69 avs_dump_fw_log(adev, buf + layout.read_ptr, in apl_log_buffer_status() 70 apl_log_payload_size(adev) - layout.read_ptr); in apl_log_buffer_status() 71 layout.read_ptr = 0; in apl_log_buffer_status() 73 avs_dump_fw_log_wakeup(adev, buf + layout.read_ptr, layout.write_ptr - layout.read_ptr); in apl_log_buffer_status() 76 writel(layout.write_ptr, addr); in apl_log_buffer_status() 80 static int apl_wait_log_entry(struct avs_dev *adev, u32 core, struct apl_log_buffer_layout *layout) in apl_wait_log_entry() argument 92 memcpy_fromio(layout, addr, sizeof(*layout)); in apl_wait_log_entry() [all …]
|
/linux-6.8/drivers/nvmem/ |
D | layouts.c | 3 * NVMEM layout bus handling 32 struct nvmem_layout *layout = to_nvmem_layout_device(dev); in nvmem_layout_bus_probe() local 37 return drv->probe(layout); in nvmem_layout_bus_probe() 43 struct nvmem_layout *layout = to_nvmem_layout_device(dev); in nvmem_layout_bus_remove() local 45 return drv->remove(layout); in nvmem_layout_bus_remove() 49 .name = "nvmem-layout", 71 struct nvmem_layout *layout = to_nvmem_layout_device(dev); in nvmem_layout_release_device() local 73 of_node_put(layout->dev.of_node); in nvmem_layout_release_device() 74 kfree(layout); in nvmem_layout_release_device() 80 struct nvmem_layout *layout; in nvmem_layout_create_device() local [all …]
|
/linux-6.8/sound/aoa/fabrics/ |
D | layout.c | 3 * Apple Onboard Audio driver -- layout/machine id fabric 8 * layout-id or device-id property in the device tree. 20 MODULE_DESCRIPTION("Layout-ID fabric for snd-aoa"); 24 /* These are the connections the layout fabric 63 struct layout { struct 69 * so that our layout table doesn't need to be filled argument 73 * multiple layout-ids */ 78 MODULE_ALIAS("sound-layout-36"); argument 79 MODULE_ALIAS("sound-layout-41"); 80 MODULE_ALIAS("sound-layout-45"); [all …]
|
/linux-6.8/Documentation/filesystems/nfs/ |
D | pnfs.rst | 17 Each nfs_inode may hold a pointer to a cache of these layout 18 segments in nfsi->layout, of type struct pnfs_layout_hdr. 26 the reference count, as the layout is kept around by the lseg that 33 layout driver type. The device ids are held in a RCU cache (struct 62 layout drivers 65 PNFS utilizes what is called layout drivers. The STD defines 4 basic 66 layout types: "files", "objects", "blocks", and "flexfiles". For each 67 of these types there is a layout-driver with a common function-vectors 69 different layout types. 71 Files-layout-driver code is in: fs/nfs/filelayout/.. directory [all …]
|
/linux-6.8/drivers/nvmem/layouts/ |
D | onie-tlv.c | 8 * Inspired by the first layout written by: Rafał Miłecki <rafal@milecki.pl> 102 struct device_node *layout; in onie_tlv_add_cells() local 108 layout = of_nvmem_layout_get_container(nvmem); in onie_tlv_add_cells() 109 if (!layout) in onie_tlv_add_cells() 126 cell.np = of_get_child_by_name(layout, cell.name); in onie_tlv_add_cells() 131 of_node_put(layout); in onie_tlv_add_cells() 138 of_node_put(layout); in onie_tlv_add_cells() 185 static int onie_tlv_parse_table(struct nvmem_layout *layout) in onie_tlv_parse_table() argument 187 struct nvmem_device *nvmem = layout->nvmem; in onie_tlv_parse_table() 188 struct device *dev = &layout->dev; in onie_tlv_parse_table() [all …]
|
D | sl28vpd.c | 83 static int sl28vpd_add_cells(struct nvmem_layout *layout) in sl28vpd_add_cells() argument 85 struct nvmem_device *nvmem = layout->nvmem; in sl28vpd_add_cells() 86 struct device *dev = &layout->dev; in sl28vpd_add_cells() 139 static int sl28vpd_probe(struct nvmem_layout *layout) in sl28vpd_probe() argument 141 layout->add_cells = sl28vpd_add_cells; in sl28vpd_probe() 143 return nvmem_layout_register(layout); in sl28vpd_probe() 146 static void sl28vpd_remove(struct nvmem_layout *layout) in sl28vpd_remove() argument 148 nvmem_layout_unregister(layout); in sl28vpd_remove() 160 .name = "kontron-sl28vpd-layout", 170 MODULE_DESCRIPTION("NVMEM layout driver for the VPD of Kontron sl28 boards");
|
/linux-6.8/fs/ext4/ |
D | mballoc-test.c | 70 struct mbt_ext4_block_layout *layout) in mbt_init_sb_layout() argument 75 sb->s_blocksize = 1UL << layout->blocksize_bits; in mbt_init_sb_layout() 76 sb->s_blocksize_bits = layout->blocksize_bits; in mbt_init_sb_layout() 78 sbi->s_groups_count = layout->group_count; in mbt_init_sb_layout() 79 sbi->s_blocks_per_group = layout->blocks_per_group; in mbt_init_sb_layout() 80 sbi->s_cluster_bits = layout->cluster_bits; in mbt_init_sb_layout() 81 sbi->s_cluster_ratio = 1U << layout->cluster_bits; in mbt_init_sb_layout() 82 sbi->s_clusters_per_group = layout->blocks_per_group >> in mbt_init_sb_layout() 83 layout->cluster_bits; in mbt_init_sb_layout() 84 sbi->s_desc_size = layout->desc_size; in mbt_init_sb_layout() [all …]
|
/linux-6.8/fs/ceph/ |
D | ioctl.h | 11 * CEPH_IOC_GET_LAYOUT - get file layout or dir layout policy 12 * CEPH_IOC_SET_LAYOUT - set file layout 13 * CEPH_IOC_SET_LAYOUT_POLICY - set dir layout policy 15 * The file layout specifies how file data is striped over objects in 20 * Files get a new layout based on the policy set on the containing 22 * you examine the layout for a file or the policy on a directory. 24 * SET_LAYOUT will let you set a layout on a newly created file. This 28 * SET_LAYOUT_POLICY will let you set a layout policy (default layout) 30 * directory (or any child directory that doesn't specify a layout of
|
/linux-6.8/include/linux/ |
D | nvmem-provider.h | 102 * @layout: Fixed layout associated with this nvmem device. 127 struct nvmem_layout *layout; member 160 * struct nvmem_layout - NVMEM layout definitions 162 * @dev: Device-model layout device. 165 * has this layout. The function will add layout 170 * pairs. A nvmem layout can parse the nvmem device and add appropriate 176 int (*add_cells)(struct nvmem_layout *layout); 181 int (*probe)(struct nvmem_layout *layout); 182 void (*remove)(struct nvmem_layout *layout); 199 int nvmem_layout_register(struct nvmem_layout *layout); [all …]
|
/linux-6.8/drivers/gpu/drm/atmel-hlcdc/ |
D | atmel_hlcdc_plane.c | 291 if (!desc->layout.scaler_config) in atmel_hlcdc_plane_setup_scaler() 296 desc->layout.scaler_config, 0); in atmel_hlcdc_plane_setup_scaler() 300 if (desc->layout.phicoeffs.x) { in atmel_hlcdc_plane_setup_scaler() 314 desc->layout.phicoeffs.x); in atmel_hlcdc_plane_setup_scaler() 321 desc->layout.phicoeffs.y); in atmel_hlcdc_plane_setup_scaler() 327 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.scaler_config, in atmel_hlcdc_plane_setup_scaler() 339 if (desc->layout.size) in atmel_hlcdc_plane_update_pos_and_size() 340 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.size, in atmel_hlcdc_plane_update_pos_and_size() 344 if (desc->layout.memsize) in atmel_hlcdc_plane_update_pos_and_size() 346 desc->layout.memsize, in atmel_hlcdc_plane_update_pos_and_size() [all …]
|
/linux-6.8/Documentation/devicetree/bindings/nvmem/layouts/ |
D | fixed-layout.yaml | 4 $id: http://devicetree.org/schemas/nvmem/layouts/fixed-layout.yaml# 7 title: NVMEM layout for fixed NVMEM cells 10 Many NVMEM devices have hardcoded cells layout (offset and size of defined 13 This binding allows defining such NVMEM layout with its cells. It can be used 21 const: fixed-layout 42 nvmem-layout { 43 compatible = "fixed-layout";
|
/linux-6.8/drivers/mfd/ |
D | atmel-smc.c | 259 * @layout: the layout of registers 266 const struct atmel_hsmc_reg_layout *layout, in atmel_hsmc_cs_conf_apply() argument 269 regmap_write(regmap, ATMEL_HSMC_SETUP(layout, cs), conf->setup); in atmel_hsmc_cs_conf_apply() 270 regmap_write(regmap, ATMEL_HSMC_PULSE(layout, cs), conf->pulse); in atmel_hsmc_cs_conf_apply() 271 regmap_write(regmap, ATMEL_HSMC_CYCLE(layout, cs), conf->cycle); in atmel_hsmc_cs_conf_apply() 272 regmap_write(regmap, ATMEL_HSMC_TIMINGS(layout, cs), conf->timings); in atmel_hsmc_cs_conf_apply() 273 regmap_write(regmap, ATMEL_HSMC_MODE(layout, cs), conf->mode); in atmel_hsmc_cs_conf_apply() 300 * @layout: the layout of registers 307 const struct atmel_hsmc_reg_layout *layout, in atmel_hsmc_cs_conf_get() argument 310 regmap_read(regmap, ATMEL_HSMC_SETUP(layout, cs), &conf->setup); in atmel_hsmc_cs_conf_get() [all …]
|