1
0
Fork 0
alistair23-linux/arch/mips/kernel
Sebastian Andrzej Siewior 3bd3706251 sched/core: Provide a pointer to the valid CPU mask
In commit:

  4b53a3412d ("sched/core: Remove the tsk_nr_cpus_allowed() wrapper")

the tsk_nr_cpus_allowed() wrapper was removed. There was not
much difference in !RT but in RT we used this to implement
migrate_disable(). Within a migrate_disable() section the CPU mask is
restricted to single CPU while the "normal" CPU mask remains untouched.

As an alternative implementation Ingo suggested to use:

	struct task_struct {
		const cpumask_t		*cpus_ptr;
		cpumask_t		cpus_mask;
        };
with
	t->cpus_ptr = &t->cpus_mask;

In -RT we then can switch the cpus_ptr to:

	t->cpus_ptr = &cpumask_of(task_cpu(p));

in a migration disabled region. The rules are simple:

 - Code that 'uses' ->cpus_allowed would use the pointer.
 - Code that 'modifies' ->cpus_allowed would use the direct mask.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20190423142636.14347-1-bigeasy@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2019-06-03 11:49:37 +02:00
..
syscalls uapi: Wire up the mount API syscalls on non-x86 arches [ver #2] 2019-05-16 12:23:45 -04:00
.gitignore
8250-platform.c
Makefile mips: rename scall64-64.S to scall64-n64.S 2018-12-14 11:19:01 -08:00
asm-offsets.c MIPS: Remove struct task_struct fpu state when CONFIG_MIPS_FP_SUPPORT=n 2018-11-09 10:23:19 -08:00
binfmt_elfn32.c y2038: globally rename compat_time to old_time32 2018-08-27 14:48:48 +02:00
binfmt_elfo32.c y2038: globally rename compat_time to old_time32 2018-08-27 14:48:48 +02:00
bmips_5xxx_init.S MIPS: BCM5xxx: Remove dead init_fpu code 2018-11-08 11:20:57 -08:00
bmips_vec.S MIPS: BMIPS: Add Whirlwind (BMIPS5200) initialization code 2016-05-09 12:00:01 +02:00
branch.c mips: annotate implicit fall throughs 2018-12-03 13:42:38 -08:00
cacheinfo.c MIPS: Fix cacheinfo overflow 2017-02-13 18:57:34 +00:00
cevt-bcm1480.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
cevt-ds1287.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
cevt-gt641xx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
cevt-r4k.c MIPS: cevt-r4k: Fix out-of-bounds array access 2017-04-10 13:31:12 +02:00
cevt-sb1250.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
cevt-txx9.c MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
cmpxchg.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
cps-vec-ns16550.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
cps-vec.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
cpu-bugs64.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
cpu-probe.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
crash.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
crash_dump.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
csrc-bcm1480.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
csrc-ioasic.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
csrc-r4k.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
csrc-sb1250.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
early_printk.c mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
early_printk_8250.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
elf.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
entry.S MIPS: entry: Remove unneeded need_resched() loop 2019-03-19 15:25:45 -07:00
ftrace.c get rid of legacy 'get_ds()' function 2019-03-04 10:50:14 -08:00
genex.S MIPS: Avoid using .set mips0 to restore ISA 2018-11-09 10:23:19 -08:00
gpio_txx9.c MIPS: txx9: switch to gpiochip_add_data() 2016-02-19 09:51:44 +01:00
head.S MIPS/head: Store ELF appended dtb in a global variable too 2018-09-25 16:27:24 -07:00
i8253.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
idle.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
irq-gt641xx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
irq-msc01.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
irq-rm7000.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
irq.c MIPS: irq: Allocate accurate order pages for irq stack 2019-02-19 12:45:01 -08:00
irq_txx9.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
jump_label.c MIPS: jump_label: Use compact branches for >= r6 2019-04-09 16:21:30 -07:00
kgdb.c MIPS: KGDB: fix kgdb support for SMP platforms. 2019-03-28 11:35:58 -07:00
kprobes.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
linux32.c MIPS: Delete unused code in linux32.c 2018-08-01 13:20:27 -07:00
machine_kexec.c MIPS: kdump: Mark cpu back online before rebooting 2018-09-28 10:09:03 -07:00
mcount.S mips: ftrace: fix static function graph tracing 2018-06-19 15:00:12 -07:00
mips-cm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mips-cpc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mips-mt-fpaff.c sched/core: Provide a pointer to the valid CPU mask 2019-06-03 11:49:37 +02:00
mips-mt.c MIPS: MT: Remove norps command line parameter 2018-11-26 22:49:14 -08:00
mips-r2-to-r6-emul.c mips: kernel: no need to check return value of debugfs_create functions 2019-01-22 11:17:20 -08:00
mips_machine.c MIPS: move mips_{set,get}_machine_name() to a more generic place 2013-05-08 01:19:07 +02:00
module.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
octeon_switch.S Kbuild: rename CC_STACKPROTECTOR[_STRONG] config variables 2018-06-14 12:21:18 +09:00
perf_event.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
perf_event_mipsxx.c MIPS: perf: Fix build with CONFIG_CPU_BMIPS5000 enabled 2019-05-09 16:39:26 -07:00
pm-cps.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
probes-common.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
proc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
process.c MIPS: Remove function size check in get_frame_info() 2019-02-04 15:15:34 -08:00
prom.c mips: Make sure dt memory regions are valid 2019-05-05 20:11:59 -07:00
ptrace.c audit/stable-5.2 PR 20190507 2019-05-07 19:06:04 -07:00
ptrace32.c MIPS: ptrace: Remove FP support when CONFIG_MIPS_FP_SUPPORT=n 2018-11-09 10:23:17 -08:00
r4k_fpu.S MIPS: Simplify FP context initialization 2018-11-09 10:23:13 -08:00
r4k_switch.S Kbuild: rename CC_STACKPROTECTOR[_STRONG] config variables 2018-06-14 12:21:18 +09:00
r2300_fpu.S MIPS: Simplify FP context initialization 2018-11-09 10:23:13 -08:00
r2300_switch.S Kbuild: rename CC_STACKPROTECTOR[_STRONG] config variables 2018-06-14 12:21:18 +09:00
relocate.c MIPS: Remove no-op/identity casts 2018-08-31 11:49:20 -07:00
relocate_kernel.S MIPS: kexec: fix typos 2018-06-24 09:26:01 -07:00
reset.c MIPS: Hang more efficiently on halt/powerdown/restart 2018-03-09 11:22:43 +00:00
rtlx-cmp.c MIPS: APRP: Fix an issue when device_create() fails. 2014-08-01 17:30:35 +02:00
rtlx-mt.c MIPS: APRP: Fix an issue when device_create() fails. 2014-08-01 17:30:35 +02:00
rtlx.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
scall32-o32.S mips: generate uapi header and system call table files 2018-12-14 11:19:02 -08:00
scall64-n32.S mips: generate uapi header and system call table files 2018-12-14 11:19:02 -08:00
scall64-n64.S mips: generate uapi header and system call table files 2018-12-14 11:19:02 -08:00
scall64-o32.S MIPS: scall64-o32: Fix indirect syscall number load 2019-04-15 10:35:12 -07:00
segment.c mips: kernel: no need to check return value of debugfs_create functions 2019-01-22 11:17:20 -08:00
setup.c mips: Manually call fdt_init_reserved_mem() method 2019-05-05 20:12:20 -07:00
signal-common.h MIPS: Save MSA extended context around signals 2015-09-03 12:07:59 +02:00
signal.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
signal32.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
signal_n32.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
signal_o32.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
smp-bmips.c MIPS: kexec: Make a framework for both jumping and halting on nonboot CPUs 2018-09-22 10:31:50 -07:00
smp-cmp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
smp-cps.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
smp-mt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
smp-up.c MIPS: SMP: Allow boot_secondary SMP op to return errors 2017-08-30 00:57:27 +02:00
smp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
spinlock_test.c mips: kernel: no need to check return value of debugfs_create functions 2019-01-22 11:17:20 -08:00
spram.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
stacktrace.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
sync-r4k.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
syscall.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
sysrq.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
time.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
topology.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
traps.c sched/core: Provide a pointer to the valid CPU mask 2019-06-03 11:49:37 +02:00
unaligned.c MIPS: MemoryMapID (MMID) Support 2019-02-04 10:56:41 -08:00
uprobes.c Uprobe: Additional argument arch_uprobe to uprobe_write_opcode() 2018-08-13 20:08:33 -04:00
vdso.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
vmlinux.lds.S MIPS: Ensure ELF appended dtb is relocated 2019-03-11 11:08:31 -07:00
vpe-cmp.c MIPS: APRP: Add VPE loader support for CMP platforms. 2014-01-22 20:19:02 +01:00
vpe-mt.c MIPS: MT: Remove SMTC support 2014-05-24 00:07:01 +02:00
vpe.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
watch.c mips: annotate implicit fall throughs 2018-12-03 13:42:38 -08:00