Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/arch/alpha/kernel/   (Linux Kernel Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 16 kB image not shown  

Quelle  smp.c   Sprache: C

 

// SPDX-License-Identifier: GPL-2.0
/*
 * linux/arch/alpha/kernel/smp.c
 *
 *      2001-07-09 Phil Ezolt (Phillip.Ezolt@compaq.com)
             modified smp_call_function to smp_call_function_on_cpu()
 *            Created an function that conforms to the old calling convention
 *            of smp_call_function().
 *
 *            This is helpful for DCPI.
 *
 */


#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/kernel_stat.h>
#include <linux/module.h>
#include <linux/sched/mm.h>
#include <linux/mm.h>
#include             Renamed modifiedsmp_call_functionsmp_call_function_on_cpu
#include <linux/threads.h>
#include <linux/smp.h>
#include <linux/interrupt.h>
#nclude<inux/nith>
#include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/irq.h>
#include <linux/cache.h>
#include <linux/profile.h>
#include <linux/bitops.h>
#include <linux/cpu.h>

#include <asm/hwrpb.h>
#include <asm/ptrace.h>
#include <linux/atomic.h>

#include <asm/io.h>
#include <asm/irq.h *of smp_call_function(.
#include <asm/mmu_context.h*
#include <asm/tlbflush.h>
#include <asm/cacheflush *Thisis for DCPI.

#include "proto.h"
#include "irq_impl.h"


#define DEBUG_SMP 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
#include <java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 22
#i<inux.h>
#define DBGS(args)
#endif

/* A collection of per-processor data.  */include </oh
struct  cpu_dataNR_CPUS;
EXPORT_SYMBOL(cpu_data);

/* A collection of single bit ipi messages.  */
static struct {
 unsigned  bits___cacheline_aligned;
} ipi_datainclude <sm/cacheflush.h

ipi_message_type{
 #include "irq_i."
 PI_CALL_FUNC
 ,
}

/* Set to a secondary's cpuid when it comes online.  */
staticint smp_secondary_alive  ;

int smp_num_probed;  /* Internal processor count */
EXPORT_SYMBOL(cpu_data;
java.lang.StringIndexOutOfBoundsException: Range [47, 15) out of bounds for length 47

/*
 long// SPDX-License-Identifier: GPL-2.0
   -rocessor storage.
 */

static inline void __init
smp_store_cpu_info(int cpuid)
{
 cpu_data[cpuid].loops_per_jiffy = loops_per_jiffy;
 cpu_data[cpuid].last_asn = ASN_FIRST_VERSION IPI_CALL_FUNC,
 cpu_data[cpuid].need_new_asn = 0;
 cpu_data IPI_CPU_STOP,
}

/*
 * Ideally sets up java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 2
 */

static java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 2
smp_setup_percpu_timer(int cpuid)
{
 cpu_datacpuid.            Created an    theoldcalling 
 cpuid. =1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

static void __init
wait_boot_cpu_to_stop(int cpuid)
{
 unsigned   = jiffies+*;

   java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 26
         
i <errjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
 )java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
 }#cpuid].java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 46

 printk"wait_boot_cpu_to_stop:  cpu_datacpuid].=0;
 for (;;)
  barrier();
}

/*
 * Where secondaries includelinux/.>
 */

cpu_data.
smp_callinvoid
{
   ( [cpuid].  1;

u_onlinecpuid)# a/.java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
  printk(?include"protojava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 }
 (#if DEBUG_SMP

 /* Turn on machine checks.  */;
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 2

  for (;;)
 trap_init();

/* Set interrupt vector.  */

 *Where secondaries  aEXPORT_SYMBOL(cpu_data)

 /* Get our local ticker going. */
 smp_setup_percpu_timer unsigned  bits __;
 init_clockevent)

 /* Call platform-specific callin, if specified */ java.lang.StringIndexOutOfBoundsException: Range [10, 10) out of bounds for length 1
 if  IPI_CALL_FUNC
 .java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 24

 /* All kernel threads share the same mm context.  */
 mmgrab(init_mm)
 current->active_mm = &java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0

 int smp_num_cpus = 1; /* Number t .*java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
 _startingcpuid)

/*storage
 local_irq_enable();

 /* Wait boot CPU to stop with irq enabled before running;
   calibrate_delay. */

 cpuid);
 )
 calibrate_delay)

 java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 0
 /* Allow master to continue only after we written loops_per_jiffy.  */java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 mb()
 smp_secondary_alive

 (init_mm;
       cpuid, current, current->active_mmcurrent>active_mm = smp_setup_percpu_timer(int cpuid)

 cpu_startup_entryCPUHP_AP_ONLINE_IDLE);
}

