PERFORCE change 135760 for review

Sam Leffler sam at FreeBSD.org
Tue Feb 19 23:38:21 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=135760

Change 135760 by sam at sam_ebb on 2008/02/19 23:37:22

	Suppress the aggressive inline of gcc; there is no obvious
	benefit to doing it and the downsides are significant.  Once
	I can nagivate the maze of twisty #ifdefs in cdefs.h I'll
	add __noinline where it belongs.

Affected files ...

.. //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#28 edit

Differences ...

==== //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#28 (text+ko) ====

@@ -58,6 +58,12 @@
 #include <netipx/ipx_if.h>
 #endif
 
+#ifdef __GNUC__
+#define	__noinline	__attribute__ ((noinline))
+#else
+#define	__noinline
+#endif
+
 #include <net80211/ieee80211_var.h>
 #include <net80211/ieee80211_ioctl.h>
 #include <net80211/ieee80211_regdomain.h>
@@ -70,7 +76,7 @@
 static struct ieee80211_channel *findchannel(struct ieee80211com *,
 		int ieee, int mode);
 
-static int
+static __noinline int
 ieee80211_ioctl_getkey(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	struct ieee80211com *ic = vap->iv_ic;
@@ -126,7 +132,7 @@
 	return copyout(&ik, ireq->i_data, sizeof(ik));
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_getchanlist(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	struct ieee80211com *ic = vap->iv_ic;
@@ -136,7 +142,7 @@
 	return copyout(&ic->ic_chan_active, ireq->i_data, ireq->i_len);
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_getchaninfo(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	struct ieee80211com *ic = vap->iv_ic;
@@ -150,7 +156,7 @@
 	return copyout(&ic->ic_nchans, ireq->i_data, space);
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_getwpaie(struct ieee80211vap *vap,
 	struct ieee80211req *ireq, int req)
 {
@@ -199,7 +205,7 @@
 	return copyout(&wpaie, ireq->i_data, ireq->i_len);
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_getstastats(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	struct ieee80211_node *ni;
@@ -253,7 +259,7 @@
 	req->space += scan_space(se, &ielen);
 }
 
-static void
+static __noinline void
 get_scan_result(void *arg, const struct ieee80211_scan_entry *se)
 {
 	struct scanreq *req = arg;
@@ -298,7 +304,7 @@
 	req->sr = (struct ieee80211req_scan_result *)(((uint8_t *)sr) + len);
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_getscanresults(struct ieee80211vap *vap,
 	struct ieee80211req *ireq)
 {
@@ -361,7 +367,7 @@
 	req->space += sta_space(ni, &ielen);
 }
 
-static void
+static __noinline void
 get_sta_info(void *arg, struct ieee80211_node *ni)
 {
 	struct stainforeq *req = arg;
@@ -428,7 +434,7 @@
 	req->space -= len;
 }
 
-static int
+static __noinline int
 getstainfo_common(struct ieee80211vap *vap, struct ieee80211req *ireq,
 	struct ieee80211_node *ni, int off)
 {
@@ -471,7 +477,7 @@
 	return error;
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_getstainfo(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	uint8_t macaddr[IEEE80211_ADDR_LEN];
@@ -494,7 +500,7 @@
 	return getstainfo_common(vap, ireq, ni, off);
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_getstatxpow(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	struct ieee80211_node *ni;
@@ -515,7 +521,7 @@
 	return error;
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_getwmeparam(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	struct ieee80211com *ic = vap->iv_ic;
@@ -558,7 +564,7 @@
 	return 0;
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_getmaccmd(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	const struct ieee80211_aclator *acl = vap->iv_acl;
@@ -581,7 +587,7 @@
 		return (vap->iv_flags & cap) != 0;
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_getcurchan(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	struct ieee80211com *ic = vap->iv_ic;
@@ -638,7 +644,7 @@
 	return EINVAL;
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_getregdomain(struct ieee80211vap *vap,
 	const struct ieee80211req *ireq)
 {
@@ -650,7 +656,7 @@
 	    sizeof(ic->ic_regdomain));
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_getroam(struct ieee80211vap *vap,
 	const struct ieee80211req *ireq)
 {
@@ -660,7 +666,7 @@
 	    sizeof(vap->iv_roamparms));
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_gettxparams(struct ieee80211vap *vap,
 	const struct ieee80211req *ireq)
 {
@@ -669,7 +675,7 @@
 	return copyout(vap->iv_txparms, ireq->i_data, sizeof(vap->iv_txparms));
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_getdevcaps(struct ieee80211com *ic,
 	const struct ieee80211req *ireq)
 {
@@ -711,10 +717,7 @@
  * but special-casing the compilation of this one module in the
  * build system would be awkward.
  */
-#ifdef __GNUC__
-__attribute__ ((noinline))
-#endif
-static int
+static __noinline int
 ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_long cmd,
     struct ieee80211req *ireq)
 {
@@ -1038,7 +1041,7 @@
 #undef MS
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_setkey(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	struct ieee80211req_key ik;
@@ -1111,7 +1114,7 @@
 	return error;
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_delkey(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	struct ieee80211req_del_key dk;
@@ -1186,7 +1189,7 @@
 	ieee80211_node_leave(ni);
 }
 
-static int
+static __noinline int
 setmlme_common(struct ieee80211vap *vap, int op,
 	const uint8_t mac[IEEE80211_ADDR_LEN], int reason)
 {
@@ -1341,7 +1344,7 @@
 	look->se = se;
 }
 
-static int
+static __noinline int
 setmlme_assoc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN],
 	int ssid_len, const uint8_t ssid[IEEE80211_NWID_LEN])
 {
@@ -1364,7 +1367,7 @@
 	return 0;
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_setmlme(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	struct ieee80211req_mlme mlme;
@@ -1383,7 +1386,7 @@
 		    mlme.im_macaddr, mlme.im_reason);
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_macmac(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	uint8_t mac[IEEE80211_ADDR_LEN];
@@ -1408,7 +1411,7 @@
 	return 0;
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_setmaccmd(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	const struct ieee80211_aclator *acl = vap->iv_acl;
@@ -1446,7 +1449,7 @@
 	return 0;
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_setchanlist(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	struct ieee80211com *ic = vap->iv_ic;
@@ -1489,7 +1492,7 @@
 	return ENETRESET;
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_setstastats(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	struct ieee80211_node *ni;
@@ -1515,7 +1518,7 @@
 	return 0;
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_setstatxpow(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	struct ieee80211_node *ni;
@@ -1535,7 +1538,7 @@
 	return error;
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_setwmeparam(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	struct ieee80211com *ic = vap->iv_ic;
@@ -1772,7 +1775,7 @@
  * Old api for setting the current channel; this is
  * deprecated because channel numbers are ambiguous.
  */
-static int
+static __noinline int
 ieee80211_ioctl_setchannel(struct ieee80211vap *vap,
 	const struct ieee80211req *ireq)
 {
@@ -1853,7 +1856,7 @@
  * channel description is provide so there is no ambiguity in
  * identifying the channel.
  */
-static int
+static __noinline int
 ieee80211_ioctl_setcurchan(struct ieee80211vap *vap,
 	const struct ieee80211req *ireq)
 {
@@ -1889,7 +1892,7 @@
 	return 1;
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_setregdomain(struct ieee80211vap *vap,
 	const struct ieee80211req *ireq)
 {
@@ -2028,7 +2031,7 @@
 	return (mcs & 0x7f) <= 15;	/* XXX could search ht rate set */
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_settxparams(struct ieee80211vap *vap,
 	const struct ieee80211req *ireq)
 {
@@ -2170,7 +2173,7 @@
 		vap->iv_rsn_ie = ie;
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_setappie_locked(struct ieee80211vap *vap,
 	const struct ieee80211req *ireq, int fc0)
 {
@@ -2241,7 +2244,7 @@
 	return error;
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_setappie(struct ieee80211vap *vap,
 	const struct ieee80211req *ireq)
 {
@@ -2259,7 +2262,7 @@
 	return error;
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_chanswitch(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 	struct ieee80211com *ic = vap->iv_ic;
@@ -2287,7 +2290,7 @@
 	return error;
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_scanreq(struct ieee80211vap *vap, struct ieee80211req *ireq)
 {
 #define	IEEE80211_IOC_SCAN_FLAGS \
@@ -2407,7 +2410,7 @@
 	    IEEE80211_IS_CHAN_HT(bss->ni_chan);
 }
 
-static int
+static __noinline int
 ieee80211_ioctl_set80211(struct ieee80211vap *vap, u_long cmd, struct ieee80211req *ireq)
 {
 	static const uint8_t zerobssid[IEEE80211_ADDR_LEN];


More information about the p4-projects mailing list