]> git.proxmox.com Git - mirror_spl.git/blobdiff - include/sys/sysmacros.h
Invert minclsyspri and maxclsyspri
[mirror_spl.git] / include / sys / sysmacros.h
index 565fc5600043c7264de121425d3667d3970b9865..4dc7cd8585619a77d4405ab15724bb30769e3ce6 100644 (file)
@@ -78,6 +78,7 @@
 #define proc_pageout                   NULL
 #define curproc                                current
 #define max_ncpus                      num_possible_cpus()
+#define boot_ncpus                     num_online_cpus()
 #define CPU_SEQID                      smp_processor_id()
 #define _NOTE(x)
 #define is_system_labeled()            0
@@ -92,8 +93,9 @@
  *
  * Treat shim tasks as SCHED_NORMAL tasks
  */
-#define minclsyspri                    (MAX_RT_PRIO)
-#define maxclsyspri                    (MAX_PRIO-1)
+#define minclsyspri                    (MAX_PRIO-1)
+#define maxclsyspri                    (MAX_RT_PRIO)
+#define defclsyspri                    (DEFAULT_PRIO)
 
 #ifndef NICE_TO_PRIO
 #define NICE_TO_PRIO(nice)             (MAX_RT_PRIO + (nice) + 20)
 #define PRIO_TO_NICE(prio)             ((prio) - MAX_RT_PRIO - 20)
 #endif
 
-/* Missing macros
+/*
+ * Missing macros
  */
+#ifndef PAGESIZE
 #define PAGESIZE                       PAGE_SIZE
+#endif
 
 /* from Solaris sys/byteorder.h */
 #define BSWAP_8(x)     ((x) & 0xff)
@@ -149,13 +154,12 @@ extern char spl_version[32];
 extern unsigned long spl_hostid;
 
 /* Missing misc functions */
-extern int highbit(unsigned long i);
-extern int highbit64(uint64_t i);
 extern uint32_t zone_get_hostid(void *zone);
 extern void spl_setup(void);
 extern void spl_cleanup(void);
 
-#define makedevice(maj,min) makedev(maj,min)
+#define        highbit64(x)            fls64(x)
+#define        makedevice(maj,min)     makedev(maj,min)
 
 /* common macros */
 #ifndef MIN