mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
treewide: Convert macro and uses of __section(foo) to __section("foo")
Use a more generic form for __section that requires quotes to avoid
complications with clang and gcc differences.
Remove the quote operator # from compiler_attributes.h __section macro.
Convert all unquoted __section(foo) uses to quoted __section("foo").
Also convert __attribute__((section("foo"))) uses to __section("foo")
even if the __attribute__ has multiple list entry forms.
Conversion done using the script at:
https://lore.kernel.org/lkml/75393e5ddc272dc7403de74d645e6c6e0f4e70eb.camel@perches.com/2-convert_section.pl
Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@gooogle.com>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
986b9eacb2
commit
33def8498f
@@ -64,15 +64,15 @@
|
||||
#else /* !__ASSEMBLY__ */
|
||||
|
||||
#ifdef CONFIG_ARC_HAS_ICCM
|
||||
#define __arcfp_code __section(.text.arcfp)
|
||||
#define __arcfp_code __section(".text.arcfp")
|
||||
#else
|
||||
#define __arcfp_code __section(.text)
|
||||
#define __arcfp_code __section(".text")
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARC_HAS_DCCM
|
||||
#define __arcfp_data __section(.data.arcfp)
|
||||
#define __arcfp_data __section(".data.arcfp")
|
||||
#else
|
||||
#define __arcfp_data __section(.data)
|
||||
#define __arcfp_data __section(".data")
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
@@ -53,7 +53,7 @@ extern const struct machine_desc __arch_info_begin[], __arch_info_end[];
|
||||
*/
|
||||
#define MACHINE_START(_type, _name) \
|
||||
static const struct machine_desc __mach_desc_##_type \
|
||||
__used __section(.arch.info.init) = { \
|
||||
__used __section(".arch.info.init") = { \
|
||||
.name = _name,
|
||||
|
||||
#define MACHINE_END \
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/mach_desc.h>
|
||||
|
||||
int arc_hsdk_axi_dmac_coherent __section(.data) = 0;
|
||||
int arc_hsdk_axi_dmac_coherent __section(".data") = 0;
|
||||
|
||||
#define ARC_CCM_UNUSED_ADDR 0x60000000
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
#define ARCH_SLAB_MINALIGN 8
|
||||
#endif
|
||||
|
||||
#define __read_mostly __attribute__((__section__(".data..read_mostly")))
|
||||
#define __read_mostly __section(".data..read_mostly")
|
||||
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,7 @@ struct of_cpuidle_method {
|
||||
|
||||
#define CPUIDLE_METHOD_OF_DECLARE(name, _method, _ops) \
|
||||
static const struct of_cpuidle_method __cpuidle_method_of_table_##name \
|
||||
__used __section(__cpuidle_method_of_table) \
|
||||
__used __section("__cpuidle_method_of_table") \
|
||||
= { .method = _method, .ops = _ops }
|
||||
|
||||
extern int arm_cpuidle_suspend(int index);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <linux/pgtable.h>
|
||||
|
||||
/* Tag a function as requiring to be executed via an identity mapping. */
|
||||
#define __idmap __section(.idmap.text) noinline notrace
|
||||
#define __idmap __section(".idmap.text") noinline notrace
|
||||
|
||||
extern pgd_t *idmap_pgd;
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ extern const struct machine_desc __arch_info_begin[], __arch_info_end[];
|
||||
#define MACHINE_START(_type,_name) \
|
||||
static const struct machine_desc __mach_desc_##_type \
|
||||
__used \
|
||||
__attribute__((__section__(".arch.info.init"))) = { \
|
||||
__section(".arch.info.init") = { \
|
||||
.nr = MACH_TYPE_##_type, \
|
||||
.name = _name,
|
||||
|
||||
@@ -91,7 +91,7 @@ static const struct machine_desc __mach_desc_##_type \
|
||||
#define DT_MACHINE_START(_name, _namestr) \
|
||||
static const struct machine_desc __mach_desc_##_name \
|
||||
__used \
|
||||
__attribute__((__section__(".arch.info.init"))) = { \
|
||||
__section(".arch.info.init") = { \
|
||||
.nr = ~0, \
|
||||
.name = _namestr,
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <uapi/asm/setup.h>
|
||||
|
||||
|
||||
#define __tag __used __attribute__((__section__(".taglist.init")))
|
||||
#define __tag __used __section(".taglist.init")
|
||||
#define __tagtable(tag, fn) \
|
||||
static const struct tagtable __tagtable_##fn __tag = { tag, fn }
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ struct of_cpu_method {
|
||||
|
||||
#define CPU_METHOD_OF_DECLARE(name, _method, _ops) \
|
||||
static const struct of_cpu_method __cpu_method_of_table_##name \
|
||||
__used __section(__cpu_method_of_table) \
|
||||
__used __section("__cpu_method_of_table") \
|
||||
= { .method = _method, .ops = _ops }
|
||||
/*
|
||||
* set platform specific SMP operations
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
#include <linux/compiler.h>
|
||||
|
||||
/* Tag variables with this */
|
||||
#define __tcmdata __section(.tcm.data)
|
||||
#define __tcmdata __section(".tcm.data")
|
||||
/* Tag constants with this */
|
||||
#define __tcmconst __section(.tcm.rodata)
|
||||
#define __tcmconst __section(".tcm.rodata")
|
||||
/* Tag functions inside TCM called from outside TCM with this */
|
||||
#define __tcmfunc __attribute__((long_call)) __section(.tcm.text) noinline
|
||||
#define __tcmfunc __attribute__((long_call)) __section(".tcm.text") noinline
|
||||
/* Tag function inside TCM called from inside TCM with this */
|
||||
#define __tcmlocalfunc __section(.tcm.text)
|
||||
#define __tcmlocalfunc __section(".tcm.text")
|
||||
|
||||
void *tcm_alloc(size_t len);
|
||||
void tcm_free(void *addr, size_t len);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
extern struct of_cpuidle_method __cpuidle_method_of_table[];
|
||||
|
||||
static const struct of_cpuidle_method __cpuidle_method_of_table_sentinel
|
||||
__used __section(__cpuidle_method_of_table_end);
|
||||
__used __section("__cpuidle_method_of_table_end");
|
||||
|
||||
static struct cpuidle_ops cpuidle_ops[NR_CPUS] __ro_after_init;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
extern struct of_cpu_method __cpu_method_of_table[];
|
||||
|
||||
static const struct of_cpu_method __cpu_method_of_table_sentinel
|
||||
__used __section(__cpu_method_of_table_end);
|
||||
__used __section("__cpu_method_of_table_end");
|
||||
|
||||
|
||||
static int __init set_smp_ops_by_method(struct device_node *node)
|
||||
|
||||
@@ -79,7 +79,7 @@ static inline u32 cache_type_cwg(void)
|
||||
return (read_cpuid_cachetype() >> CTR_CWG_SHIFT) & CTR_CWG_MASK;
|
||||
}
|
||||
|
||||
#define __read_mostly __section(.data..read_mostly)
|
||||
#define __read_mostly __section(".data..read_mostly")
|
||||
|
||||
static inline int cache_line_size_of_cpu(void)
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ static __init pteval_t create_mapping_protection(efi_memory_desc_t *md)
|
||||
}
|
||||
|
||||
/* we will fill this structure from the stub, so don't put it in .bss */
|
||||
struct screen_info screen_info __section(.data);
|
||||
struct screen_info screen_info __section(".data");
|
||||
|
||||
int __init efi_create_mapping(struct mm_struct *mm, efi_memory_desc_t *md)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <asm/smp_plat.h>
|
||||
|
||||
extern void secondary_holding_pen(void);
|
||||
volatile unsigned long __section(.mmuoff.data.read)
|
||||
volatile unsigned long __section(".mmuoff.data.read")
|
||||
secondary_holding_pen_release = INVALID_HWID;
|
||||
|
||||
static phys_addr_t cpu_release_addr[NR_CPUS];
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
u64 idmap_t0sz = TCR_T0SZ(VA_BITS);
|
||||
u64 idmap_ptrs_per_pgd = PTRS_PER_PGD;
|
||||
|
||||
u64 __section(.mmuoff.data.write) vabits_actual;
|
||||
u64 __section(".mmuoff.data.write") vabits_actual;
|
||||
EXPORT_SYMBOL(vabits_actual);
|
||||
|
||||
u64 kimage_voffset __ro_after_init;
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
#include <linux/compiler.h>
|
||||
|
||||
/* Tag variables with this */
|
||||
#define __tcmdata __section(.tcm.data)
|
||||
#define __tcmdata __section(".tcm.data")
|
||||
/* Tag constants with this */
|
||||
#define __tcmconst __section(.tcm.rodata)
|
||||
#define __tcmconst __section(".tcm.rodata")
|
||||
/* Tag functions inside TCM called from outside TCM with this */
|
||||
#define __tcmfunc __section(.tcm.text) noinline
|
||||
#define __tcmfunc __section(".tcm.text") noinline
|
||||
/* Tag function inside TCM called from inside TCM with this */
|
||||
#define __tcmlocalfunc __section(.tcm.text)
|
||||
#define __tcmlocalfunc __section(".tcm.text")
|
||||
|
||||
void *tcm_alloc(size_t len);
|
||||
void tcm_free(void *addr, size_t len);
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
# define SMP_CACHE_BYTES (1 << 3)
|
||||
#endif
|
||||
|
||||
#define __read_mostly __attribute__((__section__(".data..read_mostly")))
|
||||
#define __read_mostly __section(".data..read_mostly")
|
||||
|
||||
#endif /* _ASM_IA64_CACHE_H */
|
||||
|
||||
@@ -46,7 +46,7 @@ DEFINE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */
|
||||
* ASM code. Default position is BSS section which is cleared
|
||||
* in machine_early_init().
|
||||
*/
|
||||
char cmd_line[COMMAND_LINE_SIZE] __attribute__ ((section(".data")));
|
||||
char cmd_line[COMMAND_LINE_SIZE] __section(".data");
|
||||
|
||||
void __init setup_arch(char **cmdline_p)
|
||||
{
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
#define L1_CACHE_SHIFT CONFIG_MIPS_L1_CACHE_SHIFT
|
||||
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
|
||||
|
||||
#define __read_mostly __attribute__((__section__(".data..read_mostly")))
|
||||
#define __read_mostly __section(".data..read_mostly")
|
||||
|
||||
#endif /* _ASM_CACHE_H */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user