Subversion Repositories Kolibri OS

Rev

Rev 6082 | Rev 6936 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6082 Rev 6934
Line 554... Line 554...
554
 * Returns -errno, or 0 for success.
554
 * Returns -errno, or 0 for success.
555
 */
555
 */
556
static inline int cpumask_parse_user(const char __user *buf, int len,
556
static inline int cpumask_parse_user(const char __user *buf, int len,
557
				     struct cpumask *dstp)
557
				     struct cpumask *dstp)
558
{
558
{
559
	return bitmap_parse_user(buf, len, cpumask_bits(dstp), nr_cpu_ids);
559
	return bitmap_parse_user(buf, len, cpumask_bits(dstp), nr_cpumask_bits);
560
}
560
}
Line 561... Line 561...
561
 
561
 
562
/**
562
/**
563
 * cpumask_parselist_user - extract a cpumask from a user string
563
 * cpumask_parselist_user - extract a cpumask from a user string
Line 569... Line 569...
569
 */
569
 */
570
static inline int cpumask_parselist_user(const char __user *buf, int len,
570
static inline int cpumask_parselist_user(const char __user *buf, int len,
571
				     struct cpumask *dstp)
571
				     struct cpumask *dstp)
572
{
572
{
573
	return bitmap_parselist_user(buf, len, cpumask_bits(dstp),
573
	return bitmap_parselist_user(buf, len, cpumask_bits(dstp),
574
				     nr_cpu_ids);
574
				     nr_cpumask_bits);
575
}
575
}
Line 576... Line 576...
576
 
576
 
577
/**
577
/**
578
 * cpumask_parse - extract a cpumask from from a string
578
 * cpumask_parse - extract a cpumask from from a string
Line 584... Line 584...
584
static inline int cpumask_parse(const char *buf, struct cpumask *dstp)
584
static inline int cpumask_parse(const char *buf, struct cpumask *dstp)
585
{
585
{
586
	char *nl = strchr(buf, '\n');
586
	char *nl = strchr(buf, '\n');
587
	unsigned int len = nl ? (unsigned int)(nl - buf) : strlen(buf);
587
	unsigned int len = nl ? (unsigned int)(nl - buf) : strlen(buf);
Line 588... Line 588...
588
 
588
 
589
	return bitmap_parse(buf, len, cpumask_bits(dstp), nr_cpu_ids);
589
	return bitmap_parse(buf, len, cpumask_bits(dstp), nr_cpumask_bits);
Line 590... Line 590...
590
}
590
}
591
 
591
 
592
/**
592
/**
Line 596... Line 596...
596
 *
596
 *
597
 * Returns -errno, or 0 for success.
597
 * Returns -errno, or 0 for success.
598
 */
598
 */
599
static inline int cpulist_parse(const char *buf, struct cpumask *dstp)
599
static inline int cpulist_parse(const char *buf, struct cpumask *dstp)
600
{
600
{
601
	return bitmap_parselist(buf, cpumask_bits(dstp), nr_cpu_ids);
601
	return bitmap_parselist(buf, cpumask_bits(dstp), nr_cpumask_bits);
602
}
602
}
Line 603... Line 603...
603
 
603
 
604
/**
604
/**
605
 * cpumask_size - size to allocate for a 'struct cpumask' in bytes
605
 * cpumask_size - size to allocate for a 'struct cpumask' in bytes