Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb disable inlining for couple functions which allo...



details:   https://anonhg.NetBSD.org/src/rev/ad40be5413ca
branches:  trunk
changeset: 935108:ad40be5413ca
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Wed Jun 24 21:06:39 2020 +0000

description:
disable inlining for couple functions which allocate usb_device_request_t
on stack to reduce total run_init() stack usage from 7KB to 2KB

diffstat:

 sys/dev/usb/if_run.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 6abebc788130 -r ad40be5413ca sys/dev/usb/if_run.c
--- a/sys/dev/usb/if_run.c      Wed Jun 24 20:17:55 2020 +0000
+++ b/sys/dev/usb/if_run.c      Wed Jun 24 21:06:39 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_run.c,v 1.41 2020/06/11 09:56:57 martin Exp $       */
+/*     $NetBSD: if_run.c,v 1.42 2020/06/24 21:06:39 jdolecek Exp $     */
 /*     $OpenBSD: if_run.c,v 1.90 2012/03/24 15:11:04 jsg Exp $ */
 
 /*-
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.41 2020/06/11 09:56:57 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.42 2020/06/24 21:06:39 jdolecek Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -931,7 +931,7 @@
        }
 }
 
-static int
+static int __noinline
 run_load_microcode(struct run_softc *sc)
 {
        usb_device_request_t req;
@@ -1003,7 +1003,7 @@
        return 0;
 }
 
-static int
+static int __noinline
 run_reset(struct run_softc *sc)
 {
        usb_device_request_t req;
@@ -1016,7 +1016,7 @@
        return usbd_do_request(sc->sc_udev, &req, NULL);
 }
 
-static int
+static int __noinline
 run_read(struct run_softc *sc, uint16_t reg, uint32_t *val)
 {
        uint32_t tmp;
@@ -1056,7 +1056,7 @@
        return usbd_do_request(sc->sc_udev, &req, NULL);
 }
 
-static int
+static int __noinline
 run_write(struct run_softc *sc, uint16_t reg, uint32_t val)
 {
        uint32_t tmp = htole32(val);



Home | Main Index | Thread Index | Old Index