Home
last modified time | relevance | path

Searched refs:major (Results 1 – 8 of 8) sorted by relevance

/DragonOS/kernel/src/driver/base/char/
H A Dmod.rs48 fn major_to_index(major: Major) -> usize { in major_to_index()
49 return (major.data() % DEV_MAJOR_HASH_SIZE) as usize; in major_to_index()
73 if item.device_number().major().data() == index { in find_dynamic_major()
129 let mut major = device_number.major(); in __register_chardev_region() localVariable
131 if major >= DEV_MAJOR_MAX { in __register_chardev_region()
135 major, in __register_chardev_region()
143 let chardev = DeviceStruct::new(DeviceNumber::new(major, baseminor), minorct, name); in __register_chardev_region()
144 if major == Major::UNNAMED_MAJOR { in __register_chardev_region()
146 major = Self::find_dynamic_major().expect("Find synamic major error.\n"); in __register_chardev_region()
148 if let Some(items) = CHARDEVS.lock().get_mut(Self::major_to_index(major)) { in __register_chardev_region()
[all …]
/DragonOS/kernel/src/driver/base/device/
H A Ddevice_number.rs44 pub const fn new(major: Major, minor: u32) -> Self { in new()
46 data: (major.data() << Self::MINOR_BITS) | minor, in new()
50 pub const fn major(&self) -> Major { in major() method
H A Dmod.rs340 return format!("{}:{}", id.major().data(), id.minor()); in name()
534 if device.id_table().device_number().major() != Major::UNNAMED_MAJOR { in add_device()
940 device_number.major().data(), in show()
/DragonOS/kernel/src/driver/base/block/
H A Dblock_device.rs504 fn major_to_index(major: Major) -> usize { in major_to_index()
505 return (major.data() % DEV_MAJOR_HASH_SIZE) as usize; in major_to_index()
529 if item.device_number().major() == Major::new(index) { in find_dynamic_major()
585 let mut major = device_number.major(); in __register_blockdev_region() localVariable
587 if major >= DEV_MAJOR_MAX { in __register_blockdev_region()
591 major, in __register_blockdev_region()
599 let blockdev = DeviceStruct::new(DeviceNumber::new(major, baseminor), minorct, name); in __register_blockdev_region()
600 if major == Major::UNNAMED_MAJOR { in __register_blockdev_region()
602 major = Self::find_dynamic_major().expect("Find synamic major error.\n"); in __register_blockdev_region()
604 if let Some(items) = BLOCKDEVS.lock().get_mut(Self::major_to_index(major)) { in __register_blockdev_region()
[all …]
/DragonOS/kernel/src/driver/base/map/
H A Dmod.rs69 .get_mut((dev_t.major().data() % 255) as usize) in kobj_map()
73 DeviceNumber::new(dev_t.major(), dev_t.minor() + i as u32), in kobj_map()
90 .get_mut((dev_t.major().data() % 255) as usize) in kobj_unmap()
93 let rm_dev_t = &DeviceNumber::new(dev_t.major(), dev_t.minor() + i as u32); in kobj_unmap()
107 if let Some(map) = domain.0.lock().0.get((dev_t.major().data() % 255) as usize) { in kobj_lookup()
/DragonOS/kernel/src/driver/tty/
H A Dtty_driver.rs58 let base = DeviceNumber::new(driver.major, driver.minor_start); in lookup_tty_driver()
71 if driver.major == Major::UNNAMED_MAJOR { in tty_register_driver()
77 driver.major = dev_num.major(); in tty_register_driver()
80 let dev_num = DeviceNumber::new(driver.major, driver.minor_start); in tty_register_driver()
112 major: Major, field
148 major: Major, in new()
163 major, in new()
208 self.major, in device_number()
/DragonOS/kernel/src/driver/firmware/efi/
H A Dmod.rs98 if header.revision.major() < min_major { in check_system_table_header()
/DragonOS/
H A DLICENSE162 form) with the major components (compiler, kernel, and so on) of the