-
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.
- Loading branch information
Linus Torvalds
committed
Nov 2, 2005
1 parent
c6949b0
commit 7128d86
Showing
237 changed files
with
26,078 additions
and
21,232 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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 496456c24f1f4280d50b81aa5bf439ab440b3d7e | ||
refs/heads/master: ec1890c5df451799dec969a3581ff72e1934b5ee |
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,52 @@ | ||
/* | ||
* linux/arch/arm/lib/clear_user.S | ||
* | ||
* Copyright (C) 1995, 1996,1997,1998 Russell King | ||
* | ||
* 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. | ||
*/ | ||
#include <linux/linkage.h> | ||
#include <asm/assembler.h> | ||
|
||
.text | ||
|
||
/* Prototype: int __arch_clear_user(void *addr, size_t sz) | ||
* Purpose : clear some user memory | ||
* Params : addr - user memory address to clear | ||
* : sz - number of bytes to clear | ||
* Returns : number of bytes NOT cleared | ||
*/ | ||
ENTRY(__arch_clear_user) | ||
stmfd sp!, {r1, lr} | ||
mov r2, #0 | ||
cmp r1, #4 | ||
blt 2f | ||
ands ip, r0, #3 | ||
beq 1f | ||
cmp ip, #2 | ||
USER( strbt r2, [r0], #1) | ||
USER( strlebt r2, [r0], #1) | ||
USER( strltbt r2, [r0], #1) | ||
rsb ip, ip, #4 | ||
sub r1, r1, ip @ 7 6 5 4 3 2 1 | ||
1: subs r1, r1, #8 @ -1 -2 -3 -4 -5 -6 -7 | ||
USER( strplt r2, [r0], #4) | ||
USER( strplt r2, [r0], #4) | ||
bpl 1b | ||
adds r1, r1, #4 @ 3 2 1 0 -1 -2 -3 | ||
USER( strplt r2, [r0], #4) | ||
2: tst r1, #2 @ 1x 1x 0x 0x 1x 1x 0x | ||
USER( strnebt r2, [r0], #1) | ||
USER( strnebt r2, [r0], #1) | ||
tst r1, #1 @ x1 x0 x1 x0 x1 x0 x1 | ||
USER( strnebt r2, [r0], #1) | ||
mov r0, #0 | ||
LOADREGS(fd,sp!, {r1, pc}) | ||
|
||
.section .fixup,"ax" | ||
.align 0 | ||
9001: LOADREGS(fd,sp!, {r0, pc}) | ||
.previous | ||
|
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,101 @@ | ||
/* | ||
* linux/arch/arm/lib/copy_from_user.S | ||
* | ||
* Author: Nicolas Pitre | ||
* Created: Sep 29, 2005 | ||
* Copyright: MontaVista Software, Inc. | ||
* | ||
* 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. | ||
*/ | ||
|
||
#include <linux/linkage.h> | ||
#include <asm/assembler.h> | ||
|
||
/* | ||
* Prototype: | ||
* | ||
* size_t __arch_copy_from_user(void *to, const void *from, size_t n) | ||
* | ||
* Purpose: | ||
* | ||
* copy a block to kernel memory from user memory | ||
* | ||
* Params: | ||
* | ||
* to = kernel memory | ||
* from = user memory | ||
* n = number of bytes to copy | ||
* | ||
* Return value: | ||
* | ||
* Number of bytes NOT copied. | ||
*/ | ||
|
||
.macro ldr1w ptr reg abort | ||
100: ldrt \reg, [\ptr], #4 | ||
.section __ex_table, "a" | ||
.long 100b, \abort | ||
.previous | ||
.endm | ||
|
||
.macro ldr4w ptr reg1 reg2 reg3 reg4 abort | ||
ldr1w \ptr, \reg1, \abort | ||
ldr1w \ptr, \reg2, \abort | ||
ldr1w \ptr, \reg3, \abort | ||
ldr1w \ptr, \reg4, \abort | ||
.endm | ||
|
||
.macro ldr8w ptr reg1 reg2 reg3 reg4 reg5 reg6 reg7 reg8 abort | ||
ldr4w \ptr, \reg1, \reg2, \reg3, \reg4, \abort | ||
ldr4w \ptr, \reg5, \reg6, \reg7, \reg8, \abort | ||
.endm | ||
|
||
.macro ldr1b ptr reg cond=al abort | ||
100: ldr\cond\()bt \reg, [\ptr], #1 | ||
.section __ex_table, "a" | ||
.long 100b, \abort | ||
.previous | ||
.endm | ||
|
||
.macro str1w ptr reg abort | ||
str \reg, [\ptr], #4 | ||
.endm | ||
|
||
.macro str8w ptr reg1 reg2 reg3 reg4 reg5 reg6 reg7 reg8 abort | ||
stmia \ptr!, {\reg1, \reg2, \reg3, \reg4, \reg5, \reg6, \reg7, \reg8} | ||
.endm | ||
|
||
.macro str1b ptr reg cond=al abort | ||
str\cond\()b \reg, [\ptr], #1 | ||
.endm | ||
|
||
.macro enter reg1 reg2 | ||
mov r3, #0 | ||
stmdb sp!, {r0, r2, r3, \reg1, \reg2} | ||
.endm | ||
|
||
.macro exit reg1 reg2 | ||
add sp, sp, #8 | ||
ldmfd sp!, {r0, \reg1, \reg2} | ||
.endm | ||
|
||
.text | ||
|
||
ENTRY(__arch_copy_from_user) | ||
|
||
#include "copy_template.S" | ||
|
||
.section .fixup,"ax" | ||
.align 0 | ||
copy_abort_preamble | ||
ldmfd sp!, {r1, r2} | ||
sub r3, r0, r1 | ||
rsb r1, r3, r2 | ||
str r1, [sp] | ||
bl __memzero | ||
ldr r0, [sp], #4 | ||
copy_abort_end | ||
.previous | ||
|
Oops, something went wrong.