Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xcap-capability-linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xcap
xcap-capability-linux
Commits
9723d95d
Commit
9723d95d
authored
19 years ago
by
Linus Torvalds
Browse files
Options
Downloads
Plain Diff
Merge
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
parents
4a4f8fdb
7049e680
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arch/sparc64/solaris/socket.c
+4
-2
4 additions, 2 deletions
arch/sparc64/solaris/socket.c
include/asm-sparc64/processor.h
+34
-0
34 additions, 0 deletions
include/asm-sparc64/processor.h
with
38 additions
and
2 deletions
arch/sparc64/solaris/socket.c
+
4
−
2
View file @
9723d95d
...
...
@@ -317,8 +317,10 @@ asmlinkage int solaris_sendmsg(int fd, struct sol_nmsghdr __user *user_msg, unsi
unsigned
long
*
kcmsg
;
compat_size_t
cmlen
;
if
(
kern_msg
.
msg_controllen
>
sizeof
(
ctl
)
&&
kern_msg
.
msg_controllen
<=
256
)
{
if
(
kern_msg
.
msg_controllen
<=
sizeof
(
compat_size_t
))
return
-
EINVAL
;
if
(
kern_msg
.
msg_controllen
>
sizeof
(
ctl
))
{
err
=
-
ENOBUFS
;
ctl_buf
=
kmalloc
(
kern_msg
.
msg_controllen
,
GFP_KERNEL
);
if
(
!
ctl_buf
)
...
...
This diff is collapsed.
Click to expand it.
include/asm-sparc64/processor.h
+
34
−
0
View file @
9723d95d
...
...
@@ -192,6 +192,40 @@ extern unsigned long get_wchan(struct task_struct *task);
#define cpu_relax() barrier()
/* Prefetch support. This is tuned for UltraSPARC-III and later.
* UltraSPARC-I will treat these as nops, and UltraSPARC-II has
* a shallower prefetch queue than later chips.
*/
#define ARCH_HAS_PREFETCH
#define ARCH_HAS_PREFETCHW
#define ARCH_HAS_SPINLOCK_PREFETCH
static
inline
void
prefetch
(
const
void
*
x
)
{
/* We do not use the read prefetch mnemonic because that
* prefetches into the prefetch-cache which only is accessible
* by floating point operations in UltraSPARC-III and later.
* By contrast, "#one_write" prefetches into the L2 cache
* in shared state.
*/
__asm__
__volatile__
(
"prefetch [%0], #one_write"
:
/* no outputs */
:
"r"
(
x
));
}
static
inline
void
prefetchw
(
const
void
*
x
)
{
/* The most optimal prefetch to use for writes is
* "#n_writes". This brings the cacheline into the
* L2 cache in "owned" state.
*/
__asm__
__volatile__
(
"prefetch [%0], #n_writes"
:
/* no outputs */
:
"r"
(
x
));
}
#define spin_lock_prefetch(x) prefetchw(x)
#endif
/* !(__ASSEMBLY__) */
#endif
/* !(__ASM_SPARC64_PROCESSOR_H) */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment