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 git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Pull sparc updates from David Miller: 1) Add missing cmpxchg64() for 32-bit sparc. 2) Timer conversions from Allen Pais and Kees Cook. 3) vDSO support, from Nagarathnam Muthusamy. 4) Fix sparc64 huge page table walks based upon bug report by Al Viro, from Nitin Gupta. 5) Optimized fls() for T4 and above, from Vijay Kumar. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Fix page table walk for PUD hugepages sparc64: Convert timers to user timer_setup() sparc64: convert mdesc_handle.refcnt from atomic_t to refcount_t sparc/led: Convert timers to use timer_setup() sparc64: Use sparc optimized fls and __fls for T4 and above sparc64: SPARC optimized __fls function sparc64: SPARC optimized fls function sparc64: Define SPARC default __fls function sparc64: Define SPARC default fls function vDSO for sparc sparc32: Add cmpxchg64(). sbus: char: Move D7S_MINOR to include/linux/miscdevice.h sparc: time: Remove unneeded linux/miscdevice.h include sparc64: mmu_context: Add missing include files
- Loading branch information
Showing
41 changed files
with
1,702 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ obj-y += mm/ | |
obj-y += math-emu/ | ||
obj-y += net/ | ||
obj-y += crypto/ | ||
obj-$(CONFIG_SPARC64) += vdso/ |
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,17 @@ | ||
/* | ||
* Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved. | ||
*/ | ||
|
||
#ifndef _ASM_SPARC_CLOCKSOURCE_H | ||
#define _ASM_SPARC_CLOCKSOURCE_H | ||
|
||
/* VDSO clocksources */ | ||
#define VCLOCK_NONE 0 /* Nothing userspace can do. */ | ||
#define VCLOCK_TICK 1 /* Use %tick. */ | ||
#define VCLOCK_STICK 2 /* Use %stick. */ | ||
|
||
struct arch_clocksource_data { | ||
int vclock_mode; | ||
}; | ||
|
||
#endif /* _ASM_SPARC_CLOCKSOURCE_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved. | ||
*/ | ||
|
||
#ifndef _ASM_SPARC_VDSO_H | ||
#define _ASM_SPARC_VDSO_H | ||
|
||
struct vdso_image { | ||
void *data; | ||
unsigned long size; /* Always a multiple of PAGE_SIZE */ | ||
long sym_vvar_start; /* Negative offset to the vvar area */ | ||
long sym_vread_tick; /* Start of vread_tick section */ | ||
long sym_vread_tick_patch_start; /* Start of tick read */ | ||
long sym_vread_tick_patch_end; /* End of tick read */ | ||
}; | ||
|
||
#ifdef CONFIG_SPARC64 | ||
extern const struct vdso_image vdso_image_64_builtin; | ||
#endif | ||
#ifdef CONFIG_COMPAT | ||
extern const struct vdso_image vdso_image_32_builtin; | ||
#endif | ||
|
||
#endif /* _ASM_SPARC_VDSO_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved. | ||
*/ | ||
|
||
#ifndef _ASM_SPARC_VVAR_DATA_H | ||
#define _ASM_SPARC_VVAR_DATA_H | ||
|
||
#include <asm/clocksource.h> | ||
#include <linux/seqlock.h> | ||
#include <linux/time.h> | ||
#include <linux/types.h> | ||
|
||
struct vvar_data { | ||
unsigned int seq; | ||
|
||
int vclock_mode; | ||
struct { /* extract of a clocksource struct */ | ||
u64 cycle_last; | ||
u64 mask; | ||
int mult; | ||
int shift; | ||
} clock; | ||
/* open coded 'struct timespec' */ | ||
u64 wall_time_sec; | ||
u64 wall_time_snsec; | ||
u64 monotonic_time_snsec; | ||
u64 monotonic_time_sec; | ||
u64 monotonic_time_coarse_sec; | ||
u64 monotonic_time_coarse_nsec; | ||
u64 wall_time_coarse_sec; | ||
u64 wall_time_coarse_nsec; | ||
|
||
int tz_minuteswest; | ||
int tz_dsttime; | ||
}; | ||
|
||
extern struct vvar_data *vvar_data; | ||
extern int vdso_fix_stick; | ||
|
||
static inline unsigned int vvar_read_begin(const struct vvar_data *s) | ||
{ | ||
unsigned int ret; | ||
|
||
repeat: | ||
ret = READ_ONCE(s->seq); | ||
if (unlikely(ret & 1)) { | ||
cpu_relax(); | ||
goto repeat; | ||
} | ||
smp_rmb(); /* Finish all reads before we return seq */ | ||
return ret; | ||
} | ||
|
||
static inline int vvar_read_retry(const struct vvar_data *s, | ||
unsigned int start) | ||
{ | ||
smp_rmb(); /* Finish all reads before checking the value of seq */ | ||
return unlikely(s->seq != start); | ||
} | ||
|
||
static inline void vvar_write_begin(struct vvar_data *s) | ||
{ | ||
++s->seq; | ||
smp_wmb(); /* Makes sure that increment of seq is reflected */ | ||
} | ||
|
||
static inline void vvar_write_end(struct vvar_data *s) | ||
{ | ||
smp_wmb(); /* Makes the value of seq current before we increment */ | ||
++s->seq; | ||
} | ||
|
||
|
||
#endif /* _ASM_SPARC_VVAR_DATA_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#ifndef __ASMSPARC_AUXVEC_H | ||
#define __ASMSPARC_AUXVEC_H | ||
|
||
#define AT_SYSINFO_EHDR 33 | ||
|
||
#define AT_VECTOR_SIZE_ARCH 1 | ||
|
||
#endif /* !(__ASMSPARC_AUXVEC_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.