summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjmg <jmg@FreeBSD.org>2003-07-15 23:19:49 +0000
committerjmg <jmg@FreeBSD.org>2003-07-15 23:19:49 +0000
commitb103245463e76b8f23e542dab167cca640c53b0b (patch)
treeb847ce011fb1febdcc73865b334213c3cb98a930 /sys
parent32a9aeec73a3c286b3d0e84c1c16ee65b0db3704 (diff)
downloadFreeBSD-src-b103245463e76b8f23e542dab167cca640c53b0b.zip
FreeBSD-src-b103245463e76b8f23e542dab167cca640c53b0b.tar.gz
make allocation of the necessary data structures most efficent by using
a full page instead of only part of a page. Reviewed by: joe
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/ohcivar.h6
-rw-r--r--sys/dev/usb/uhcivar.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/usb/ohcivar.h b/sys/dev/usb/ohcivar.h
index 445c346..2d19f49 100644
--- a/sys/dev/usb/ohcivar.h
+++ b/sys/dev/usb/ohcivar.h
@@ -44,7 +44,7 @@ typedef struct ohci_soft_ed {
ohci_physaddr_t physaddr;
} ohci_soft_ed_t;
#define OHCI_SED_SIZE ((sizeof (struct ohci_soft_ed) + OHCI_ED_ALIGN - 1) / OHCI_ED_ALIGN * OHCI_ED_ALIGN)
-#define OHCI_SED_CHUNK 128
+#define OHCI_SED_CHUNK (PAGE_SIZE / OHCI_SED_SIZE)
typedef struct ohci_soft_td {
ohci_td_t td;
@@ -60,7 +60,7 @@ typedef struct ohci_soft_td {
#define OHCI_TD_HANDLED 0x0004 /* signal process_done has seen it */
} ohci_soft_td_t;
#define OHCI_STD_SIZE ((sizeof (struct ohci_soft_td) + OHCI_TD_ALIGN - 1) / OHCI_TD_ALIGN * OHCI_TD_ALIGN)
-#define OHCI_STD_CHUNK 128
+#define OHCI_STD_CHUNK (PAGE_SIZE / OHCI_STD_SIZE)
typedef struct ohci_soft_itd {
ohci_itd_t itd;
@@ -77,7 +77,7 @@ typedef struct ohci_soft_itd {
#endif
} ohci_soft_itd_t;
#define OHCI_SITD_SIZE ((sizeof (struct ohci_soft_itd) + OHCI_ITD_ALIGN - 1) / OHCI_ITD_ALIGN * OHCI_ITD_ALIGN)
-#define OHCI_SITD_CHUNK 64
+#define OHCI_SITD_CHUNK (PAGE_SIZE / OHCI_SITD_SIZE)
#define OHCI_NO_EDS (2*OHCI_NO_INTRS-1)
diff --git a/sys/dev/usb/uhcivar.h b/sys/dev/usb/uhcivar.h
index 1263ea9..546dcb1 100644
--- a/sys/dev/usb/uhcivar.h
+++ b/sys/dev/usb/uhcivar.h
@@ -104,7 +104,7 @@ struct uhci_soft_td {
* NOTE: Minimum size is 32 bytes.
*/
#define UHCI_STD_SIZE ((sizeof (struct uhci_soft_td) + UHCI_TD_ALIGN - 1) / UHCI_TD_ALIGN * UHCI_TD_ALIGN)
-#define UHCI_STD_CHUNK 128 /*(PAGE_SIZE / UHCI_TD_SIZE)*/
+#define UHCI_STD_CHUNK (PAGE_SIZE / UHCI_STD_SIZE)
/*
* Extra information that we need for a QH.
@@ -118,7 +118,7 @@ struct uhci_soft_qh {
};
/* See comment about UHCI_STD_SIZE. */
#define UHCI_SQH_SIZE ((sizeof (struct uhci_soft_qh) + UHCI_QH_ALIGN - 1) / UHCI_QH_ALIGN * UHCI_QH_ALIGN)
-#define UHCI_SQH_CHUNK 128 /*(PAGE_SIZE / UHCI_QH_SIZE)*/
+#define UHCI_SQH_CHUNK (PAGE_SIZE / UHCI_SQH_SIZE)
/*
* Information about an entry in the virtual frame list.
OpenPOWER on IntegriCloud