ARM: SMP: remove IRQ-disabling for smp_cross_call()
[deliverable/linux.git] / arch / arm / kernel / smp.c
CommitLineData
1da177e4
LT
1/*
2 * linux/arch/arm/kernel/smp.c
3 *
4 * Copyright (C) 2002 ARM Limited, All Rights Reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
c97d4869 10#include <linux/module.h>
1da177e4
LT
11#include <linux/delay.h>
12#include <linux/init.h>
13#include <linux/spinlock.h>
14#include <linux/sched.h>
15#include <linux/interrupt.h>
16#include <linux/cache.h>
17#include <linux/profile.h>
18#include <linux/errno.h>
19#include <linux/mm.h>
4e950f6f 20#include <linux/err.h>
1da177e4
LT
21#include <linux/cpu.h>
22#include <linux/smp.h>
23#include <linux/seq_file.h>
c97d4869 24#include <linux/irq.h>
bc28248e
RK
25#include <linux/percpu.h>
26#include <linux/clockchips.h>
1da177e4
LT
27
28#include <asm/atomic.h>
29#include <asm/cacheflush.h>
30#include <asm/cpu.h>
42578c82 31#include <asm/cputype.h>
e65f38ed
RK
32#include <asm/mmu_context.h>
33#include <asm/pgtable.h>
34#include <asm/pgalloc.h>
1da177e4 35#include <asm/processor.h>
37b05b63 36#include <asm/sections.h>
1da177e4
LT
37#include <asm/tlbflush.h>
38#include <asm/ptrace.h>
bc28248e 39#include <asm/localtimer.h>
e616c591 40#include <asm/smp_plat.h>
1da177e4 41
e65f38ed
RK
42/*
43 * as from 2.5, kernels no longer have an init_tasks structure
44 * so we need some other way of telling a new secondary core
45 * where to place its SVC stack
46 */
47struct secondary_data secondary_data;
48
1da177e4
LT
49/*
50 * structures for inter-processor calls
1da177e4
LT
51 */
52struct ipi_data {
1da177e4 53 unsigned long ipi_count;
1da177e4
LT
54};
55
24480d98 56static DEFINE_PER_CPU(struct ipi_data, ipi_data);
1da177e4
LT
57
58enum ipi_msg_type {
24480d98 59 IPI_TIMER = 2,
1da177e4
LT
60 IPI_RESCHEDULE,
61 IPI_CALL_FUNC,
f6dd9fa5 62 IPI_CALL_FUNC_SINGLE,
1da177e4
LT
63 IPI_CPU_STOP,
64};
65
37b05b63
RK
66static inline void identity_mapping_add(pgd_t *pgd, unsigned long start,
67 unsigned long end)
68{
69 unsigned long addr, prot;
70 pmd_t *pmd;
71
72 prot = PMD_TYPE_SECT | PMD_SECT_AP_WRITE;
73 if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale())
74 prot |= PMD_BIT4;
75
76 for (addr = start & PGDIR_MASK; addr < end;) {
77 pmd = pmd_offset(pgd + pgd_index(addr), addr);
78 pmd[0] = __pmd(addr | prot);
79 addr += SECTION_SIZE;
80 pmd[1] = __pmd(addr | prot);
81 addr += SECTION_SIZE;
82 flush_pmd_entry(pmd);
83 outer_clean_range(__pa(pmd), __pa(pmd + 1));
84 }
85}
86
87static inline void identity_mapping_del(pgd_t *pgd, unsigned long start,
88 unsigned long end)
89{
90 unsigned long addr;
91 pmd_t *pmd;
92
93 for (addr = start & PGDIR_MASK; addr < end; addr += PGDIR_SIZE) {
94 pmd = pmd_offset(pgd + pgd_index(addr), addr);
95 pmd[0] = __pmd(0);
96 pmd[1] = __pmd(0);
97 clean_pmd_entry(pmd);
98 outer_clean_range(__pa(pmd), __pa(pmd + 1));
99 }
100}
101
bd6f68af 102int __cpuinit __cpu_up(unsigned int cpu)
1da177e4 103{
71f512e8
RK
104 struct cpuinfo_arm *ci = &per_cpu(cpu_data, cpu);
105 struct task_struct *idle = ci->idle;
e65f38ed 106 pgd_t *pgd;
1da177e4
LT
107 int ret;
108
109 /*
71f512e8
RK
110 * Spawn a new process manually, if not already done.
111 * Grab a pointer to its task struct so we can mess with it
1da177e4 112 */
71f512e8
RK
113 if (!idle) {
114 idle = fork_idle(cpu);
115 if (IS_ERR(idle)) {
116 printk(KERN_ERR "CPU%u: fork() failed\n", cpu);
117 return PTR_ERR(idle);
118 }
119 ci->idle = idle;
13ea9cc8
SS
120 } else {
121 /*
122 * Since this idle thread is being re-used, call
123 * init_idle() to reinitialize the thread structure.
124 */
125 init_idle(idle, cpu);
1da177e4
LT
126 }
127
e65f38ed
RK
128 /*
129 * Allocate initial page tables to allow the new CPU to
130 * enable the MMU safely. This essentially means a set
131 * of our "standard" page tables, with the addition of
132 * a 1:1 mapping for the physical address of the kernel.
133 */
134 pgd = pgd_alloc(&init_mm);
37b05b63
RK
135 if (!pgd)
136 return -ENOMEM;
137
138 if (PHYS_OFFSET != PAGE_OFFSET) {
139#ifndef CONFIG_HOTPLUG_CPU
140 identity_mapping_add(pgd, __pa(__init_begin), __pa(__init_end));
141#endif
142 identity_mapping_add(pgd, __pa(_stext), __pa(_etext));
143 identity_mapping_add(pgd, __pa(_sdata), __pa(_edata));
144 }
e65f38ed
RK
145
146 /*
147 * We need to tell the secondary core where to find
148 * its stack and the page tables.
149 */
32d39a93 150 secondary_data.stack = task_stack_page(idle) + THREAD_START_SP;
e65f38ed 151 secondary_data.pgdir = virt_to_phys(pgd);
1027247f
RK
152 __cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data));
153 outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1));
e65f38ed 154
1da177e4
LT
155 /*
156 * Now bring the CPU into our world.
157 */
158 ret = boot_secondary(cpu, idle);
e65f38ed
RK
159 if (ret == 0) {
160 unsigned long timeout;
161
162 /*
163 * CPU was successfully started, wait for it
164 * to come online or time out.
165 */
166 timeout = jiffies + HZ;
167 while (time_before(jiffies, timeout)) {
168 if (cpu_online(cpu))
169 break;
170
171 udelay(10);
172 barrier();
173 }
174
175 if (!cpu_online(cpu))
176 ret = -EIO;
177 }
178
5d43045b 179 secondary_data.stack = NULL;
e65f38ed
RK
180 secondary_data.pgdir = 0;
181
37b05b63
RK
182 if (PHYS_OFFSET != PAGE_OFFSET) {
183#ifndef CONFIG_HOTPLUG_CPU
184 identity_mapping_del(pgd, __pa(__init_begin), __pa(__init_end));
185#endif
186 identity_mapping_del(pgd, __pa(_stext), __pa(_etext));
187 identity_mapping_del(pgd, __pa(_sdata), __pa(_edata));
188 }
189
5e541973 190 pgd_free(&init_mm, pgd);
e65f38ed 191
1da177e4 192 if (ret) {
0908db22
RK
193 printk(KERN_CRIT "CPU%u: processor failed to boot\n", cpu);
194
1da177e4
LT
195 /*
196 * FIXME: We need to clean up the new idle thread. --rmk
197 */
198 }
199
200 return ret;
201}
202
a054a811
RK
203#ifdef CONFIG_HOTPLUG_CPU
204/*
205 * __cpu_disable runs on the processor to be shutdown.
206 */
90140c30 207int __cpu_disable(void)
a054a811
RK
208{
209 unsigned int cpu = smp_processor_id();
210 struct task_struct *p;
211 int ret;
212
8e2a43f5 213 ret = platform_cpu_disable(cpu);
a054a811
RK
214 if (ret)
215 return ret;
216
217 /*
218 * Take this CPU offline. Once we clear this, we can't return,
219 * and we must not schedule until we're ready to give up the cpu.
220 */
e03cdade 221 set_cpu_online(cpu, false);
a054a811
RK
222
223 /*
224 * OK - migrate IRQs away from this CPU
225 */
226 migrate_irqs();
227
37ee16ae
RK
228 /*
229 * Stop the local timer for this CPU.
230 */
ebac6546 231 local_timer_stop();
37ee16ae 232
a054a811
RK
233 /*
234 * Flush user cache and TLB mappings, and then remove this CPU
235 * from the vm mask set of all processes.
236 */
237 flush_cache_all();
238 local_flush_tlb_all();
239
240 read_lock(&tasklist_lock);
241 for_each_process(p) {
242 if (p->mm)
56f8ba83 243 cpumask_clear_cpu(cpu, mm_cpumask(p->mm));
a054a811
RK
244 }
245 read_unlock(&tasklist_lock);
246
247 return 0;
248}
249
250/*
251 * called on the thread which is asking for a CPU to be shutdown -
252 * waits until shutdown has completed, or it is timed out.
253 */
90140c30 254void __cpu_die(unsigned int cpu)
a054a811
RK
255{
256 if (!platform_cpu_kill(cpu))
257 printk("CPU%u: unable to kill\n", cpu);
258}
259
260/*
261 * Called from the idle thread for the CPU which has been shutdown.
262 *
263 * Note that we disable IRQs here, but do not re-enable them
264 * before returning to the caller. This is also the behaviour
265 * of the other hotplug-cpu capable cores, so presumably coming
266 * out of idle fixes this.
267 */
90140c30 268void __ref cpu_die(void)
a054a811
RK
269{
270 unsigned int cpu = smp_processor_id();
271
272 local_irq_disable();
273 idle_task_exit();
274
275 /*
276 * actual CPU shutdown procedure is at least platform (if not
277 * CPU) specific
278 */
279 platform_cpu_die(cpu);
280
281 /*
282 * Do not return to the idle loop - jump back to the secondary
283 * cpu initialisation. There's some initialisation which needs
284 * to be repeated to undo the effects of taking the CPU offline.
285 */
286 __asm__("mov sp, %0\n"
287 " b secondary_start_kernel"
288 :
32d39a93 289 : "r" (task_stack_page(current) + THREAD_SIZE - 8));
a054a811
RK
290}
291#endif /* CONFIG_HOTPLUG_CPU */
292
e65f38ed
RK
293/*
294 * This is the secondary CPU boot entry. We're using this CPUs
295 * idle thread stack, but a set of temporary page tables.
296 */
bd6f68af 297asmlinkage void __cpuinit secondary_start_kernel(void)
e65f38ed
RK
298{
299 struct mm_struct *mm = &init_mm;
da2660d2 300 unsigned int cpu = smp_processor_id();
e65f38ed
RK
301
302 printk("CPU%u: Booted secondary processor\n", cpu);
303
304 /*
305 * All kernel threads share the same mm context; grab a
306 * reference and switch to it.
307 */
308 atomic_inc(&mm->mm_users);
309 atomic_inc(&mm->mm_count);
310 current->active_mm = mm;
56f8ba83 311 cpumask_set_cpu(cpu, mm_cpumask(mm));
e65f38ed
RK
312 cpu_switch_mm(mm->pgd, mm);
313 enter_lazy_tlb(mm, current);
505d7b19 314 local_flush_tlb_all();
e65f38ed
RK
315
316 cpu_init();
5bfb5d69 317 preempt_disable();
e65f38ed
RK
318
319 /*
320 * Give the platform a chance to do its own initialisation.
321 */
322 platform_secondary_init(cpu);
323
324 /*
325 * Enable local interrupts.
326 */
e545a614 327 notify_cpu_starting(cpu);
e65f38ed
RK
328 local_irq_enable();
329 local_fiq_enable();
330
a8655e83 331 /*
bc28248e 332 * Setup the percpu timer for this CPU.
a8655e83 333 */
bc28248e 334 percpu_timer_setup();
a8655e83 335
e65f38ed
RK
336 calibrate_delay();
337
338 smp_store_cpu_info(cpu);
339
340 /*
341 * OK, now it's safe to let the boot CPU continue
342 */
e03cdade 343 set_cpu_online(cpu, true);
e65f38ed
RK
344
345 /*
346 * OK, it's off to the idle thread for us
347 */
348 cpu_idle();
349}
350
1da177e4
LT
351/*
352 * Called by both boot and secondaries to move global data into
353 * per-processor storage.
354 */
bd6f68af 355void __cpuinit smp_store_cpu_info(unsigned int cpuid)
1da177e4
LT
356{
357 struct cpuinfo_arm *cpu_info = &per_cpu(cpu_data, cpuid);
358
359 cpu_info->loops_per_jiffy = loops_per_jiffy;
360}
361
362void __init smp_cpus_done(unsigned int max_cpus)
363{
364 int cpu;
365 unsigned long bogosum = 0;
366
367 for_each_online_cpu(cpu)
368 bogosum += per_cpu(cpu_data, cpu).loops_per_jiffy;
369
370 printk(KERN_INFO "SMP: Total of %d processors activated "
371 "(%lu.%02lu BogoMIPS).\n",
372 num_online_cpus(),
373 bogosum / (500000/HZ),
374 (bogosum / (5000/HZ)) % 100);
375}
376
377void __init smp_prepare_boot_cpu(void)
378{
379 unsigned int cpu = smp_processor_id();
380
71f512e8 381 per_cpu(cpu_data, cpu).idle = current;
1da177e4
LT
382}
383
82668104 384static void send_ipi_message(const struct cpumask *mask, enum ipi_msg_type msg)
1da177e4 385{
1da177e4
LT
386 /*
387 * Call the platform specific cross-CPU call function.
388 */
24480d98 389 smp_cross_call(mask, msg);
1da177e4
LT
390}
391
82668104 392void arch_send_call_function_ipi_mask(const struct cpumask *mask)
1da177e4 393{
f6dd9fa5 394 send_ipi_message(mask, IPI_CALL_FUNC);
1da177e4
LT
395}
396
f6dd9fa5 397void arch_send_call_function_single_ipi(int cpu)
3e459990 398{
82668104 399 send_ipi_message(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE);
3e459990 400}
3e459990 401
1da177e4
LT
402void show_ipi_list(struct seq_file *p)
403{
404 unsigned int cpu;
405
406 seq_puts(p, "IPI:");
407
e11b2236 408 for_each_present_cpu(cpu)
1da177e4
LT
409 seq_printf(p, " %10lu", per_cpu(ipi_data, cpu).ipi_count);
410
411 seq_putc(p, '\n');
412}
413
37ee16ae
RK
414void show_local_irqs(struct seq_file *p)
415{
416 unsigned int cpu;
417
418 seq_printf(p, "LOC: ");
419
420 for_each_present_cpu(cpu)
421 seq_printf(p, "%10u ", irq_stat[cpu].local_timer_irqs);
422
423 seq_putc(p, '\n');
424}
425
bc28248e
RK
426/*
427 * Timer (local or broadcast) support
428 */
429static DEFINE_PER_CPU(struct clock_event_device, percpu_clockevent);
430
c97d4869 431static void ipi_timer(void)
1da177e4 432{
bc28248e 433 struct clock_event_device *evt = &__get_cpu_var(percpu_clockevent);
1da177e4 434 irq_enter();
bc28248e 435 evt->event_handler(evt);
1da177e4
LT
436 irq_exit();
437}
438
37ee16ae 439#ifdef CONFIG_LOCAL_TIMERS
b9811d7f 440asmlinkage void __exception do_local_timer(struct pt_regs *regs)
37ee16ae 441{
c97d4869 442 struct pt_regs *old_regs = set_irq_regs(regs);
37ee16ae
RK
443 int cpu = smp_processor_id();
444
445 if (local_timer_ack()) {
446 irq_stat[cpu].local_timer_irqs++;
c97d4869 447 ipi_timer();
37ee16ae 448 }
c97d4869
RK
449
450 set_irq_regs(old_regs);
37ee16ae
RK
451}
452#endif
453
bc28248e
RK
454#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
455static void smp_timer_broadcast(const struct cpumask *mask)
456{
457 send_ipi_message(mask, IPI_TIMER);
458}
5388a6b2
RK
459#else
460#define smp_timer_broadcast NULL
461#endif
bc28248e 462
5388a6b2 463#ifndef CONFIG_LOCAL_TIMERS
bc28248e
RK
464static void broadcast_timer_set_mode(enum clock_event_mode mode,
465 struct clock_event_device *evt)
466{
467}
468
469static void local_timer_setup(struct clock_event_device *evt)
470{
471 evt->name = "dummy_timer";
472 evt->features = CLOCK_EVT_FEAT_ONESHOT |
473 CLOCK_EVT_FEAT_PERIODIC |
474 CLOCK_EVT_FEAT_DUMMY;
475 evt->rating = 400;
476 evt->mult = 1;
477 evt->set_mode = broadcast_timer_set_mode;
bc28248e
RK
478
479 clockevents_register_device(evt);
480}
481#endif
482
483void __cpuinit percpu_timer_setup(void)
484{
485 unsigned int cpu = smp_processor_id();
486 struct clock_event_device *evt = &per_cpu(percpu_clockevent, cpu);
487
488 evt->cpumask = cpumask_of(cpu);
5388a6b2 489 evt->broadcast = smp_timer_broadcast;
bc28248e
RK
490
491 local_timer_setup(evt);
492}
493
1da177e4
LT
494static DEFINE_SPINLOCK(stop_lock);
495
496/*
497 * ipi_cpu_stop - handle IPI from smp_send_stop()
498 */
499static void ipi_cpu_stop(unsigned int cpu)
500{
3d3f78d7
RK
501 if (system_state == SYSTEM_BOOTING ||
502 system_state == SYSTEM_RUNNING) {
503 spin_lock(&stop_lock);
504 printk(KERN_CRIT "CPU%u: stopping\n", cpu);
505 dump_stack();
506 spin_unlock(&stop_lock);
507 }
1da177e4 508
e03cdade 509 set_cpu_online(cpu, false);
1da177e4
LT
510
511 local_fiq_disable();
512 local_irq_disable();
513
514 while (1)
515 cpu_relax();
516}
517
518/*
519 * Main handler for inter-processor interrupts
1da177e4 520 */
ad3b6993 521asmlinkage void __exception do_IPI(int ipinr, struct pt_regs *regs)
1da177e4
LT
522{
523 unsigned int cpu = smp_processor_id();
524 struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
c97d4869 525 struct pt_regs *old_regs = set_irq_regs(regs);
1da177e4
LT
526
527 ipi->ipi_count++;
528
24480d98
RK
529 switch (ipinr) {
530 case IPI_TIMER:
531 ipi_timer();
532 break;
1da177e4 533
24480d98
RK
534 case IPI_RESCHEDULE:
535 /*
536 * nothing more to do - eveything is
537 * done on the interrupt return path
538 */
539 break;
1da177e4 540
24480d98
RK
541 case IPI_CALL_FUNC:
542 generic_smp_call_function_interrupt();
543 break;
f6dd9fa5 544
24480d98
RK
545 case IPI_CALL_FUNC_SINGLE:
546 generic_smp_call_function_single_interrupt();
547 break;
1da177e4 548
24480d98
RK
549 case IPI_CPU_STOP:
550 ipi_cpu_stop(cpu);
551 break;
1da177e4 552
24480d98
RK
553 default:
554 printk(KERN_CRIT "CPU%u: Unknown IPI message 0x%x\n",
555 cpu, ipinr);
556 break;
1da177e4 557 }
c97d4869 558 set_irq_regs(old_regs);
1da177e4
LT
559}
560
561void smp_send_reschedule(int cpu)
562{
82668104 563 send_ipi_message(cpumask_of(cpu), IPI_RESCHEDULE);
1da177e4
LT
564}
565
1da177e4
LT
566void smp_send_stop(void)
567{
568 cpumask_t mask = cpu_online_map;
569 cpu_clear(smp_processor_id(), mask);
f9e417e9
TL
570 if (!cpus_empty(mask))
571 send_ipi_message(&mask, IPI_CPU_STOP);
1da177e4
LT
572}
573
574/*
575 * not supported here
576 */
5048bcba 577int setup_profiling_timer(unsigned int multiplier)
1da177e4
LT
578{
579 return -EINVAL;
580}
4b0ef3b1 581
82668104
RK
582static void
583on_each_cpu_mask(void (*func)(void *), void *info, int wait,
584 const struct cpumask *mask)
4b0ef3b1 585{
4b0ef3b1
RK
586 preempt_disable();
587
82668104
RK
588 smp_call_function_many(mask, func, info, wait);
589 if (cpumask_test_cpu(smp_processor_id(), mask))
4b0ef3b1
RK
590 func(info);
591
592 preempt_enable();
4b0ef3b1
RK
593}
594
595/**********************************************************************/
596
597/*
598 * TLB operations
599 */
600struct tlb_args {
601 struct vm_area_struct *ta_vma;
602 unsigned long ta_start;
603 unsigned long ta_end;
604};
605
606static inline void ipi_flush_tlb_all(void *ignored)
607{
608 local_flush_tlb_all();
609}
610
611static inline void ipi_flush_tlb_mm(void *arg)
612{
613 struct mm_struct *mm = (struct mm_struct *)arg;
614
615 local_flush_tlb_mm(mm);
616}
617
618static inline void ipi_flush_tlb_page(void *arg)
619{
620 struct tlb_args *ta = (struct tlb_args *)arg;
621
622 local_flush_tlb_page(ta->ta_vma, ta->ta_start);
623}
624
625static inline void ipi_flush_tlb_kernel_page(void *arg)
626{
627 struct tlb_args *ta = (struct tlb_args *)arg;
628
629 local_flush_tlb_kernel_page(ta->ta_start);
630}
631
632static inline void ipi_flush_tlb_range(void *arg)
633{
634 struct tlb_args *ta = (struct tlb_args *)arg;
635
636 local_flush_tlb_range(ta->ta_vma, ta->ta_start, ta->ta_end);
637}
638
639static inline void ipi_flush_tlb_kernel_range(void *arg)
640{
641 struct tlb_args *ta = (struct tlb_args *)arg;
642
643 local_flush_tlb_kernel_range(ta->ta_start, ta->ta_end);
644}
645
646void flush_tlb_all(void)
647{
faa7bc51
CM
648 if (tlb_ops_need_broadcast())
649 on_each_cpu(ipi_flush_tlb_all, NULL, 1);
650 else
651 local_flush_tlb_all();
4b0ef3b1
RK
652}
653
654void flush_tlb_mm(struct mm_struct *mm)
655{
faa7bc51 656 if (tlb_ops_need_broadcast())
56f8ba83 657 on_each_cpu_mask(ipi_flush_tlb_mm, mm, 1, mm_cpumask(mm));
faa7bc51
CM
658 else
659 local_flush_tlb_mm(mm);
4b0ef3b1
RK
660}
661
662void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
663{
faa7bc51
CM
664 if (tlb_ops_need_broadcast()) {
665 struct tlb_args ta;
666 ta.ta_vma = vma;
667 ta.ta_start = uaddr;
56f8ba83 668 on_each_cpu_mask(ipi_flush_tlb_page, &ta, 1, mm_cpumask(vma->vm_mm));
faa7bc51
CM
669 } else
670 local_flush_tlb_page(vma, uaddr);
4b0ef3b1
RK
671}
672
673void flush_tlb_kernel_page(unsigned long kaddr)
674{
faa7bc51
CM
675 if (tlb_ops_need_broadcast()) {
676 struct tlb_args ta;
677 ta.ta_start = kaddr;
678 on_each_cpu(ipi_flush_tlb_kernel_page, &ta, 1);
679 } else
680 local_flush_tlb_kernel_page(kaddr);
4b0ef3b1
RK
681}
682
683void flush_tlb_range(struct vm_area_struct *vma,
684 unsigned long start, unsigned long end)
685{
faa7bc51
CM
686 if (tlb_ops_need_broadcast()) {
687 struct tlb_args ta;
688 ta.ta_vma = vma;
689 ta.ta_start = start;
690 ta.ta_end = end;
56f8ba83 691 on_each_cpu_mask(ipi_flush_tlb_range, &ta, 1, mm_cpumask(vma->vm_mm));
faa7bc51
CM
692 } else
693 local_flush_tlb_range(vma, start, end);
4b0ef3b1
RK
694}
695
696void flush_tlb_kernel_range(unsigned long start, unsigned long end)
697{
faa7bc51
CM
698 if (tlb_ops_need_broadcast()) {
699 struct tlb_args ta;
700 ta.ta_start = start;
701 ta.ta_end = end;
702 on_each_cpu(ipi_flush_tlb_kernel_range, &ta, 1);
703 } else
704 local_flush_tlb_kernel_range(start, end);
4b0ef3b1 705}
This page took 0.686565 seconds and 5 git commands to generate.