| /kernel/linux/linux-6.6/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::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 …]
|
| /kernel/linux/linux-5.10/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 35 const struct clk_programmable_layout *layout = prog->layout; in clk_programmable_recalc_rate() local 41 if (layout->is_pres_direct) in clk_programmable_recalc_rate() 42 rate = parent_rate / (PROG_PRES(layout, pckr) + 1); in clk_programmable_recalc_rate() 44 rate = parent_rate >> PROG_PRES(layout, pckr); in clk_programmable_recalc_rate() 53 const struct clk_programmable_layout *layout = prog->layout; in clk_programmable_determine_rate() local 67 if (layout->is_pres_direct) { in clk_programmable_determine_rate() 68 for (shift = 0; shift <= layout->pres_mask; shift++) { in clk_programmable_determine_rate() 74 for (shift = 0; shift < layout->pres_mask; shift++) { in clk_programmable_determine_rate() [all …]
|
| D | clk-generated.c | 29 const struct clk_pcr_layout *layout; member 46 regmap_write(gck->regmap, gck->layout->offset, in clk_generated_enable() 47 (gck->id & gck->layout->pid_mask)); in clk_generated_enable() 48 regmap_update_bits(gck->regmap, gck->layout->offset, in clk_generated_enable() 49 AT91_PMC_PCR_GCKDIV_MASK | gck->layout->gckcss_mask | in clk_generated_enable() 50 gck->layout->cmd | AT91_PMC_PCR_GCKEN, in clk_generated_enable() 51 field_prep(gck->layout->gckcss_mask, gck->parent_id) | in clk_generated_enable() 52 gck->layout->cmd | in clk_generated_enable() 65 regmap_write(gck->regmap, gck->layout->offset, in clk_generated_disable() 66 (gck->id & gck->layout->pid_mask)); in clk_generated_disable() [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 58 const struct clk_pll_layout *layout = pll->layout; in clk_pll_prepare() local 72 mul = PLL_MUL(pllr, layout); in clk_pll_prepare() 86 regmap_update_bits(regmap, offset, layout->pllr_mask, in clk_pll_prepare() 89 ((pll->mul & layout->mul_mask) << layout->mul_shift)); in clk_pll_prepare() 107 unsigned int mask = pll->layout->pllr_mask; in clk_pll_unprepare() [all …]
|
| D | clk-peripheral.c | 39 const struct clk_pcr_layout *layout; member 167 regmap_write(periph->regmap, periph->layout->offset, in clk_sam9x5_peripheral_enable() 168 (periph->id & periph->layout->pid_mask)); in clk_sam9x5_peripheral_enable() 169 regmap_update_bits(periph->regmap, periph->layout->offset, in clk_sam9x5_peripheral_enable() 170 periph->layout->div_mask | periph->layout->cmd | in clk_sam9x5_peripheral_enable() 172 field_prep(periph->layout->div_mask, periph->div) | in clk_sam9x5_peripheral_enable() 173 periph->layout->cmd | in clk_sam9x5_peripheral_enable() 189 regmap_write(periph->regmap, periph->layout->offset, in clk_sam9x5_peripheral_disable() 190 (periph->id & periph->layout->pid_mask)); in clk_sam9x5_peripheral_disable() 191 regmap_update_bits(periph->regmap, periph->layout->offset, in clk_sam9x5_peripheral_disable() [all …]
|
| /kernel/linux/linux-6.6/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 …]
|
| /kernel/linux/linux-6.6/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 …]
|
| /kernel/linux/linux-6.6/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() 106 if (num_rx > layout->max_rx) in can_ram_get_layout() 107 num_rx = layout->default_rx; in can_ram_get_layout() 152 layout->cur_rx = num_rx; in can_ram_get_layout() 153 layout->cur_tx = num_tx; in can_ram_get_layout() 154 layout->rx_coalesce = num_rx_coalesce; in can_ram_get_layout() [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/msm/disp/dpu1/ |
| D | dpu_formats.c | 602 struct dpu_hw_fmt_layout *layout) in _dpu_format_get_plane_sizes_ubwc() argument 608 memset(layout, 0, sizeof(struct dpu_hw_fmt_layout)); in _dpu_format_get_plane_sizes_ubwc() 609 layout->format = fmt; in _dpu_format_get_plane_sizes_ubwc() 610 layout->width = width; in _dpu_format_get_plane_sizes_ubwc() 611 layout->height = height; in _dpu_format_get_plane_sizes_ubwc() 612 layout->num_planes = fmt->num_planes; in _dpu_format_get_plane_sizes_ubwc() 621 if (DPU_FORMAT_IS_YUV(layout->format)) { in _dpu_format_get_plane_sizes_ubwc() 626 layout->num_planes = 2; in _dpu_format_get_plane_sizes_ubwc() 627 layout->plane_pitch[0] = VENUS_Y_STRIDE(color, width); in _dpu_format_get_plane_sizes_ubwc() 629 layout->plane_size[0] = MSM_MEDIA_ALIGN(layout->plane_pitch[0] * in _dpu_format_get_plane_sizes_ubwc() [all …]
|
| /kernel/linux/linux-6.6/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 …]
|
| /kernel/linux/linux-6.6/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 …]
|
| /kernel/linux/linux-5.10/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 …]
|
| /kernel/linux/linux-6.6/sound/soc/intel/avs/ |
| D | apl.c | 53 struct avs_apl_log_buffer_layout layout; in avs_apl_log_buffer_status() local 60 memcpy_fromio(&layout, addr, sizeof(layout)); in avs_apl_log_buffer_status() 68 if (layout.read_ptr > layout.write_ptr) { in avs_apl_log_buffer_status() 69 avs_dump_fw_log(adev, buf + layout.read_ptr, in avs_apl_log_buffer_status() 70 avs_apl_log_payload_size(adev) - layout.read_ptr); in avs_apl_log_buffer_status() 71 layout.read_ptr = 0; in avs_apl_log_buffer_status() 73 avs_dump_fw_log_wakeup(adev, buf + layout.read_ptr, layout.write_ptr - layout.read_ptr); in avs_apl_log_buffer_status() 76 writel(layout.write_ptr, addr); in avs_apl_log_buffer_status() 81 struct avs_apl_log_buffer_layout *layout) in avs_apl_wait_log_entry() argument 93 memcpy_fromio(layout, addr, sizeof(*layout)); in avs_apl_wait_log_entry() [all …]
|
| /kernel/linux/linux-5.10/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. 19 MODULE_DESCRIPTION("Layout-ID fabric for snd-aoa"); 23 /* These are the connections the layout fabric 62 struct layout { struct 68 * so that our layout table doesn't need to be filled argument 72 * multiple layout-ids */ 77 MODULE_ALIAS("sound-layout-36"); argument 78 MODULE_ALIAS("sound-layout-41"); 79 MODULE_ALIAS("sound-layout-45"); [all …]
|
| /kernel/linux/linux-6.6/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. 19 MODULE_DESCRIPTION("Layout-ID fabric for snd-aoa"); 23 /* These are the connections the layout fabric 62 struct layout { struct 68 * so that our layout table doesn't need to be filled argument 72 * multiple layout-ids */ 77 MODULE_ALIAS("sound-layout-36"); argument 78 MODULE_ALIAS("sound-layout-41"); 79 MODULE_ALIAS("sound-layout-45"); [all …]
|
| /kernel/linux/linux-5.10/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 …]
|
| /kernel/linux/linux-6.6/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 …]
|
| /kernel/linux/linux-6.6/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
|
| /kernel/linux/linux-5.10/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
|