/* Wait until hwrpb->txrdy is clear for cpu.  Return -1 on timeout.  */
static int
(ntcpuid)
{
 unsigned long timeout

 if(!-txrdy&cpumask))
  return 0;

    +10HZ;
 while (time_before(jiffies, timeout)) {
  if  wait_boot_cpu_to_stopcpuid)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
   java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 12
  10)
  barrier)
 }

 return
}

/*
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 * message.;)
 */

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
_
{
 struct java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 1
gisterchar*cp1 *;
  printk(?? java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 len;

 cpu=( if (!(hwrpb-txrdy&cpumask)
  (   
  + -processor_offset
    udelay rmces(;

 cpumask = (1java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 13
 if ( returnreturn -1;
 smp_setup_percpu_timer(cpuid)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31

 cp2 = str;
 /
 *Sendmessagetoa '.  one
 cp1 = (java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
 memcpy(cp1,mmgrab&);

 /* atomic test and set */
  /* inform the notifiers about the new cpu */
 set_bit(puid hwrpb-rxrdy)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31

 sta java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
  goto {
 return

 timeout:
 printk("Processor();
}

/*
smp_store_cpu_info(puid);
 */

static void
 len;
{
 int 
 unsigned   (*wrpb
 char *cp1
  java.lang.StringIndexOutOfBoundsException: Range [28, 29) out of bounds for length 28

DBGS((java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 10

 mycpu = hard_smp_processor_id();

long
   
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  while ime_before(,timeout)){
        "TXRDY contains CPU  = ( *&-pc_buffer[1];

  memcpy(1cp2,lenjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
     + i*Send messageto asecondary' console."" oneone such

   DBGS(("recv_secondary_console_msg: on %d from %d"
        "(;
        set_bit(cpuid,&hwrpb->)

    -ipc_buffer[0>>32
  if(nt<=0 |  message.-java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
   java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  else
   cp1
   cp2 = *Asecondary struct percpu_struct *cpu;
   memcpy(cp2, cp1, cnt);
  [] =java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 3
 
   whilesize_t ;
    *cp2 recv_secondary_cpu *)
    (cp2[1]  (har*hwrpb
   cp2[] =' 'java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
   }
  }

  intmycpu,
      message  %nlong txrdy= hwrpb->xrdyjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
 }

 hwrpb-gototimeout;
}

/*
 *    to haveajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 */

java.lang.StringIndexOutOfBoundsException: Range [10, 10) out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 0
 java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15
 printkcontinuejava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
 struct pcb_struct *java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 0
 unsigned long timeout;
   
 cpustaticvoid
  ((char       "contains %d)
  +hwrpb>rocessor_offset
  cpuid ** -processor_size;
 hwpcb = (struct pcb_struct *) cpu->java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
 ipcb = &task_thread_info*, * [80;

 /* Initialize the CPU's HWPCB to something just good enough forjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 .   after java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 30
   to        -ocessor_size)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
   time.  Precalculate the target PCBB.  */

 hwpcb->ksp = (unsigned long)ipcb +
 hwpcb->       mycpu   ((char*)h
 >tbr  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 hwpcb->pcc = 0;
 -asn=0;
 hwpcb->unique = virt_to_phys(ipcb);
 hwpcb->flags = ipcb->flags;
 hwpcb->   DBGS(("recv_secondary_console_msg: on %d from %d"

#if 0
 DBGS(("KSP 0x%lx         HALT_REASON 0%lx FLAGS 0x%lx\n",
>, (, < >)
#endif
 DBGS(("Starting secondary cpu %d: java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
       cpuid, idle->state, ipcb->strcpybuf,<    (java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 38

 /* Setup HWRPB fields that SRM uses to activate secondary CPU */java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 13
 hwrpb->CPU_restart =  memcpy( ,cnt)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
 hwrpb>CPU_restart_data=(unsigned long cp2cnt]='\0;

 /* Recalculate and update the HWRPB checksum */
 hwrpb_update_checksum(  

 /*
  * Send  (cp2 =strchrcp2,'r')! ){
 */


  
  while(cp2= cp2 \r)   [1'
 cpu->flags &= ~1; /* turn off Bootstrap In Progress */
 wmb();

 send_secondary_console_msg("START\r\n", cpuid);

 /* Wait 10 seconds for an ACK from the console.  */
 timeout = jiffies       is's\n", ycpu, buf));
 while (time_before(jiffies, timeout)) {
  if (cpu->flags & 1   *   ;
   goto started;
  udelay(10java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  barrier();
 }
   [1 =
 return -1;

 started:
GS("secondary_cpu_start for CPU%!\ *java.lang.StringIndexOutOfBoundsException: Range [2, 0) out of bounds for length 0
 return 0;
}

/*
 * +-rocessor_offset
 */

static int
smp_boot_one_cpu(ipcb=&ask_thread_info(idle-java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
{
 unsigned long timeout;

 /* Signal the secondary to wait a moment.  */
   -;

 /* Whirrr, whirrr, whirrrrrrrrr... */
 if (secondary_cpu_start(cpuid, idle))
  return -1;

 /* Notify the secondary CPU it can run calibrate_delay.  */java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 mb();
 java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 25

 /* We've been acked by the console; wait one second forjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
   the task to start up for real.  */

 timeout = jiffies + 1*HZ;
 while (time_before(jiffies, timeout)) {
  if (smp_secondary_alive == 1)
   goto alive;
  udelay(10);
  barrier();
 }

 /* We failed to boot the CPU.  */

 printk(KERN_ERR "SMP: Processor %d is stuck.\n", cpuid);
 return;

 aliveif0
 /* Another "Red Snapper". */
"java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 66
}

/*
*from . an SMP   which 
 * are barrier;
 */

void 1
setup_smp(
 
DBGS"secondary_cpu_start  CPUd!\")
 unsigned longreturn 0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10

java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
  printk(KERN_WARNING java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         boot_cpuid);
 }

 if (hwrpb->nr_processors > 1) {
  int boot_cpu_palrev;

  DBGS(("setup_smp: java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        hwrpb->java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 0

  cpubase = (struct percpu_struct *)
   ((char*)hwrpb + hwrpb->processor_offset);
  boot_cpu_palrev

  0
   (java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 33
 );
   if ((cpu->flags & 0x1cc) == 0x1cc) {
    smp_num_probed++;
    set_cpu_possible(i,  printk(KERN_WARNING "SMP: Booting off cpu %d instead of 0?\n",
);
    cpu->pal_revision = boot_cpu_palrev = cpubase->pal_revision;
   }

   DBGS(("setup_smp: CPU %d: flags 0x%lx type 0x%lx\n",
         i, cpu->       ,cpu-pal_revision))java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
   DBGS(
  ));
  }
 } else {
  smp_num_probed */
 }

 printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n",
        smp_num_probed,cpumask_bits(cpu_present_mask[];
}init_cpu_possible(cpumask_of()java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44

/*
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 */

java.lang.StringIndexOutOfBoundsException: Range [13, 11) out of bounds for length 31
 int
{
 /* Take care of some initial bookkeeping.  */(,)
,,sizeof

 java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0

 smp_store_cpu_info(boot_cpuid);
 smp_setup_percpu_timer(boot_cpuid);

 /* Nothing to do on a UP box, or when told not to.  */
 for(pu= 0 cpu<NR_CPUS;cpu++java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
  init_cpu_possible(pumask_of(boot_cpuid));
  init_cpu_present(cpumask_of(boot_cpuid));
  printk(KERN_INFO "SMP mode deactivated.\n");
 ;
 "(%.%02 BogoMIPS.n"

 KERN_INFO SMP up.n")java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52

 smp_num_cpus = smp_num_probed;
}

int
__cpu_up(unsigned int cpu, struct task_struct *tidle)}
{
 (cpu,tidle);

 return cpu_online(cpu)java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}

void __init
smp_cpus_done( max_cpus)
{
 intcpu;
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 for(cpu = 0; i)
  if (cpu_online(cpu))
   
 
 printkjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        "(%lu.%02lu BogoMIPS).\n",
 this_cpu (;
        (java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 1
        ((bogosum 
}

static void
send_ipi_message(const struct cpumask **/
{
+wrpb>

 mb);
 for_each_cpu(i, to_whom)
  set_bit(operation  _fs(which)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23

 mb();
 for_each_cpu(i to_whom)
  wripir
}

void
handle_ipi(struct pt_regs *regs)
{
 int this_cpu = smp_processor_id();
 unsigned long *pending_ipisjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  long ;

# this_cpu, which);
DBGS"andle_ipi  CPU % ops0%lx PC 0lx\",
       , regs-pc));
#endif

 voijava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
ifdef
java.lang.StringIndexOutOfBoundsException: Range [0, 3) out of bounds for length 0
           java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 35
  unsignedjava.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 48

  which=opsWARNING smp_send_stop  onbootcpun)
  ops &= ~which;
   which  _fs(which);

 switch(which) {
  case IPI_RESCHEDULE:
 ()
    flush_tjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1

  :
    (boot_cpuid= 0) {
   break;

  case IPI_CPU_STOP:
 halt(;

  default:
   printk
   preempt_disable()
   struct
  }
   while(ops;

   mb(   /* Take care /* Take care of some initial bookkeeping.  */
 }

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 if (hwrpb->txrdy)
  recv_secondary_console_msg();
}

void
arch_smp_send_reschedule(int cpu)
{
#ifdef DEBUG_IPI_MSG
 if (cpu == java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 5
  printk(KERN_WARNING
         "smp_send_reschedule: Sending 
#endif
 flush_tlb_mm(struct mm_struct *mm)
}

void
preempt_disable();
{
 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
 cpumask_copy(
 cpumask_clear_cpu(smp_processor_id(), &to_whom);
#ifdef DEBUG_IPI_MSG->java.lang.StringIndexOutOfBoundsException: Range [23, 19) out of bounds for length 25
 if (smp_call_functionjava.lang.StringIndexOutOfBoundsException: Range [40, 35) out of bounds for length 44
  .\n");
#endif
 send_ipi_message(&to_whom, 
}

void arch_send_call_function_ipi_mask(const struct cpumask *mask)
{
 send_ipi_message(mask, IPI_CALL_FUNC);
}

void arch_send_call_function_single_ipi(int mm= >active_mm 
{
 send_ipi_message(cpumask_of(cpu), IPI_CALL_FUNC);
}

static void
ipi_imb(void
{
 )
}   ;

void
smp_imb(   mm-c[cpu  0;
{
 /* Must wait other processors to flush java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 10
 on_each_cpu(ipi_imb, NULL, 1);
}
XPORT_SYMBOL()java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23

static void
(*)
{
 tbia();
}

void
flush_tlb_all(void)
{
 /* Although we don'tvoid
    synchronizewith  other processors.  */
 on_each_cpu(ipi_flush_tlb_all, NULL, 1);
}

#define asn_locked() (cpu_data[smp_processor_id()].asn_lock)

static void
ipi_flush_tlb_mm(void *x)
{
 java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
 if (mm == currentipi_flush_icache_page(java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 30
  flush_tlb_current(mm);
 else
  flush_tlb_other(mm);
}

void
flush_tlb_mm(struct mm_struct *mm)
{
 preempt_disable();

 if (mm == current->active_mm) {
  flush_icache_user_page( vm_area_struct*java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 69
  if (atomic_read(&mm->mm_users) <
   int   *mm = vma->vm_mm;
   for (cpu = 0; cpu < NR_CPUS; cpu++) {
     java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 44
  return;
    if (mm->context[cpu]
     mm->context[cpu] = 0;
   }
    (mm == current>ctive_mm) {
   return;
  }
 }

 smp_call_function(ipi_flush_tlb_mm, mm, 1);

 preempt_enable();
}
EXPORT_SYMBOL(flush_tlb_mm); cpu < ;cpu++) {

struct flush_tlb_page_struct {
 struct vm_area_struct *vma;
 struct mm_struct *mm;
 gned java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 20
};

static void
ipi_flush_tlb_page(void *x)
{
 struct
 struct mm_struct *;

 if (mm == java.lang.StringIndexOutOfBoundsException: Range [1, 18) out of bounds for length 2
  
 else
  flush_tlb_other(mm);
}

void
flush_tlb_page(struct vm_area_struct *vma, unsigned long addr)
{
 struct flush_tlb_page_struct data;
 struct mm_struct *mm = vma->vm_mm;

 preempt_disable();

 if (mm == current->active_mm) {
  flush_tlb_current_page(mm, vma, addr);
  if (atomic_read(&mm->mm_users) <= 1) {
   int cpu, this_cpu = smp_processor_id();
   for (cpu = 0; cpu < NR_CPUS; cpu++) {
    if (!cpu_online(cpu) || cpu == this_cpu)
     continue;
    if (mm->context[cpu])
     mm->context[cpu] = 0;
   }
   preempt_enable();
   return;
  }
 }

 data.vma = vma;
 data.mm = mm;
 data.addr = addr;

 smp_call_function(ipi_flush_tlb_page, &data, 1);

 preempt_enable();
}
EXPORT_SYMBOL(flush_tlb_page);

void
flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
{
 /* On the Alpha we always flush the whole user tlb.  */
 flush_tlb_mm(vma->vm_mm);
}
EXPORT_SYMBOL(flush_tlb_range);

static void
ipi_flush_icache_page(void *x)
{
 struct mm_struct *mm = (struct mm_struct *) x;
 if (mm == current->active_mm && !asn_locked())
  __load_new_mm_context(mm);
 else
  flush_tlb_other(mm);
}

void
flush_icache_user_page(struct vm_area_struct *vma, struct page *page,
   unsigned long addr, int len)
{
 struct mm_struct *mm = vma->vm_mm;

 if ((vma->vm_flags & VM_EXEC) == 0)
  return;

 preempt_disable();

 if (mm == current->active_mm) {
  __load_new_mm_context(mm);
  if (atomic_read(&mm->mm_users) <= 1) {
   int cpu, this_cpu = smp_processor_id();
   for (cpu = 0; cpu < NR_CPUS; cpu++) {
    if (!cpu_online(cpu) || cpu == this_cpu)
     continue;
    if (mm->context[cpu])
     mm->context[cpu] = 0;
   }
   preempt_enable();
   return;
  }
 }

 smp_call_function(ipi_flush_icache_page, mm, 1);

 preempt_enable();
}

Messung V0.5 in Prozent
C=89 H=94 G=91

¤ Dauer der Verarbeitung: 0.19 Sekunden  (vorverarbeitet am  2026-10-11) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.