forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM updates from Russell King: - Rejig task/thread info to place thread info in task struct - Amba bus cleanups (removing unused functions) - Handle Amba device probe without IRQ domains - Parse linux,usable-memory-range in decompressor - Mark OCRAM as read-only after initialisation - Refactor page fault handling - Fix PXN handling with LPAE kernels - Warning and build fixes from Arnd * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: (32 commits) ARM: 9151/1: Thumb2: avoid __builtin_thread_pointer() on Clang ARM: 9150/1: Fix PID_IN_CONTEXTIDR regression when THREAD_INFO_IN_TASK=y ARM: 9147/1: add printf format attribute to early_print() ARM: 9146/1: RiscPC needs older gcc version ARM: 9145/1: patch: fix BE32 compilation ARM: 9144/1: forbid ftrace with clang and thumb2_kernel ARM: 9143/1: add CONFIG_PHYS_OFFSET default values ARM: 9142/1: kasan: work around LPAE build warning ARM: 9140/1: allow compile-testing without machine record ARM: 9137/1: disallow CONFIG_THUMB with ARMv4 ARM: 9136/1: ARMv7-M uses BE-8, not BE-32 ARM: 9135/1: kprobes: address gcc -Wempty-body warning ARM: 9101/1: sa1100/assabet: convert LEDs to gpiod APIs ARM: 9131/1: mm: Fix PXN process with LPAE feature ARM: 9130/1: mm: Provide die_kernel_fault() helper ARM: 9126/1: mm: Kill page table base print in show_pte() ARM: 9127/1: mm: Cleanup access_error() ARM: 9129/1: mm: Kill task_struct argument for __do_page_fault() ARM: 9128/1: mm: Refactor the __do_page_fault() ARM: imx6: mark OCRAM mapping read-only ...
- Loading branch information
Showing
39 changed files
with
372 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-only */ | ||
/* | ||
* Copyright (c) 2021 Keith Packard <[email protected]> | ||
* Copyright (c) 2021 Google, LLC <[email protected]> | ||
*/ | ||
|
||
#ifndef _ASM_ARM_CURRENT_H | ||
#define _ASM_ARM_CURRENT_H | ||
|
||
#ifndef __ASSEMBLY__ | ||
|
||
struct task_struct; | ||
|
||
static inline void set_current(struct task_struct *cur) | ||
{ | ||
if (!IS_ENABLED(CONFIG_CURRENT_POINTER_IN_TPIDRURO)) | ||
return; | ||
|
||
/* Set TPIDRURO */ | ||
asm("mcr p15, 0, %0, c13, c0, 3" :: "r"(cur) : "memory"); | ||
} | ||
|
||
#ifdef CONFIG_CURRENT_POINTER_IN_TPIDRURO | ||
|
||
static inline struct task_struct *get_current(void) | ||
{ | ||
struct task_struct *cur; | ||
|
||
#if __has_builtin(__builtin_thread_pointer) && \ | ||
!(defined(CONFIG_THUMB2_KERNEL) && \ | ||
defined(CONFIG_CC_IS_CLANG) && CONFIG_CLANG_VERSION < 130001) | ||
/* | ||
* Use the __builtin helper when available - this results in better | ||
* code, especially when using GCC in combination with the per-task | ||
* stack protector, as the compiler will recognize that it needs to | ||
* load the TLS register only once in every function. | ||
* | ||
* Clang < 13.0.1 gets this wrong for Thumb2 builds: | ||
* https://github.com/ClangBuiltLinux/linux/issues/1485 | ||
*/ | ||
cur = __builtin_thread_pointer(); | ||
#else | ||
asm("mrc p15, 0, %0, c13, c0, 3" : "=r"(cur)); | ||
#endif | ||
return cur; | ||
} | ||
|
||
#define current get_current() | ||
#else | ||
#include <asm-generic/current.h> | ||
#endif /* CONFIG_CURRENT_POINTER_IN_TPIDRURO */ | ||
|
||
#endif /* __ASSEMBLY__ */ | ||
|
||
#endif /* _ASM_ARM_CURRENT_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.