Commit 89832108 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] cpumask.h reorg

From: Paul Jackson <pj@sgi.com>

Push the cpumask implementation from linux/cpumask.h into asm/cpumask.h, so
that ia64 can do special things without breaking sparc64.

1) Each arch has its own include/asm-<arch>/cpumask.h file

2) That arch-specific header file can include <asm-generic/cpumask.h>,
   if it wants to make use of the generic cpumask implementation.

3) Using code should continue to include linux/cpumask.h, which
   in turn includes asm/cpumask.h.  Some common implementation
   independent cpumask related items, such as the cpu_online_map,
   are declared directly in linux/cpumask.h.
parent adf9a351
#ifndef _ASM_ALPHA_CPUMASK_H
#define _ASM_ALPHA_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_ALPHA_CPUMASK_H */
#ifndef _ASM_ARM_CPUMASK_H
#define _ASM_ARM_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_ARM_CPUMASK_H */
#ifndef _ASM_ARM26_CPUMASK_H
#define _ASM_ARM26_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_ARM26_CPUMASK_H */
#ifndef _ASM_CRIS_CPUMASK_H
#define _ASM_CRIS_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_CRIS_CPUMASK_H */
#ifndef __ASM_GENERIC_CPUMASK_H
#define __ASM_GENERIC_CPUMASK_H
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/threads.h>
#include <linux/types.h>
#include <linux/bitmap.h>
#if NR_CPUS > BITS_PER_LONG && NR_CPUS != 1
#define CPU_ARRAY_SIZE BITS_TO_LONGS(NR_CPUS)
struct cpumask
{
unsigned long mask[CPU_ARRAY_SIZE];
};
typedef struct cpumask cpumask_t;
#else
typedef unsigned long cpumask_t;
#endif
#ifdef CONFIG_SMP
#if NR_CPUS > BITS_PER_LONG
#include <asm-generic/cpumask_array.h>
#else
#include <asm-generic/cpumask_arith.h>
#endif
#else
#include <asm-generic/cpumask_up.h>
#endif
#if NR_CPUS <= 4*BITS_PER_LONG
#include <asm-generic/cpumask_const_value.h>
#else
#include <asm-generic/cpumask_const_reference.h>
#endif
#endif /* __ASM_GENERIC_CPUMASK_H */
#ifndef _ASM_H8300_CPUMASK_H
#define _ASM_H8300_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_H8300_CPUMASK_H */
#ifndef _ASM_I386_CPUMASK_H
#define _ASM_I386_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_I386_CPUMASK_H */
#ifndef _ASM_IA64_CPUMASK_H
#define _ASM_IA64_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_IA64_CPUMASK_H */
#ifndef _ASM_M68K_CPUMASK_H
#define _ASM_M68K_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_M68K_CPUMASK_H */
#ifndef _ASM_M68KNOMMU_CPUMASK_H
#define _ASM_M68KNOMMU_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_M68KNOMMU_CPUMASK_H */
#ifndef _ASM_MIPS_CPUMASK_H
#define _ASM_MIPS_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_MIPS_CPUMASK_H */
#ifndef _ASM_PARISC_CPUMASK_H
#define _ASM_PARISC_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_PARISC_CPUMASK_H */
#ifndef _ASM_PPC_CPUMASK_H
#define _ASM_PPC_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_PPC_CPUMASK_H */
#ifndef _ASM_PPC64_CPUMASK_H
#define _ASM_PPC64_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_PPC64_CPUMASK_H */
#ifndef _ASM_S390_CPUMASK_H
#define _ASM_S390_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_S390_CPUMASK_H */
#ifndef _ASM_SH_CPUMASK_H
#define _ASM_SH_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_SH_CPUMASK_H */
#ifndef _ASM_SPARC_CPUMASK_H
#define _ASM_SPARC_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_SPARC_CPUMASK_H */
#ifndef _ASM_SPARC64_CPUMASK_H
#define _ASM_SPARC64_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_SPARC64_CPUMASK_H */
#ifndef _ASM_UM_CPUMASK_H
#define _ASM_UM_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_UM_CPUMASK_H */
#ifndef _ASM_V850_CPUMASK_H
#define _ASM_V850_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_V850_CPUMASK_H */
#ifndef _ASM_X86_64_CPUMASK_H
#define _ASM_X86_64_CPUMASK_H
#include <asm-generic/cpumask.h>
#endif /* _ASM_X86_64_CPUMASK_H */
#ifndef __LINUX_CPUMASK_H
#define __LINUX_CPUMASK_H
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/threads.h>
#include <linux/types.h>
#include <linux/bitmap.h>
#if NR_CPUS > BITS_PER_LONG && NR_CPUS != 1
#define CPU_ARRAY_SIZE BITS_TO_LONGS(NR_CPUS)
struct cpumask
{
unsigned long mask[CPU_ARRAY_SIZE];
};
typedef struct cpumask cpumask_t;
#else
typedef unsigned long cpumask_t;
#endif
#ifdef CONFIG_SMP
#if NR_CPUS > BITS_PER_LONG
#include <asm-generic/cpumask_array.h>
#else
#include <asm-generic/cpumask_arith.h>
#endif
#else
#include <asm-generic/cpumask_up.h>
#endif
#if NR_CPUS <= 4*BITS_PER_LONG
#include <asm-generic/cpumask_const_value.h>
#else
#include <asm-generic/cpumask_const_reference.h>
#endif
#include <asm/cpumask.h>
#include <asm/bug.h>
#ifdef CONFIG_SMP
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment