mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 20:50:52 +07:00
92704a1c63
On uniprocessor, it's always zero for optimize that. On SMP, the jmpl to the stub kills the return address stack in the cpu branch prediction logic, so expand the code sequence inline and use a code patching section to fix things up. This also always better and explicit register selection, which will be taken advantage of in a future changeset. The hard_smp_processor_id() function is big, so do not inline it. Fix up tests for Jalapeno to also test for Serrano chips too. These tests want "jbus Ultra-IIIi" cases to match, so that is what we should test for. Signed-off-by: David S. Miller <davem@davemloft.net>
56 lines
988 B
C
56 lines
988 B
C
/* smp.h: Sparc64 specific SMP stuff.
|
|
*
|
|
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
|
|
*/
|
|
|
|
#ifndef _SPARC64_SMP_H
|
|
#define _SPARC64_SMP_H
|
|
|
|
#include <linux/config.h>
|
|
#include <linux/threads.h>
|
|
#include <asm/asi.h>
|
|
#include <asm/starfire.h>
|
|
#include <asm/spitfire.h>
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#include <linux/cpumask.h>
|
|
#include <linux/cache.h>
|
|
|
|
#endif /* !(__ASSEMBLY__) */
|
|
|
|
#ifdef CONFIG_SMP
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
/*
|
|
* Private routines/data
|
|
*/
|
|
|
|
#include <asm/bitops.h>
|
|
#include <asm/atomic.h>
|
|
|
|
extern cpumask_t phys_cpu_present_map;
|
|
#define cpu_possible_map phys_cpu_present_map
|
|
|
|
/*
|
|
* General functions that each host system must provide.
|
|
*/
|
|
|
|
extern int hard_smp_processor_id(void);
|
|
#define raw_smp_processor_id() (current_thread_info()->cpu)
|
|
|
|
extern void smp_setup_cpu_possible_map(void);
|
|
|
|
#endif /* !(__ASSEMBLY__) */
|
|
|
|
#else
|
|
|
|
#define smp_setup_cpu_possible_map() do { } while (0)
|
|
|
|
#endif /* !(CONFIG_SMP) */
|
|
|
|
#define NO_PROC_ID 0xFF
|
|
|
|
#endif /* !(_SPARC64_SMP_H) */
|