android_kernel_xiaomi_sm8350/net
Mike Travis 65c0118453 cpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr
* This patch replaces the dangerous lvalue version of cpumask_of_cpu
    with new cpumask_of_cpu_ptr macros.  These are patterned after the
    node_to_cpumask_ptr macros.

    In general terms, if there is a cpumask_of_cpu_map[] then a pointer to
    the cpumask_of_cpu_map[cpu] entry is used.  The cpumask_of_cpu_map
    is provided when there is a large NR_CPUS count, reducing
    greatly the amount of code generated and stack space used for
    cpumask_of_cpu().  The pointer to the cpumask_t value is needed for
    calling set_cpus_allowed_ptr() to reduce the amount of stack space
    needed to pass the cpumask_t value.

    If there isn't a cpumask_of_cpu_map[], then a temporary variable is
    declared and filled in with value from cpumask_of_cpu(cpu) as well as
    a pointer variable pointing to this temporary variable.  Afterwards,
    the pointer is used to reference the cpumask value.  The compiler
    will optimize out the extra dereference through the pointer as well
    as the stack space used for the pointer, resulting in identical code.

    A good example of the orthogonal usages is in net/sunrpc/svc.c:

	case SVC_POOL_PERCPU:
	{
		unsigned int cpu = m->pool_to[pidx];
		cpumask_of_cpu_ptr(cpumask, cpu);

		*oldmask = current->cpus_allowed;
		set_cpus_allowed_ptr(current, cpumask);
		return 1;
	}
	case SVC_POOL_PERNODE:
	{
		unsigned int node = m->pool_to[pidx];
		node_to_cpumask_ptr(nodecpumask, node);

		*oldmask = current->cpus_allowed;
		set_cpus_allowed_ptr(current, nodecpumask);
		return 1;
	}

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-18 22:02:57 +02:00
..
9p
802
8021q Merge branch 'linus' into core/rcu 2008-06-16 11:23:36 +02:00
appletalk
atm atm: [br2864] fix routed vcmux support 2008-06-16 17:18:18 -07:00
ax25 ax25: Fix NULL pointer dereference and lockup. 2008-06-03 14:53:46 -07:00
bluetooth bluetooth: rfcomm_dev_state_change deadlock fix 2008-06-03 14:27:17 -07:00
bridge Merge branch 'linus' into core/rcu 2008-07-11 10:46:50 +02:00
can can: add sanity checks 2008-07-05 23:38:43 -07:00
core Merge branch 'linus' into cpus4096 2008-07-16 00:29:07 +02:00
dccp dccp: Bug in initial acknowledgment number assignment 2008-06-11 11:19:10 +01:00
decnet
econet
ethernet
ieee80211
ipv4 ipv4: fib_trie: Fix lookup error return 2008-07-10 16:52:52 -07:00
ipv6 ipv6: missed namespace context in ipv6_rthdr_rcv 2008-07-10 16:54:50 -07:00
ipx
irda Merge commit 'v2.6.26' into bkl-removal 2008-07-14 15:29:34 -06:00
iucv Merge branch 'linus' into cpus4096 2008-07-16 00:29:07 +02:00
key ipsec: pfkey should ignore events when no listeners 2008-06-10 14:25:34 -07:00
lapb
llc llc: Fix double accounting of received packets 2008-05-30 02:57:29 -07:00
mac80211 rc80211_pid: Fix fast_start parameter handling 2008-07-09 16:16:31 -04:00
netfilter Merge branch 'core/rcu' into core/rcu-for-linus 2008-07-15 21:10:12 +02:00
netlabel Merge branch 'core/rcu' into core/rcu-for-linus 2008-07-15 21:10:12 +02:00
netlink netlink: Unneeded local variable 2008-07-01 19:55:09 -07:00
netrom
packet
rfkill
rose
rxrpc
sched net-sched: fix filter destruction in atm/hfsc qdisc destruction 2008-07-01 19:53:09 -07:00
sctp sctp: Mark the tsn as received after all allocations finish 2008-07-08 02:28:39 -07:00
sunrpc cpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr 2008-07-18 22:02:57 +02:00
tipc
unix af_unix: fix 'poll for write'/connected DGRAM sockets 2008-06-27 19:34:18 -07:00
wanrouter
wireless mac80211: implement EU regulatory domain 2008-06-25 10:31:29 -04:00
x25
xfrm xfrm: Add a XFRM_STATE_AF_UNSPEC flag to xfrm_usersa_info 2008-07-10 16:55:37 -07:00
compat.c
Kconfig
Makefile
nonet.c
socket.c
sysctl_net.c
TUNABLE