forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'arm64/vmap-stack' of git://git.kernel.org/pub/scm/linux…
…/kernel/git/mark/linux into for-next/core * 'arm64/vmap-stack' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux: arm64: add VMAP_STACK overflow detection arm64: add on_accessible_stack() arm64: add basic VMAP_STACK support arm64: use an irq stack pointer arm64: assembler: allow adr_this_cpu to use the stack pointer arm64: factor out entry stack manipulation efi/arm64: add EFI_KIMG_ALIGN arm64: move SEGMENT_ALIGN to <asm/memory.h> arm64: clean up irq stack definitions arm64: clean up THREAD_* definitions arm64: factor out PAGE_* and CONT_* definitions arm64: kernel: remove {THREAD,IRQ_STACK}_START_SP fork: allow arch-override of VMAP stack alignment arm64: remove __die()'s stack dump
- Loading branch information
Showing
20 changed files
with
355 additions
and
104 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,18 @@ | ||
#ifndef __ASM_IRQ_H | ||
#define __ASM_IRQ_H | ||
|
||
#define IRQ_STACK_SIZE THREAD_SIZE | ||
#define IRQ_STACK_START_SP THREAD_START_SP | ||
|
||
#ifndef __ASSEMBLER__ | ||
|
||
#include <linux/percpu.h> | ||
#include <linux/sched/task_stack.h> | ||
|
||
#include <asm-generic/irq.h> | ||
#include <asm/thread_info.h> | ||
|
||
struct pt_regs; | ||
|
||
DECLARE_PER_CPU(unsigned long [IRQ_STACK_SIZE/sizeof(long)], irq_stack); | ||
|
||
extern void set_handle_irq(void (*handle_irq)(struct pt_regs *)); | ||
|
||
static inline int nr_legacy_irqs(void) | ||
{ | ||
return 0; | ||
} | ||
|
||
static inline bool on_irq_stack(unsigned long sp) | ||
{ | ||
unsigned long low = (unsigned long)raw_cpu_ptr(irq_stack); | ||
unsigned long high = low + IRQ_STACK_START_SP; | ||
|
||
return (low <= sp && sp <= high); | ||
} | ||
|
||
static inline bool on_task_stack(struct task_struct *tsk, unsigned long sp) | ||
{ | ||
unsigned long low = (unsigned long)task_stack_page(tsk); | ||
unsigned long high = low + THREAD_SIZE; | ||
|
||
return (low <= sp && sp < high); | ||
} | ||
|
||
#endif /* !__ASSEMBLER__ */ | ||
#endif |
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,34 @@ | ||
/* | ||
* Based on arch/arm/include/asm/page.h | ||
* | ||
* Copyright (C) 1995-2003 Russell King | ||
* Copyright (C) 2017 ARM Ltd. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#ifndef __ASM_PAGE_DEF_H | ||
#define __ASM_PAGE_DEF_H | ||
|
||
#include <linux/const.h> | ||
|
||
/* PAGE_SHIFT determines the page size */ | ||
/* CONT_SHIFT determines the number of pages which can be tracked together */ | ||
#define PAGE_SHIFT CONFIG_ARM64_PAGE_SHIFT | ||
#define CONT_SHIFT CONFIG_ARM64_CONT_SHIFT | ||
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) | ||
#define PAGE_MASK (~(PAGE_SIZE-1)) | ||
|
||
#define CONT_SIZE (_AC(1, UL) << (CONT_SHIFT + PAGE_SHIFT)) | ||
#define CONT_MASK (~(CONT_SIZE-1)) | ||
|
||
#endif /* __ASM_PAGE_DEF_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
Oops, something went wrong.