processor.h (c01f5120ca7cf2994336c42b8a9cae697121ffb3) | processor.h (67f3977f805b34cf0e41090679800d2091d41d49) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * Based on arch/arm/include/asm/processor.h 4 * 5 * Copyright (C) 1995-1999 Russell King 6 * Copyright (C) 2012 ARM Ltd. 7 */ 8#ifndef __ASM_PROCESSOR_H --- 6 unchanged lines hidden (view full) --- 15 * On arm64 systems, unaligned accesses by the CPU are cheap, and so there is 16 * no point in shifting all network buffers by 2 bytes just to make some IP 17 * header fields appear aligned in memory, potentially sacrificing some DMA 18 * performance on some platforms. 19 */ 20#define NET_IP_ALIGN 0 21 22#ifndef __ASSEMBLY__ | 1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * Based on arch/arm/include/asm/processor.h 4 * 5 * Copyright (C) 1995-1999 Russell King 6 * Copyright (C) 2012 ARM Ltd. 7 */ 8#ifndef __ASM_PROCESSOR_H --- 6 unchanged lines hidden (view full) --- 15 * On arm64 systems, unaligned accesses by the CPU are cheap, and so there is 16 * no point in shifting all network buffers by 2 bytes just to make some IP 17 * header fields appear aligned in memory, potentially sacrificing some DMA 18 * performance on some platforms. 19 */ 20#define NET_IP_ALIGN 0 21 22#ifndef __ASSEMBLY__ |
23#ifdef __KERNEL__ | |
24 25#include <linux/build_bug.h> 26#include <linux/cache.h> 27#include <linux/init.h> 28#include <linux/stddef.h> 29#include <linux/string.h> 30 31#include <asm/alternative.h> --- 5 unchanged lines hidden (view full) --- 37#include <asm/ptrace.h> 38#include <asm/types.h> 39 40/* 41 * TASK_SIZE - the maximum size of a user space task. 42 * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area. 43 */ 44 | 23 24#include <linux/build_bug.h> 25#include <linux/cache.h> 26#include <linux/init.h> 27#include <linux/stddef.h> 28#include <linux/string.h> 29 30#include <asm/alternative.h> --- 5 unchanged lines hidden (view full) --- 36#include <asm/ptrace.h> 37#include <asm/types.h> 38 39/* 40 * TASK_SIZE - the maximum size of a user space task. 41 * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area. 42 */ 43 |
45#define DEFAULT_MAP_WINDOW_64 (UL(1) << VA_BITS) 46#define TASK_SIZE_64 (UL(1) << vabits_user) | 44#define DEFAULT_MAP_WINDOW_64 (UL(1) << VA_BITS_MIN) 45#define TASK_SIZE_64 (UL(1) << vabits_actual) |
47 48#ifdef CONFIG_COMPAT 49#if defined(CONFIG_ARM64_64K_PAGES) && defined(CONFIG_KUSER_HELPERS) 50/* 51 * With CONFIG_ARM64_64K_PAGES enabled, the last page is occupied 52 * by the compat vectors page. 53 */ 54#define TASK_SIZE_32 UL(0x100000000) --- 221 unchanged lines hidden (view full) --- 276#define ARCH_HAS_SPINLOCK_PREFETCH 277static inline void spin_lock_prefetch(const void *ptr) 278{ 279 asm volatile(ARM64_LSE_ATOMIC_INSN( 280 "prfm pstl1strm, %a0", 281 "nop") : : "p" (ptr)); 282} 283 | 46 47#ifdef CONFIG_COMPAT 48#if defined(CONFIG_ARM64_64K_PAGES) && defined(CONFIG_KUSER_HELPERS) 49/* 50 * With CONFIG_ARM64_64K_PAGES enabled, the last page is occupied 51 * by the compat vectors page. 52 */ 53#define TASK_SIZE_32 UL(0x100000000) --- 221 unchanged lines hidden (view full) --- 275#define ARCH_HAS_SPINLOCK_PREFETCH 276static inline void spin_lock_prefetch(const void *ptr) 277{ 278 asm volatile(ARM64_LSE_ATOMIC_INSN( 279 "prfm pstl1strm, %a0", 280 "nop") : : "p" (ptr)); 281} 282 |
284#define HAVE_ARCH_PICK_MMAP_LAYOUT 285 286#endif 287 | |
288extern unsigned long __ro_after_init signal_minsigstksz; /* sigframe size */ 289extern void __init minsigstksz_setup(void); 290 291/* 292 * Not at the top of the file due to a direct #include cycle between 293 * <asm/fpsimd.h> and <asm/processor.h>. Deferring this #include 294 * ensures that contents of processor.h are visible to fpsimd.h even if 295 * processor.h is included first. --- 5 unchanged lines hidden (view full) --- 301 302/* Userspace interface for PR_SVE_{SET,GET}_VL prctl()s: */ 303#define SVE_SET_VL(arg) sve_set_current_vl(arg) 304#define SVE_GET_VL() sve_get_current_vl() 305 306/* PR_PAC_RESET_KEYS prctl */ 307#define PAC_RESET_KEYS(tsk, arg) ptrauth_prctl_reset_keys(tsk, arg) 308 | 283extern unsigned long __ro_after_init signal_minsigstksz; /* sigframe size */ 284extern void __init minsigstksz_setup(void); 285 286/* 287 * Not at the top of the file due to a direct #include cycle between 288 * <asm/fpsimd.h> and <asm/processor.h>. Deferring this #include 289 * ensures that contents of processor.h are visible to fpsimd.h even if 290 * processor.h is included first. --- 5 unchanged lines hidden (view full) --- 296 297/* Userspace interface for PR_SVE_{SET,GET}_VL prctl()s: */ 298#define SVE_SET_VL(arg) sve_set_current_vl(arg) 299#define SVE_GET_VL() sve_get_current_vl() 300 301/* PR_PAC_RESET_KEYS prctl */ 302#define PAC_RESET_KEYS(tsk, arg) ptrauth_prctl_reset_keys(tsk, arg) 303 |
304#ifdef CONFIG_ARM64_TAGGED_ADDR_ABI 305/* PR_{SET,GET}_TAGGED_ADDR_CTRL prctl */ 306long set_tagged_addr_ctrl(unsigned long arg); 307long get_tagged_addr_ctrl(void); 308#define SET_TAGGED_ADDR_CTRL(arg) set_tagged_addr_ctrl(arg) 309#define GET_TAGGED_ADDR_CTRL() get_tagged_addr_ctrl() 310#endif 311 |
|
309/* 310 * For CONFIG_GCC_PLUGIN_STACKLEAK 311 * 312 * These need to be macros because otherwise we get stuck in a nightmare 313 * of header definitions for the use of task_stack_page. 314 */ 315 316#define current_top_of_stack() \ 317({ \ 318 struct stack_info _info; \ 319 BUG_ON(!on_accessible_stack(current, current_stack_pointer, &_info)); \ 320 _info.high; \ 321}) 322#define on_thread_stack() (on_task_stack(current, current_stack_pointer, NULL)) 323 324#endif /* __ASSEMBLY__ */ 325#endif /* __ASM_PROCESSOR_H */ | 312/* 313 * For CONFIG_GCC_PLUGIN_STACKLEAK 314 * 315 * These need to be macros because otherwise we get stuck in a nightmare 316 * of header definitions for the use of task_stack_page. 317 */ 318 319#define current_top_of_stack() \ 320({ \ 321 struct stack_info _info; \ 322 BUG_ON(!on_accessible_stack(current, current_stack_pointer, &_info)); \ 323 _info.high; \ 324}) 325#define on_thread_stack() (on_task_stack(current, current_stack_pointer, NULL)) 326 327#endif /* __ASSEMBLY__ */ 328#endif /* __ASM_PROCESSOR_H */ |