mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
powerpc: move ASM_CONST and stringify_in_c() into asm-const.h
This patch moves ASM_CONST() and stringify_in_c() into dedicated asm-const.h, then cleans all related inclusions. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> [mpe: asm-compat.h should include asm-const.h] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
committed by
Michael Ellerman
parent
36a7eeaff7
commit
ec0c464cdb
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
#include <asm/ppc_asm.h>
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/asm-compat.h>
|
||||
|
||||
#define rHP r3
|
||||
#define rWP r4
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <asm/ppc_asm.h>
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/asm-compat.h>
|
||||
|
||||
#ifdef __BIG_ENDIAN__
|
||||
#define LWZ(rt, d, ra) \
|
||||
|
||||
@@ -1,21 +1,10 @@
|
||||
#ifndef _ASM_POWERPC_ASM_COMPAT_H
|
||||
#define _ASM_POWERPC_ASM_COMPAT_H
|
||||
|
||||
#include <asm/asm-const.h>
|
||||
#include <asm/types.h>
|
||||
#include <asm/ppc-opcode.h>
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
# define stringify_in_c(...) __VA_ARGS__
|
||||
# define ASM_CONST(x) x
|
||||
#else
|
||||
/* This version of stringify will deal with commas... */
|
||||
# define __stringify_in_c(...) #__VA_ARGS__
|
||||
# define stringify_in_c(...) __stringify_in_c(__VA_ARGS__) " "
|
||||
# define __ASM_CONST(x) x##UL
|
||||
# define ASM_CONST(x) __ASM_CONST(x)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __powerpc64__
|
||||
|
||||
/* operations for longs and pointers */
|
||||
|
||||
14
arch/powerpc/include/asm/asm-const.h
Normal file
14
arch/powerpc/include/asm/asm-const.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef _ASM_POWERPC_ASM_CONST_H
|
||||
#define _ASM_POWERPC_ASM_CONST_H
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
# define stringify_in_c(...) __VA_ARGS__
|
||||
# define ASM_CONST(x) x
|
||||
#else
|
||||
/* This version of stringify will deal with commas... */
|
||||
# define __stringify_in_c(...) #__VA_ARGS__
|
||||
# define stringify_in_c(...) __stringify_in_c(__VA_ARGS__) " "
|
||||
# define __ASM_CONST(x) x##UL
|
||||
# define ASM_CONST(x) __ASM_CONST(x)
|
||||
#endif
|
||||
#endif /* _ASM_POWERPC_ASM_CONST_H */
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifndef _ASM_POWERPC_BARRIER_H
|
||||
#define _ASM_POWERPC_BARRIER_H
|
||||
|
||||
#include <asm/asm-const.h>
|
||||
|
||||
/*
|
||||
* Memory barrier.
|
||||
* The sync instruction guarantees that all memory accesses initiated
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#define _ASM_POWERPC_BOOK3S_64_HASH_H
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <asm/asm-const.h>
|
||||
|
||||
/*
|
||||
* Common bits between 4K and 64K pages in a linux-style PTE.
|
||||
* Additional bits may be defined in pgtable-hash64-*.h
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <asm/asm-compat.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/bug.h>
|
||||
#include <asm/asm-const.h>
|
||||
|
||||
/*
|
||||
* This is necessary to get the definition of PGTABLE_RANGE which we
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#ifndef _ASM_POWERPC_PGTABLE_RADIX_H
|
||||
#define _ASM_POWERPC_PGTABLE_RADIX_H
|
||||
|
||||
#include <asm/asm-const.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#include <asm/cmpxchg.h>
|
||||
#endif
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/compiler.h>
|
||||
#include <asm/synch.h>
|
||||
#include <asm/asm-compat.h>
|
||||
#include <linux/bug.h>
|
||||
#include <asm/asm-405.h>
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <asm/ppc-opcode.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/kallsyms.h>
|
||||
#include <asm/asm-compat.h>
|
||||
|
||||
/* Flags for create_branch:
|
||||
* "b" == create_branch(addr, target, 0);
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/asm-compat.h>
|
||||
#include <asm/feature-fixups.h>
|
||||
#include <uapi/asm/cputable.h>
|
||||
#include <asm/asm-const.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/asm-compat.h>
|
||||
#include <asm/feature-fixups.h>
|
||||
#include <uapi/asm/cputable.h>
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef __ASM_POWERPC_FEATURE_FIXUPS_H
|
||||
#define __ASM_POWERPC_FEATURE_FIXUPS_H
|
||||
|
||||
#include <asm/asm-const.h>
|
||||
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <asm/asm-compat.h>
|
||||
#include <asm/feature-fixups.h>
|
||||
#include <asm/asm-const.h>
|
||||
|
||||
/* firmware feature bitmask values */
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/errno.h>
|
||||
#include <asm/synch.h>
|
||||
#include <asm/asm-compat.h>
|
||||
#include <asm/asm-405.h>
|
||||
|
||||
#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <asm/machdep.h>
|
||||
#include <asm/types.h>
|
||||
#include <asm/pci-bridge.h>
|
||||
#include <asm/asm-const.h>
|
||||
|
||||
#define IOMMU_PAGE_SHIFT_4K 12
|
||||
#define IOMMU_PAGE_SIZE_4K (ASM_CONST(1) << IOMMU_PAGE_SHIFT_4K)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <linux/types.h>
|
||||
|
||||
#include <asm/feature-fixups.h>
|
||||
#include <asm/asm-compat.h>
|
||||
#include <asm/asm-const.h>
|
||||
|
||||
#define JUMP_ENTRY_TYPE stringify_in_c(FTR_ENTRY_LONG)
|
||||
#define JUMP_LABEL_NOP_SIZE 4
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include <asm/page.h>
|
||||
#include <asm/asm-const.h>
|
||||
|
||||
#define PPC44x_MMUCR_TID 0x000000ff
|
||||
#define PPC44x_MMUCR_STS 0x00010000
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#include <asm/asm-compat.h>
|
||||
#include <asm/feature-fixups.h>
|
||||
#include <asm/asm-const.h>
|
||||
|
||||
/*
|
||||
* MMU features bit definitions
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <asm/nohash/64/pgtable-4k.h>
|
||||
#include <asm/barrier.h>
|
||||
#include <asm/asm-const.h>
|
||||
|
||||
#ifdef CONFIG_PPC_64K_PAGES
|
||||
#error "Page size not supported"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user