-
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 'tj-percpu' of git://git.kernel.org/pub/scm/linux/kernel…
…/git/tj/misc into core/percpu
- Loading branch information
Showing
30 changed files
with
203 additions
and
268 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,21 @@ | ||
#ifndef _ASM_X86_CURRENT_H | ||
#define _ASM_X86_CURRENT_H | ||
|
||
#ifdef CONFIG_X86_32 | ||
#include <linux/compiler.h> | ||
#include <asm/percpu.h> | ||
|
||
#ifndef __ASSEMBLY__ | ||
struct task_struct; | ||
|
||
DECLARE_PER_CPU(struct task_struct *, current_task); | ||
static __always_inline struct task_struct *get_current(void) | ||
{ | ||
return percpu_read(current_task); | ||
} | ||
|
||
#else /* X86_32 */ | ||
|
||
#ifndef __ASSEMBLY__ | ||
#include <asm/pda.h> | ||
|
||
struct task_struct; | ||
|
||
static __always_inline struct task_struct *get_current(void) | ||
{ | ||
return read_pda(pcurrent); | ||
return percpu_read(current_task); | ||
} | ||
|
||
#else /* __ASSEMBLY__ */ | ||
|
||
#include <asm/asm-offsets.h> | ||
#define GET_CURRENT(reg) movq %gs:(pda_pcurrent),reg | ||
#define current get_current() | ||
|
||
#endif /* __ASSEMBLY__ */ | ||
|
||
#endif /* X86_32 */ | ||
|
||
#define current get_current() | ||
|
||
#endif /* _ASM_X86_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
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.