/linux/drivers/gpu/drm/xe/tests/ |
H A D | xe_gt_sriov_pf_service_test.c | 41 KUNIT_ASSERT_LE(test, gt->sriov.pf.service.version.base.minor, in pf_service_test_init() 42 gt->sriov.pf.service.version.latest.minor); in pf_service_test_init() 51 u32 major, minor; in pf_negotiate_any() local 56 &major, &minor)); in pf_negotiate_any() 58 KUNIT_ASSERT_EQ(test, minor, gt->sriov.pf.service.version.latest.minor); in pf_negotiate_any() 64 u32 major, minor; in pf_negotiate_base_match() local 69 gt->sriov.pf.service.version.base.minor, in pf_negotiate_base_match() 70 &major, &minor)); in pf_negotiate_base_match() 72 KUNIT_ASSERT_EQ(test, minor, gt->sriov.pf.service.version.base.minor); in pf_negotiate_base_match() 78 u32 major, minor; in pf_negotiate_base_newer() local [all …]
|
/linux/drivers/char/ |
H A D | lp.c | 209 static int lp_reset(int minor) in lp_reset() argument 212 lp_claim_parport_or_block(&lp_table[minor]); in lp_reset() 213 w_ctr(minor, LP_PSELECP); in lp_reset() 215 w_ctr(minor, LP_PSELECP | LP_PINITP); in lp_reset() 216 retval = r_str(minor); in lp_reset() 217 lp_release_parport(&lp_table[minor]); in lp_reset() 221 static void lp_error(int minor) in lp_error() argument 226 if (LP_F(minor) & LP_ABORT) in lp_error() 229 polling = lp_table[minor].dev->port->irq == PARPORT_IRQ_NONE; in lp_error() 231 lp_release_parport(&lp_table[minor]); in lp_error() [all …]
|
H A D | misc.c | 26 * Handling of mouse minor numbers for kerneld: 80 static void misc_minor_free(int minor) in misc_minor_free() argument 82 if (minor < DYNAMIC_MINORS) in misc_minor_free() 83 ida_free(&misc_minors_ida, DYNAMIC_MINORS - minor - 1); in misc_minor_free() 84 else if (minor > MISC_DYNAMIC_MINOR) in misc_minor_free() 85 ida_free(&misc_minors_ida, minor); in misc_minor_free() 109 seq_printf(seq, "%3i %s\n", p->minor, p->name ? p->name : ""); in misc_seq_show() 124 int minor = iminor(inode); in misc_open() local 132 if (iter->minor != minor) in misc_open() 141 request_module("char-major-%d-%d", MISC_MAJOR, minor); in misc_open() [all …]
|
/linux/sound/core/ |
H A D | sound.c | 70 static void snd_request_other(int minor) in snd_request_other() argument 74 switch (minor) { in snd_request_other() 86 * @minor: the minor number 89 * Checks that a minor device with the specified type is registered, and returns 93 * if an associated instance with the given minor number and type is found. 99 void *snd_lookup_minor_data(unsigned int minor, int type) in snd_lookup_minor_data() argument 104 if (minor >= ARRAY_SIZE(snd_minors)) in snd_lookup_minor_data() 107 mreg = snd_minors[minor]; in snd_lookup_minor_data() 119 static struct snd_minor *autoload_device(unsigned int minor) in autoload_device() argument 140 autoload_device(minor) global() argument 145 unsigned int minor = iminor(inode); snd_open() local 180 int minor; snd_find_free_minor() local 203 int minor; snd_find_free_minor() local 253 int minor; snd_register_device() local 301 int minor; snd_unregister_device() local 350 int minor; snd_minor_info_read() local [all...] |
H A D | sound_oss.c | 25 void *snd_lookup_oss_minor_data(unsigned int minor, int type) in snd_lookup_oss_minor_data() argument 30 if (minor >= ARRAY_SIZE(snd_oss_minors)) in snd_lookup_oss_minor_data() 33 mreg = snd_oss_minors[minor]; in snd_lookup_oss_minor_data() 46 int minor; in snd_oss_kernel_minor() local 52 minor = SNDRV_MINOR_OSS(card->number, (dev ? SNDRV_MINOR_OSS_MIXER1 : SNDRV_MINOR_OSS_MIXER)); in snd_oss_kernel_minor() 55 minor = SNDRV_MINOR_OSS_SEQUENCER; in snd_oss_kernel_minor() 58 minor = SNDRV_MINOR_OSS_MUSIC; in snd_oss_kernel_minor() 63 minor = SNDRV_MINOR_OSS(card->number, (dev ? SNDRV_MINOR_OSS_PCM1 : SNDRV_MINOR_OSS_PCM)); in snd_oss_kernel_minor() 68 minor = SNDRV_MINOR_OSS(card->number, (dev ? SNDRV_MINOR_OSS_MIDI1 : SNDRV_MINOR_OSS_MIDI)); in snd_oss_kernel_minor() 71 minor = SNDRV_MINOR_OSS(card->number, SNDRV_MINOR_OSS_DMFM); in snd_oss_kernel_minor() [all …]
|
/linux/drivers/usb/core/ |
H A D | file.c | 92 * usb_register_dev - register a USB device, and ask for a minor number 97 * If CONFIG_USB_DYNAMIC_MINORS is enabled, the minor number will be 99 * enabled, the minor number will be based on the next available free minor, 105 * the minor numbers given out by this function. 115 int minor; in usb_register_dev() local 122 * no holes in the minor range. in usb_register_dev() 129 if (intf->minor >= 0) in usb_register_dev() 132 dev_dbg(&intf->dev, "looking for a minor, starting at %d\n", minor_base); in usb_register_dev() 135 for (minor = minor_base; minor < MAX_USB_MINORS; ++minor) { in usb_register_dev() 136 if (usb_minors[minor]) in usb_register_dev() [all …]
|
/linux/drivers/staging/vme_user/ |
H A D | vme_user.c | 118 unsigned int minor; member 122 static ssize_t resource_to_user(int minor, char __user *buf, size_t count, in resource_to_user() argument 127 if (count > image[minor].size_buf) in resource_to_user() 128 count = image[minor].size_buf; in resource_to_user() 130 copied = vme_master_read(image[minor].resource, image[minor].kern_buf, in resource_to_user() 135 if (copy_to_user(buf, image[minor].kern_buf, (unsigned long)copied)) in resource_to_user() 141 static ssize_t resource_from_user(unsigned int minor, const char __user *buf, in resource_from_user() argument 144 if (count > image[minor].size_buf) in resource_from_user() 145 count = image[minor].size_buf; in resource_from_user() 147 if (copy_from_user(image[minor].kern_buf, buf, (unsigned long)count)) in resource_from_user() [all …]
|
/linux/drivers/media/platform/chips-media/coda/ |
H A D | trace.h | 19 __field(int, minor) 25 __entry->minor = ctx->fh.vdev->minor; 30 TP_printk("minor = %d, ctx = %d, cmd = %d", 31 __entry->minor, __entry->ctx, __entry->cmd) 40 __field(int, minor) 45 __entry->minor = ctx->fh.vdev->minor; 49 TP_printk("minor = %d, ctx = %d", __entry->minor, __entry->ctx) 58 __field(int, minor) 64 __entry->minor = ctx->fh.vdev->minor; 69 TP_printk("minor = %d, index = %d, ctx = %d", [all …]
|
/linux/arch/sparc/kernel/ |
H A D | hvapi.c | 16 * PRE_API flag set are major 1 minor 0. 21 unsigned long minor; member 81 p->major = p->minor = 0; in __put_ref() 86 * API group and desired major+minor. 93 * API group/major/minor with the hypervisor, and errors returned 97 unsigned long *minor) in sun4v_hvapi_register() argument 110 *minor = p->minor; in sun4v_hvapi_register() 117 hv_ret = sun4v_set_version(group, major, *minor, in sun4v_hvapi_register() 121 *minor = actual_minor; in sun4v_hvapi_register() 123 p->minor = actual_minor; in sun4v_hvapi_register() [all …]
|
/linux/drivers/hid/ |
H A D | hid-roccat.c | 40 unsigned int minor; member 150 unsigned int minor = iminor(inode); in roccat_open() local 161 device = devices[minor]; in roccat_open() 164 pr_emerg("roccat device with minor %d doesn't exist\n", minor); in roccat_open() 205 unsigned int minor = iminor(inode); in roccat_release() local 211 device = devices[minor]; in roccat_release() 214 pr_emerg("roccat device with minor %d doesn't exist\n", minor); in roccat_release() 240 * @minor: minor device number returned by roccat_connect() 247 int roccat_report_event(int minor, u8 const *data) in roccat_report_event() argument 254 device = devices[minor]; in roccat_report_event() [all …]
|
H A D | hidraw.c | 115 unsigned int minor = iminor(file_inode(file)); in hidraw_send_report() local 122 if (!hidraw_table[minor] || !hidraw_table[minor]->exist) { in hidraw_send_report() 127 dev = hidraw_table[minor]->hid; in hidraw_send_report() 193 unsigned int minor = iminor(file_inode(file)); in hidraw_get_report() local 201 if (!hidraw_table[minor] || !hidraw_table[minor]->exist) { in hidraw_get_report() 206 dev = hidraw_table[minor]->hid; in hidraw_get_report() 278 unsigned int minor = iminor(inode); in hidraw_open() local 295 if (!hidraw_table[minor] || !hidraw_table[minor]->exist) { in hidraw_open() 300 dev = hidraw_table[minor]; in hidraw_open() 316 list->hidraw = hidraw_table[minor]; in hidraw_open() [all …]
|
/linux/drivers/gpu/drm/ |
H A D | drm_drv.c | 82 * device. However, this doesn't mean that the minor is active. Minors are 115 struct drm_minor *minor = data; in drm_minor_alloc_release() local 117 WARN_ON(dev != minor->dev); in drm_minor_alloc_release() 119 put_device(minor->kdev); in drm_minor_alloc_release() 121 xa_erase(drm_minor_get_xa(minor->type), minor->index); in drm_minor_alloc_release() 126 * minor allocation scheme where minors 0-63 are primary nodes, 64-127 are control nodes, 140 struct drm_minor *minor; in drm_minor_alloc() local 143 minor = drmm_kzalloc(dev, sizeof(*minor), GFP_KERNEL); in drm_minor_alloc() 144 if (!minor) in drm_minor_alloc() 147 minor->type = type; in drm_minor_alloc() [all …]
|
H A D | drm_file.c | 121 * @minor: minor to allocate on 125 * @minor, so it must be freed before @minor is. 130 struct drm_file *drm_file_alloc(struct drm_minor *minor) in drm_file_alloc() argument 133 struct drm_device *dev = minor->dev; in drm_file_alloc() 144 file->minor = minor; in drm_file_alloc() 191 struct drm_device *dev = file_priv->minor->dev; in drm_events_release() 230 dev = file->minor->dev; in drm_file_free() 234 (long)old_encode_dev(file->minor->kdev->devt), in drm_file_free() 267 struct drm_device *dev = file_priv->minor->dev; in drm_close_helper() 293 * \param minor acquired minor-object. [all …]
|
/linux/drivers/accel/ |
H A D | drm_accel.c | 52 struct drm_minor *minor = node->minor; in accel_name_info() local 53 struct drm_device *dev = minor->dev; in accel_name_info() 95 struct drm_minor *minor = dev->accel; in accel_debugfs_register() local 97 minor->debugfs_root = dev->debugfs_root; in accel_debugfs_register() 100 dev->debugfs_root, minor); in accel_debugfs_register() 106 * @index: The minor's index 109 * the device's minor number. In addition, it sets the class and type of the 133 struct drm_minor *minor; in accel_open() local 136 minor = drm_minor_acquire(&accel_minors_xa, iminor(inode)); in accel_open() 137 if (IS_ERR(minor)) in accel_open() [all …]
|
/linux/drivers/gpu/drm/msm/ |
H A D | msm_debugfs.c | 215 struct drm_device *dev = node->minor->dev; in msm_gem_show() 233 struct drm_device *dev = node->minor->dev; in msm_mm_show() 244 struct drm_device *dev = node->minor->dev; in msm_fb_show() 275 static int late_init_minor(struct drm_minor *minor) in late_init_minor() argument 279 if (!minor) in late_init_minor() 282 ret = msm_rd_debugfs_init(minor); in late_init_minor() 284 DRM_DEV_ERROR(minor->dev->dev, "could not install rd debugfs\n"); in late_init_minor() 288 ret = msm_perf_debugfs_init(minor); in late_init_minor() 290 DRM_DEV_ERROR(minor->dev->dev, "could not install perf debugfs\n"); in late_init_minor() 307 static void msm_debugfs_gpu_init(struct drm_minor *minor) in msm_debugfs_gpu_init() argument [all …]
|
/linux/include/linux/ |
H A D | kdev_t.h | 11 #define MINOR(dev) ((unsigned int) ((dev) & MINORMASK)) macro 15 sprintf((buffer), "%u:%u\n", MAJOR(dev), MINOR(dev)) 19 sprintf(buffer, "%u:%u", MAJOR(dev), MINOR(dev)); \ 26 return MAJOR(dev) < 256 && MINOR(dev) < 256; in old_valid_dev() 31 return (MAJOR(dev) << 8) | MINOR(dev); in old_encode_dev() 42 unsigned minor = MINOR(dev); in new_encode_dev() local 43 return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12); in new_encode_dev() 49 unsigned minor = (dev & 0xff) | ((dev >> 12) & 0xfff00); in new_decode_dev() local 50 return MKDEV(major, minor); in new_decode_dev() 65 return MAJOR(dev) < (1<<14) && MINOR(dev) < (1<<18); in sysv_valid_dev() [all …]
|
H A D | lp.h | 22 #define LP_F(minor) lp_table[(minor)].flags /* flags for busy, etc. */ argument 23 #define LP_CHAR(minor) lp_table[(minor)].chars /* busy timeout */ argument 24 #define LP_TIME(minor) lp_table[(minor)].time /* wait time */ argument 25 #define LP_WAIT(minor) lp_table[(minor)].wait /* strobe wait */ argument 26 #define LP_IRQ(minor) lp_table[(minor)].dev->port->irq /* interrupt # */ argument 29 #define LP_STAT(minor) lp_table[(minor)].stats /* statistics area */ argument 80 * accessed with LP_C(minor)
|
/linux/include/sound/ |
H A D | minors.h | 6 * MINOR numbers 12 #define SNDRV_MINOR_CARD(minor) ((minor) >> 5) argument 13 #define SNDRV_MINOR_DEVICE(minor) ((minor) & 0x001f) argument 29 /* same as first respective minor number to make minor allocation easier */ 62 #define SNDRV_MINOR_OSS_CARD(minor) ((minor) >> 4) argument 63 #define SNDRV_MINOR_OSS_DEVICE(minor) ((minor) & 0x000f) argument 76 #define SNDRV_MINOR_OSS_DMMIDI 9 /* /dev/dmmidi0 - this device can have another minor # with OSS */ 77 #define SNDRV_MINOR_OSS_DMFM 10 /* /dev/dmfm0 - this device can have another minor # with OSS */
|
/linux/drivers/comedi/drivers/ |
H A D | comedi_bond.c | 37 * within each minor will be concatenated together in the order given here. 49 unsigned int minor; member 183 int minor = it->options[i]; in do_dev_config() local 189 if (minor < 0 || minor >= COMEDI_NUM_BOARD_MINORS) { in do_dev_config() 191 "Minor %d is invalid!\n", minor); in do_dev_config() 194 if (minor == dev->minor) { in do_dev_config() 199 if (test_and_set_bit(minor, devs_opened)) { in do_dev_config() 201 "Minor %d specified more than once!\n", minor); in do_dev_config() 205 snprintf(file, sizeof(file), "/dev/comedi%d", minor); in do_dev_config() 212 "Minor %u could not be opened\n", minor); in do_dev_config() [all …]
|
/linux/drivers/gpu/drm/xe/ |
H A D | xe_gt_sriov_pf_service.c | 30 gt->sriov.pf.service.version.base.minor = GUC_RELAY_VERSION_BASE_MINOR; in pf_init_versions() 34 gt->sriov.pf.service.version.latest.minor = GUC_RELAY_VERSION_LATEST_MINOR; in pf_init_versions() 40 u32 *major, u32 *minor) in pf_negotiate_version() argument 47 xe_gt_assert(gt, (base.major < latest.major) || (base.minor <= latest.minor)); in pf_negotiate_version() 53 *minor = latest.minor; in pf_negotiate_version() 60 *minor = latest.minor; in pf_negotiate_version() 66 (wanted_major == base.major && wanted_minor < base.minor)) { in pf_negotiate_version() 77 /* same major - return common minor */ in pf_negotiate_version() 79 *minor = min_t(u32, latest.minor, wanted_minor); in pf_negotiate_version() 83 static void pf_connect(struct xe_gt *gt, u32 vfid, u32 major, u32 minor) in pf_connect() argument [all …]
|
H A D | xe_gt_sriov_vf.c | 62 u32 *branch, u32 *major, u32 *minor, u32 *patch) in guc_action_match_version() argument 87 *minor = FIELD_GET(VF2GUC_MATCH_VERSION_RESPONSE_MSG_1_MINOR, response[1]); in guc_action_match_version() 93 static void vf_minimum_guc_version(struct xe_gt *gt, u32 *branch, u32 *major, u32 *minor) in vf_minimum_guc_version() argument 102 *minor = 1; in vf_minimum_guc_version() 108 *minor = 2; in vf_minimum_guc_version() 113 static void vf_wanted_guc_version(struct xe_gt *gt, u32 *branch, u32 *major, u32 *minor) in vf_wanted_guc_version() argument 116 return vf_minimum_guc_version(gt, branch, major, minor); in vf_wanted_guc_version() 124 u32 branch, major, minor, patch; in vf_handshake_with_guc() local 130 if (guc_version->major || guc_version->minor) { in vf_handshake_with_guc() 133 wanted_minor = guc_version->minor; in vf_handshake_with_guc() [all …]
|
/linux/drivers/accel/habanalabs/common/ |
H A D | security.h | 30 * @minor: number of minor blocks of particular type. 31 * @sub_minor: number of sub minor blocks of particular type. 34 * @minor_offset: address gap between 2 consecutive minor blocks of particular type, 40 * NIC<major>_UMR<minor>_<sub_minor> where major=12, minor=2, sub_minor=15. 42 * 2 blocks with different minor numbers (i.e. 0 to 1). Again, for each minor 53 u32 minor; member 136 u32 blk_idx, u32 major, u32 minor, u32 sub_minor); 150 * @minor: minor block index within the major block 151 * @sub_minor: sub_minor block index within the minor block 154 int (*fn)(struct hl_device *hdev, u32 block_id, u32 major, u32 minor,
|
/linux/drivers/md/ |
H A D | md-autodetect.c | 31 int minor; member 61 int minor, level, factor, fault, partitioned = 0; in md_setup() local 70 if (get_option(&str, &minor) != 2) { /* MD Number */ in md_setup() 76 if (md_setup_args[ent].minor == minor && in md_setup() 79 "Replacing previous definition.\n", partitioned?"d":"", minor); in md_setup() 83 printk(KERN_WARNING "md: md=%s%d - too many md initialisations\n", partitioned?"d":"", minor); in md_setup() 111 minor, pername, str); in md_setup() 114 md_setup_args[ent].minor = minor; in md_setup() 129 mdev = MKDEV(mdp_major, args->minor << MdpMinorShift); in md_setup_drive() 130 sprintf(name, "md_d%d", args->minor); in md_setup_drive() [all …]
|
/linux/include/trace/events/ |
H A D | v4l2.h | 101 TP_PROTO(int minor, struct v4l2_buffer *buf), 103 TP_ARGS(minor, buf), 106 __field(int, minor) 127 __entry->minor = minor; 147 TP_printk("minor = %d, index = %u, type = %s, bytesused = %u, " 151 "userbits = { %u %u %u %u } }, sequence = %u", __entry->minor, 172 TP_PROTO(int minor, struct v4l2_buffer *buf), 173 TP_ARGS(minor, buf) 177 TP_PROTO(int minor, struct v4l2_buffer *buf), 178 TP_ARGS(minor, buf) [all …]
|
/linux/security/ |
H A D | device_cgroup.c | 36 u32 major, minor; member 115 if (walk->minor != ex->minor) in dev_exception_add() 143 if (walk->minor != ex->minor) in dev_exception_rm() 304 set_majmin(min, ex->minor); in devcgroup_seq_show() 319 * @minor: device file minor number, ~0 to match all 328 u32 major, u32 minor, short access) in match_exception() argument 339 if (ex->minor != ~0 && ex->minor != minor) in match_exception() 354 * @minor: device file minor number, ~0 to match all 365 u32 major, u32 minor, short access) in match_exception_partial() argument 381 if (ex->minor != ~0 && minor != ~0 && ex->minor != minor) in match_exception_partial() [all …]
|