]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/9/teg2/mem.h
usbehci: catch interrupt in tsleep
[plan9front.git] / sys / src / 9 / teg2 / mem.h
index aeb24d4e1fb2c322f898e0ebd1a6e9b30c178297..c891ae7db95919098f15d85545c6f2987d1af840 100644 (file)
@@ -5,9 +5,6 @@
 #define MiB            1048576u                /* Mebi 0x0000000000100000 */
 #define GiB            1073741824u             /* Gibi 000000000040000000 */
 
-#define HOWMANY(x, y)  (((x)+((y)-1))/(y))
-#define ROUNDUP(x, y)  (HOWMANY((x), (y))*(y)) /* ceiling */
-#define ROUNDDN(x, y)  (((x)/(y))*(y))         /* floor */
 #define MIN(a, b)      ((a) < (b)? (a): (b))
 #define MAX(a, b)      ((a) > (b)? (a): (b))
 
@@ -36,7 +33,7 @@
  */
 #define        BY2PG           (4*KiB)                 /* bytes per page */
 #define        PGSHIFT         12                      /* log(BY2PG) */
-#define        PGROUND(s)      ROUNDUP(s, BY2PG)
+#define        PGROUND(s)      ROUND(s, BY2PG)
 #define        ROUND(s, sz)    (((s)+(sz-1))&~(sz-1))
 
 /* max # of cpus system can run.  tegra2 cpu ids are two bits wide. */
@@ -85,7 +82,6 @@
 
 #define        UZERO           0                       /* user segment */
 #define        UTZERO          (UZERO+BY2PG)           /* user text start */
-#define UTROUND(t)     ROUNDUP((t), BY2PG)
 /*
  * moved USTKTOP down to 1GB to keep MMIO space out of user space.
  * moved it down another MB to utterly avoid KADDR(stack_base) mapping
@@ -93,8 +89,6 @@
  */
 #define        USTKTOP         (0x40000000 - 64*KiB - MiB) /* user segment end +1 */
 #define        USTKSIZE        (8*1024*1024)           /* user stack size */
-#define        TSTKTOP         (USTKTOP-USTKSIZE)      /* sysexec temporary stack */
-#define        TSTKSIZ         256
 
 /* address at which to copy and execute rebootcode */
 #define        REBOOTADDR      KADDR(0x100)