Skip to content
  • Alessandro Rubini's avatar
    core: use the new first-fit allocator for char devices · 371ff973
    Alessandro Rubini authored
    
    
    This replaces the previous allocation bitmask, which only supported
    small channel-sets, with the first-fit allocator. Minors are always
    taken from the smallest available slot starting from minor 0.
    
    Each cset is allocated separately, but this should not be a problem.
    
    With the zio-mini driver, which is not upstream yet, this works:
    
         insmod zio-mini.ko  nchan=300 ndev=20
    
    And we get all the devices we need.
    
        # ls -1 /sys/dev/char/250:* | wc -l
        12000
    
    The patch makes also some other renaming of functions (less underscores
    for functions exported by zio-cdev.c to zio-sys.c) and similar stuff
    that makes stuff clearer, if I happened to find them during this change.
    
    Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
    Acked-by: default avatarFederico Vaga <federico.vaga@gmail.com>
    371ff973