Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
0d69ae5f
Commit
0d69ae5f
authored
Oct 05, 2005
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master'
parents
13d1ef29
9bc39bec
Changes
59
Hide whitespace changes
Inline
Side-by-side
Showing
59 changed files
with
350 additions
and
339 deletions
+350
-339
arch/arm/kernel/sys_arm.c
arch/arm/kernel/sys_arm.c
+1
-1
arch/arm/kernel/traps.c
arch/arm/kernel/traps.c
+1
-1
arch/arm/mach-imx/generic.c
arch/arm/mach-imx/generic.c
+12
-11
arch/arm/mach-imx/mx1ads.c
arch/arm/mach-imx/mx1ads.c
+1
-1
arch/sparc/kernel/time.c
arch/sparc/kernel/time.c
+1
-1
arch/sparc/mm/srmmu.c
arch/sparc/mm/srmmu.c
+1
-1
arch/um/include/registers.h
arch/um/include/registers.h
+1
-11
arch/um/include/sysdep-x86_64/ptrace.h
arch/um/include/sysdep-x86_64/ptrace.h
+0
-4
arch/um/kernel/sysrq.c
arch/um/kernel/sysrq.c
+1
-7
arch/um/os-Linux/sys-i386/registers.c
arch/um/os-Linux/sys-i386/registers.c
+9
-10
arch/um/os-Linux/sys-x86_64/registers.c
arch/um/os-Linux/sys-x86_64/registers.c
+9
-10
arch/um/sys-i386/sysrq.c
arch/um/sys-i386/sysrq.c
+1
-12
arch/um/sys-i386/user-offsets.c
arch/um/sys-i386/user-offsets.c
+1
-1
arch/x86_64/kernel/head.S
arch/x86_64/kernel/head.S
+20
-20
drivers/infiniband/hw/mthca/mthca_main.c
drivers/infiniband/hw/mthca/mthca_main.c
+21
-24
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/ipoib/ipoib_main.c
+2
-2
drivers/net/tokenring/ibmtr.c
drivers/net/tokenring/ibmtr.c
+0
-5
drivers/net/wireless/orinoco.c
drivers/net/wireless/orinoco.c
+9
-5
drivers/scsi/megaraid/megaraid_sas.c
drivers/scsi/megaraid/megaraid_sas.c
+1
-0
drivers/serial/sunsu.c
drivers/serial/sunsu.c
+0
-4
fs/bfs/dir.c
fs/bfs/dir.c
+1
-1
fs/bfs/inode.c
fs/bfs/inode.c
+31
-13
fs/ntfs/ChangeLog
fs/ntfs/ChangeLog
+3
-0
fs/ntfs/bitmap.c
fs/ntfs/bitmap.c
+3
-2
fs/ntfs/layout.h
fs/ntfs/layout.h
+1
-1
fs/ntfs/mft.c
fs/ntfs/mft.c
+2
-1
fs/ntfs/unistr.c
fs/ntfs/unistr.c
+1
-1
include/asm-arm/arch-h720x/system.h
include/asm-arm/arch-h720x/system.h
+5
-3
include/asm-arm/arch-imx/imx-regs.h
include/asm-arm/arch-imx/imx-regs.h
+34
-12
include/asm-arm/arch-ixp4xx/platform.h
include/asm-arm/arch-ixp4xx/platform.h
+1
-1
include/asm-sparc/btfixup.h
include/asm-sparc/btfixup.h
+6
-6
include/asm-sparc/cache.h
include/asm-sparc/cache.h
+9
-9
include/asm-sparc/cypress.h
include/asm-sparc/cypress.h
+4
-4
include/asm-sparc/delay.h
include/asm-sparc/delay.h
+1
-1
include/asm-sparc/dma.h
include/asm-sparc/dma.h
+1
-1
include/asm-sparc/iommu.h
include/asm-sparc/iommu.h
+2
-2
include/asm-sparc/kdebug.h
include/asm-sparc/kdebug.h
+1
-1
include/asm-sparc/mbus.h
include/asm-sparc/mbus.h
+2
-2
include/asm-sparc/msi.h
include/asm-sparc/msi.h
+1
-1
include/asm-sparc/mxcc.h
include/asm-sparc/mxcc.h
+4
-4
include/asm-sparc/obio.h
include/asm-sparc/obio.h
+15
-15
include/asm-sparc/pci.h
include/asm-sparc/pci.h
+3
-3
include/asm-sparc/pgtable.h
include/asm-sparc/pgtable.h
+14
-14
include/asm-sparc/pgtsrmmu.h
include/asm-sparc/pgtsrmmu.h
+15
-15
include/asm-sparc/processor.h
include/asm-sparc/processor.h
+1
-1
include/asm-sparc/psr.h
include/asm-sparc/psr.h
+3
-3
include/asm-sparc/sbi.h
include/asm-sparc/sbi.h
+5
-5
include/asm-sparc/sbus.h
include/asm-sparc/sbus.h
+3
-3
include/asm-sparc/smp.h
include/asm-sparc/smp.h
+13
-13
include/asm-sparc/smpprim.h
include/asm-sparc/smpprim.h
+4
-4
include/asm-sparc/spinlock.h
include/asm-sparc/spinlock.h
+5
-5
include/asm-sparc/system.h
include/asm-sparc/system.h
+1
-1
include/asm-sparc/traps.h
include/asm-sparc/traps.h
+1
-1
include/asm-um/processor-generic.h
include/asm-um/processor-generic.h
+10
-13
include/asm-um/processor-i386.h
include/asm-um/processor-i386.h
+4
-11
include/asm-um/processor-x86_64.h
include/asm-um/processor-x86_64.h
+3
-11
include/linux/bfs_fs.h
include/linux/bfs_fs.h
+21
-21
net/ipv4/fib_trie.c
net/ipv4/fib_trie.c
+21
-2
net/ipv6/udp.c
net/ipv6/udp.c
+3
-1
No files found.
arch/arm/kernel/sys_arm.c
View file @
0d69ae5f
...
...
@@ -305,7 +305,7 @@ long execve(const char *filename, char **argv, char **envp)
"Ir"
(
THREAD_START_SP
-
sizeof
(
regs
)),
"r"
(
&
regs
),
"Ir"
(
sizeof
(
regs
))
:
"r0"
,
"r1"
,
"r2"
,
"r3"
,
"ip"
,
"memory"
);
:
"r0"
,
"r1"
,
"r2"
,
"r3"
,
"ip"
,
"
lr"
,
"
memory"
);
out:
return
ret
;
...
...
arch/arm/kernel/traps.c
View file @
0d69ae5f
...
...
@@ -504,7 +504,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs)
bad_access:
spin_unlock
(
&
mm
->
page_table_lock
);
/* simulate a
read
access fault */
/* simulate a
write
access fault */
do_DataAbort
(
addr
,
15
+
(
1
<<
11
),
regs
);
return
-
1
;
}
...
...
arch/arm/mach-imx/generic.c
View file @
0d69ae5f
...
...
@@ -28,14 +28,15 @@
#include <linux/module.h>
#include <asm/arch/imxfb.h>
#include <asm/hardware.h>
#include <asm/arch/imx-regs.h>
#include <asm/mach/map.h>
void
imx_gpio_mode
(
int
gpio_mode
)
{
unsigned
int
pin
=
gpio_mode
&
GPIO_PIN_MASK
;
unsigned
int
port
=
(
gpio_mode
&
GPIO_PORT_MASK
)
>>
5
;
unsigned
int
ocr
=
(
gpio_mode
&
GPIO_OCR_MASK
)
>>
10
;
unsigned
int
port
=
(
gpio_mode
&
GPIO_PORT_MASK
)
>>
GPIO_PORT_SHIFT
;
unsigned
int
ocr
=
(
gpio_mode
&
GPIO_OCR_MASK
)
>>
GPIO_OCR_SHIFT
;
unsigned
int
tmp
;
/* Pullup enable */
...
...
@@ -57,7 +58,7 @@ void imx_gpio_mode(int gpio_mode)
GPR
(
port
)
&=
~
(
1
<<
pin
);
/* use as gpio? */
if
(
ocr
==
3
)
if
(
gpio_mode
&
GPIO_GIUS
)
GIUS
(
port
)
|=
(
1
<<
pin
);
else
GIUS
(
port
)
&=
~
(
1
<<
pin
);
...
...
@@ -72,20 +73,20 @@ void imx_gpio_mode(int gpio_mode)
tmp
|=
(
ocr
<<
(
pin
*
2
));
OCR1
(
port
)
=
tmp
;
if
(
gpio_mode
&
GPIO_AOUT
)
ICONFA1
(
port
)
&=
~
(
3
<<
(
pin
*
2
)
);
if
(
gpio_mode
&
GPIO_BOUT
)
ICONFB1
(
port
)
&=
~
(
3
<<
(
pin
*
2
)
);
ICONFA1
(
port
)
&=
~
(
3
<<
(
pin
*
2
));
ICONFA1
(
port
)
|=
((
gpio_mode
>>
GPIO_AOUT_SHIFT
)
&
3
)
<<
(
pin
*
2
);
ICONFB1
(
port
)
&=
~
(
3
<<
(
pin
*
2
));
ICONFB1
(
port
)
|=
((
gpio_mode
>>
GPIO_BOUT_SHIFT
)
&
3
)
<<
(
pin
*
2
);
}
else
{
tmp
=
OCR2
(
port
);
tmp
&=
~
(
3
<<
((
pin
-
16
)
*
2
));
tmp
|=
(
ocr
<<
((
pin
-
16
)
*
2
));
OCR2
(
port
)
=
tmp
;
if
(
gpio_mode
&
GPIO_AOUT
)
ICONFA2
(
port
)
&=
~
(
3
<<
((
pin
-
16
)
*
2
)
);
if
(
gpio_mode
&
GPIO_BOUT
)
ICONFB2
(
port
)
&=
~
(
3
<<
((
pin
-
16
)
*
2
)
);
ICONFA2
(
port
)
&=
~
(
3
<<
((
pin
-
16
)
*
2
));
ICONFA2
(
port
)
|=
((
gpio_mode
>>
GPIO_AOUT_SHIFT
)
&
3
)
<<
((
pin
-
16
)
*
2
);
ICONFB2
(
port
)
&=
~
(
3
<<
((
pin
-
16
)
*
2
));
ICONFB2
(
port
)
|=
((
gpio_mode
>>
GPIO_BOUT_SHIFT
)
&
3
)
<<
((
pin
-
16
)
*
2
);
}
}
...
...
arch/arm/mach-imx/mx1ads.c
View file @
0d69ae5f
...
...
@@ -55,7 +55,7 @@ static void __init
mx1ads_init
(
void
)
{
#ifdef CONFIG_LEDS
imx_gpio_mode
(
GPIO_PORTA
|
GPIO_OUT
|
GPIO_GPIO
|
2
);
imx_gpio_mode
(
GPIO_PORTA
|
GPIO_OUT
|
2
);
#endif
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
}
...
...
arch/sparc/kernel/time.c
View file @
0d69ae5f
...
...
@@ -457,7 +457,7 @@ void __init time_init(void)
sbus_time_init
();
}
extern
__inline__
unsigned
long
do_gettimeoffset
(
void
)
static
inline
unsigned
long
do_gettimeoffset
(
void
)
{
return
(
*
master_l10_counter
>>
10
)
&
0x1fffff
;
}
...
...
arch/sparc/mm/srmmu.c
View file @
0d69ae5f
...
...
@@ -260,7 +260,7 @@ static inline pte_t srmmu_pte_modify(pte_t pte, pgprot_t newprot)
{
return
__pte
((
pte_val
(
pte
)
&
SRMMU_CHG_MASK
)
|
pgprot_val
(
newprot
));
}
/* to find an entry in a top-level page table... */
extern
inline
pgd_t
*
srmmu_pgd_offset
(
struct
mm_struct
*
mm
,
unsigned
long
address
)
static
inline
pgd_t
*
srmmu_pgd_offset
(
struct
mm_struct
*
mm
,
unsigned
long
address
)
{
return
mm
->
pgd
+
(
address
>>
SRMMU_PGDIR_SHIFT
);
}
/* Find an entry in the second-level page table.. */
...
...
arch/um/include/registers.h
View file @
0d69ae5f
...
...
@@ -15,16 +15,6 @@ extern void save_registers(int pid, union uml_pt_regs *regs);
extern
void
restore_registers
(
int
pid
,
union
uml_pt_regs
*
regs
);
extern
void
init_registers
(
int
pid
);
extern
void
get_safe_registers
(
unsigned
long
*
regs
);
extern
void
get_thread_regs
(
union
uml_pt_regs
*
uml_regs
,
void
*
buffer
);
#endif
/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* Emacs will notice this stuff at the end of the file and automatically
* adjust the settings for this buffer only. This must remain at the end
* of the file.
* ---------------------------------------------------------------------------
* Local variables:
* c-file-style: "linux"
* End:
*/
arch/um/include/sysdep-x86_64/ptrace.h
View file @
0d69ae5f
...
...
@@ -218,10 +218,6 @@ struct syscall_args {
case RBP: UPT_RBP(regs) = __upt_val; break; \
case ORIG_RAX: UPT_ORIG_RAX(regs) = __upt_val; break; \
case CS: UPT_CS(regs) = __upt_val; break; \
case DS: UPT_DS(regs) = __upt_val; break; \
case ES: UPT_ES(regs) = __upt_val; break; \
case FS: UPT_FS(regs) = __upt_val; break; \
case GS: UPT_GS(regs) = __upt_val; break; \
case EFLAGS: UPT_EFLAGS(regs) = __upt_val; break; \
default : \
panic("Bad register in UPT_SET : %d\n", reg); \
...
...
arch/um/kernel/sysrq.c
View file @
0d69ae5f
...
...
@@ -62,13 +62,7 @@ void show_stack(struct task_struct *task, unsigned long *esp)
if
(
esp
==
NULL
)
{
if
(
task
!=
current
&&
task
!=
NULL
)
{
/* XXX: Isn't this bogus? I.e. isn't this the
* *userspace* stack of this task? If not so, use this
* even when task == current (as in i386).
*/
esp
=
(
unsigned
long
*
)
KSTK_ESP
(
task
);
/* Which one? No actual difference - just coding style.*/
//esp = (unsigned long *) PT_REGS_IP(&task->thread.regs);
}
else
{
esp
=
(
unsigned
long
*
)
&
esp
;
}
...
...
@@ -84,5 +78,5 @@ void show_stack(struct task_struct *task, unsigned long *esp)
}
printk
(
"Call Trace:
\n
"
);
show_trace
(
current
,
esp
);
show_trace
(
task
,
esp
);
}
arch/um/os-Linux/sys-i386/registers.c
View file @
0d69ae5f
...
...
@@ -5,6 +5,7 @@
#include <errno.h>
#include <string.h>
#include <setjmp.h>
#include "sysdep/ptrace_user.h"
#include "sysdep/ptrace.h"
#include "uml-config.h"
...
...
@@ -126,13 +127,11 @@ void get_safe_registers(unsigned long *regs)
memcpy
(
regs
,
exec_regs
,
HOST_FRAME_SIZE
*
sizeof
(
unsigned
long
));
}
/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* Emacs will notice this stuff at the end of the file and automatically
* adjust the settings for this buffer only. This must remain at the end
* of the file.
* ---------------------------------------------------------------------------
* Local variables:
* c-file-style: "linux"
* End:
*/
void
get_thread_regs
(
union
uml_pt_regs
*
uml_regs
,
void
*
buffer
)
{
struct
__jmp_buf_tag
*
jmpbuf
=
buffer
;
UPT_SET
(
uml_regs
,
EIP
,
jmpbuf
->
__jmpbuf
[
JB_PC
]);
UPT_SET
(
uml_regs
,
UESP
,
jmpbuf
->
__jmpbuf
[
JB_SP
]);
UPT_SET
(
uml_regs
,
EBP
,
jmpbuf
->
__jmpbuf
[
JB_BP
]);
}
arch/um/os-Linux/sys-x86_64/registers.c
View file @
0d69ae5f
...
...
@@ -5,6 +5,7 @@
#include <errno.h>
#include <string.h>
#include <setjmp.h>
#include "ptrace_user.h"
#include "uml-config.h"
#include "skas_ptregs.h"
...
...
@@ -74,13 +75,11 @@ void get_safe_registers(unsigned long *regs)
memcpy
(
regs
,
exec_regs
,
HOST_FRAME_SIZE
*
sizeof
(
unsigned
long
));
}
/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* Emacs will notice this stuff at the end of the file and automatically
* adjust the settings for this buffer only. This must remain at the end
* of the file.
* ---------------------------------------------------------------------------
* Local variables:
* c-file-style: "linux"
* End:
*/
void
get_thread_regs
(
union
uml_pt_regs
*
uml_regs
,
void
*
buffer
)
{
struct
__jmp_buf_tag
*
jmpbuf
=
buffer
;
UPT_SET
(
uml_regs
,
RIP
,
jmpbuf
->
__jmpbuf
[
JB_PC
]);
UPT_SET
(
uml_regs
,
RSP
,
jmpbuf
->
__jmpbuf
[
JB_RSP
]);
UPT_SET
(
uml_regs
,
RBP
,
jmpbuf
->
__jmpbuf
[
JB_RBP
]);
}
arch/um/sys-i386/sysrq.c
View file @
0d69ae5f
...
...
@@ -88,9 +88,7 @@ void show_trace(struct task_struct* task, unsigned long * stack)
task
=
current
;
if
(
task
!=
current
)
{
//ebp = (unsigned long) KSTK_EBP(task);
/* Which one? No actual difference - just coding style.*/
ebp
=
(
unsigned
long
)
PT_REGS_EBP
(
&
task
->
thread
.
regs
);
ebp
=
(
unsigned
long
)
KSTK_EBP
(
task
);
}
else
{
asm
(
"movl %%ebp, %0"
:
"=r"
(
ebp
)
:
);
}
...
...
@@ -99,15 +97,6 @@ void show_trace(struct task_struct* task, unsigned long * stack)
((
unsigned
long
)
stack
&
(
~
(
THREAD_SIZE
-
1
)));
print_context_stack
(
context
,
stack
,
ebp
);
/*while (((long) stack & (THREAD_SIZE-1)) != 0) {
addr = *stack;
if (__kernel_text_address(addr)) {
printk("%08lx: [<%08lx>]", (unsigned long) stack, addr);
print_symbol(" %s", addr);
printk("\n");
}
stack++;
}*/
printk
(
"
\n
"
);
}
arch/um/sys-i386/user-offsets.c
View file @
0d69ae5f
...
...
@@ -46,7 +46,7 @@ void foo(void)
OFFSET
(
HOST_SC_FP_ST
,
_fpstate
,
_st
);
OFFSET
(
HOST_SC_FXSR_ENV
,
_fpstate
,
_fxsr_env
);
DEFINE
_LONGS
(
HOST_FRAME_SIZE
,
FRAME_SIZE
);
DEFINE
(
HOST_FRAME_SIZE
,
FRAME_SIZE
);
DEFINE_LONGS
(
HOST_FP_SIZE
,
sizeof
(
struct
user_i387_struct
));
DEFINE_LONGS
(
HOST_XFP_SIZE
,
sizeof
(
struct
user_fxsr_struct
));
...
...
arch/x86_64/kernel/head.S
View file @
0d69ae5f
...
...
@@ -270,26 +270,26 @@ ENTRY(level3_kernel_pgt)
.
org
0
x4000
ENTRY
(
level2_ident_pgt
)
/
*
40
MB
for
bootup
.
*/
.
quad
0x0000000000000
1
83
.
quad
0x0000000000200
1
83
.
quad
0x0000000000400
1
83
.
quad
0x0000000000600
1
83
.
quad
0x0000000000800
1
83
.
quad
0x0000000000A00
1
83
.
quad
0x0000000000C00
1
83
.
quad
0x0000000000E00
1
83
.
quad
0x0000000001000
1
83
.
quad
0x0000000001200
1
83
.
quad
0x0000000001400
1
83
.
quad
0x0000000001600
1
83
.
quad
0x0000000001800
1
83
.
quad
0x0000000001A00
1
83
.
quad
0x0000000001C00
1
83
.
quad
0x0000000001E00
1
83
.
quad
0x0000000002000
1
83
.
quad
0x0000000002200
1
83
.
quad
0x0000000002400
1
83
.
quad
0x0000000002600
1
83
.
quad
0x0000000000000
0
83
.
quad
0x0000000000200
0
83
.
quad
0x0000000000400
0
83
.
quad
0x0000000000600
0
83
.
quad
0x0000000000800
0
83
.
quad
0x0000000000A00
0
83
.
quad
0x0000000000C00
0
83
.
quad
0x0000000000E00
0
83
.
quad
0x0000000001000
0
83
.
quad
0x0000000001200
0
83
.
quad
0x0000000001400
0
83
.
quad
0x0000000001600
0
83
.
quad
0x0000000001800
0
83
.
quad
0x0000000001A00
0
83
.
quad
0x0000000001C00
0
83
.
quad
0x0000000001E00
0
83
.
quad
0x0000000002000
0
83
.
quad
0x0000000002200
0
83
.
quad
0x0000000002400
0
83
.
quad
0x0000000002600
0
83
/
*
Temporary
mappings
for
the
super
early
allocator
in
arch
/
x86_64
/
mm
/
init
.
c
*/
.
globl
temp_boot_pmds
temp_boot_pmds
:
...
...
drivers/infiniband/hw/mthca/mthca_main.c
View file @
0d69ae5f
...
...
@@ -503,6 +503,25 @@ static int __devinit mthca_init_icm(struct mthca_dev *mdev,
return
err
;
}
static
void
mthca_free_icms
(
struct
mthca_dev
*
mdev
)
{
u8
status
;
mthca_free_icm_table
(
mdev
,
mdev
->
mcg_table
.
table
);
if
(
mdev
->
mthca_flags
&
MTHCA_FLAG_SRQ
)
mthca_free_icm_table
(
mdev
,
mdev
->
srq_table
.
table
);
mthca_free_icm_table
(
mdev
,
mdev
->
cq_table
.
table
);
mthca_free_icm_table
(
mdev
,
mdev
->
qp_table
.
rdb_table
);
mthca_free_icm_table
(
mdev
,
mdev
->
qp_table
.
eqp_table
);
mthca_free_icm_table
(
mdev
,
mdev
->
qp_table
.
qp_table
);
mthca_free_icm_table
(
mdev
,
mdev
->
mr_table
.
mpt_table
);
mthca_free_icm_table
(
mdev
,
mdev
->
mr_table
.
mtt_table
);
mthca_unmap_eq_icm
(
mdev
);
mthca_UNMAP_ICM_AUX
(
mdev
,
&
status
);
mthca_free_icm
(
mdev
,
mdev
->
fw
.
arbel
.
aux_icm
);
}
static
int
__devinit
mthca_init_arbel
(
struct
mthca_dev
*
mdev
)
{
struct
mthca_dev_lim
dev_lim
;
...
...
@@ -580,18 +599,7 @@ static int __devinit mthca_init_arbel(struct mthca_dev *mdev)
return
0
;
err_free_icm:
if
(
mdev
->
mthca_flags
&
MTHCA_FLAG_SRQ
)
mthca_free_icm_table
(
mdev
,
mdev
->
srq_table
.
table
);
mthca_free_icm_table
(
mdev
,
mdev
->
cq_table
.
table
);
mthca_free_icm_table
(
mdev
,
mdev
->
qp_table
.
rdb_table
);
mthca_free_icm_table
(
mdev
,
mdev
->
qp_table
.
eqp_table
);
mthca_free_icm_table
(
mdev
,
mdev
->
qp_table
.
qp_table
);
mthca_free_icm_table
(
mdev
,
mdev
->
mr_table
.
mpt_table
);
mthca_free_icm_table
(
mdev
,
mdev
->
mr_table
.
mtt_table
);
mthca_unmap_eq_icm
(
mdev
);
mthca_UNMAP_ICM_AUX
(
mdev
,
&
status
);
mthca_free_icm
(
mdev
,
mdev
->
fw
.
arbel
.
aux_icm
);
mthca_free_icms
(
mdev
);
err_stop_fw:
mthca_UNMAP_FA
(
mdev
,
&
status
);
...
...
@@ -611,18 +619,7 @@ static void mthca_close_hca(struct mthca_dev *mdev)
mthca_CLOSE_HCA
(
mdev
,
0
,
&
status
);
if
(
mthca_is_memfree
(
mdev
))
{
if
(
mdev
->
mthca_flags
&
MTHCA_FLAG_SRQ
)
mthca_free_icm_table
(
mdev
,
mdev
->
srq_table
.
table
);
mthca_free_icm_table
(
mdev
,
mdev
->
cq_table
.
table
);
mthca_free_icm_table
(
mdev
,
mdev
->
qp_table
.
rdb_table
);
mthca_free_icm_table
(
mdev
,
mdev
->
qp_table
.
eqp_table
);
mthca_free_icm_table
(
mdev
,
mdev
->
qp_table
.
qp_table
);
mthca_free_icm_table
(
mdev
,
mdev
->
mr_table
.
mpt_table
);
mthca_free_icm_table
(
mdev
,
mdev
->
mr_table
.
mtt_table
);
mthca_unmap_eq_icm
(
mdev
);
mthca_UNMAP_ICM_AUX
(
mdev
,
&
status
);
mthca_free_icm
(
mdev
,
mdev
->
fw
.
arbel
.
aux_icm
);
mthca_free_icms
(
mdev
);
mthca_UNMAP_FA
(
mdev
,
&
status
);
mthca_free_icm
(
mdev
,
mdev
->
fw
.
arbel
.
fw_icm
);
...
...
drivers/infiniband/ulp/ipoib/ipoib_main.c
View file @
0d69ae5f
...
...
@@ -474,7 +474,7 @@ static void neigh_add_path(struct sk_buff *skb, struct net_device *dev)
spin_unlock
(
&
priv
->
lock
);
}
static
void
path_lookup
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
void
ipoib_
path_lookup
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
struct
ipoib_dev_priv
*
priv
=
netdev_priv
(
skb
->
dev
);
...
...
@@ -569,7 +569,7 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
if
(
skb
->
dst
&&
skb
->
dst
->
neighbour
)
{
if
(
unlikely
(
!*
to_ipoib_neigh
(
skb
->
dst
->
neighbour
)))
{
path_lookup
(
skb
,
dev
);
ipoib_
path_lookup
(
skb
,
dev
);
goto
out
;
}
...
...
drivers/net/tokenring/ibmtr.c
View file @
0d69ae5f
...
...
@@ -531,7 +531,6 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr)
if
(
!
time_after
(
jiffies
,
timeout
))
continue
;
DPRINTK
(
"Hardware timeout during initialization.
\n
"
);
iounmap
(
t_mmio
);
kfree
(
ti
);
return
-
ENODEV
;
}
ti
->
sram_phys
=
...
...
@@ -645,7 +644,6 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr)
DPRINTK
(
"Unknown shared ram paging info %01X
\n
"
,
ti
->
shared_ram_paging
);
iounmap
(
t_mmio
);
kfree
(
ti
);
return
-
ENODEV
;
break
;
}
/*end switch shared_ram_paging */
...
...
@@ -675,7 +673,6 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr)
"driver limit (%05x), adapter not started.
\n
"
,
chk_base
,
ibmtr_mem_base
+
IBMTR_SHARED_RAM_SIZE
);
iounmap
(
t_mmio
);
kfree
(
ti
);
return
-
ENODEV
;
}
else
{
/* seems cool, record what we have figured out */
ti
->
sram_base
=
new_base
>>
12
;
...
...
@@ -690,7 +687,6 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr)
DPRINTK
(
"Could not grab irq %d. Halting Token Ring driver.
\n
"
,
irq
);
iounmap
(
t_mmio
);
kfree
(
ti
);
return
-
ENODEV
;
}
/*?? Now, allocate some of the PIO PORTs for this driver.. */
...
...
@@ -699,7 +695,6 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr)
DPRINTK
(
"Could not grab PIO range. Halting driver.
\n
"
);
free_irq
(
dev
->
irq
,
dev
);
iounmap
(
t_mmio
);
kfree
(
ti
);
return
-
EBUSY
;
}
...
...
drivers/net/wireless/orinoco.c
View file @
0d69ae5f
...
...
@@ -490,9 +490,14 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
return
0
;
}
/* Length of the packet body */
/* FIXME: what if the skb is smaller than this? */
len
=
max_t
(
int
,
skb
->
len
-
ETH_HLEN
,
ETH_ZLEN
-
ETH_HLEN
);
/* Check packet length, pad short packets, round up odd length */
len
=
max_t
(
int
,
ALIGN
(
skb
->
len
,
2
),
ETH_ZLEN
);
if
(
skb
->
len
<
len
)
{
skb
=
skb_padto
(
skb
,
len
);
if
(
skb
==
NULL
)
goto
fail
;
}
len
-=
ETH_HLEN
;
eh
=
(
struct
ethhdr
*
)
skb
->
data
;
...
...
@@ -544,8 +549,7 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
p
=
skb
->
data
;
}
/* Round up for odd length packets */
err
=
hermes_bap_pwrite
(
hw
,
USER_BAP
,
p
,
ALIGN
(
data_len
,
2
),
err
=
hermes_bap_pwrite
(
hw
,
USER_BAP
,
p
,
data_len
,
txfid
,
data_off
);
if
(
err
)
{
printk
(
KERN_ERR
"%s: Error %d writing packet to BAP
\n
"
,
...
...
drivers/scsi/megaraid/megaraid_sas.c
View file @
0d69ae5f
...
...
@@ -34,6 +34,7 @@
#include <linux/delay.h>
#include <linux/uio.h>
#include <asm/uaccess.h>
#include <linux/fs.h>
#include <linux/compat.h>
#include <scsi/scsi.h>
...
...
drivers/serial/sunsu.c
View file @
0d69ae5f
...
...
@@ -518,11 +518,7 @@ static void sunsu_change_mouse_baud(struct uart_sunsu_port *up)
quot
=
up
->
port
.
uartclk
/
(
16
*
new_baud
);
spin_unlock
(
&
up
->
port
.
lock
);
sunsu_change_speed
(
&
up
->
port
,
up
->
cflag
,
0
,
quot
);
spin_lock
(
&
up
->
port
.
lock
);
}
static
void
receive_kbd_ms_chars
(
struct
uart_sunsu_port
*
up
,
struct
pt_regs
*
regs
,
int
is_break
)
...
...
fs/bfs/dir.c
View file @
0d69ae5f
...
...
@@ -108,7 +108,7 @@ static int bfs_create(struct inode * dir, struct dentry * dentry, int mode,
inode
->
i_mapping
->
a_ops
=
&
bfs_aops
;
inode
->
i_mode
=
mode
;
inode
->
i_ino
=
ino
;
BFS_I
(
inode
)
->
i_dsk_ino
=
cpu_to_le16
(
ino
)
;
BFS_I
(
inode
)
->
i_dsk_ino
=
ino
;
BFS_I
(
inode
)
->
i_sblock
=
0
;
BFS_I
(
inode
)
->
i_eblock
=
0
;
insert_inode_hash
(
inode
);
...
...
fs/bfs/inode.c
View file @
0d69ae5f
...
...
@@ -357,28 +357,46 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent)
}
info
->
si_blocks
=
(
le32_to_cpu
(
bfs_sb
->
s_end
)
+
1
)
>>
BFS_BSIZE_BITS
;
/* for statfs(2) */
info
->
si_freeb
=
(
le32_to_cpu
(
bfs_sb
->
s_end
)
+
1
-
cpu_to_le32
(
bfs_sb
->
s_start
))
>>
BFS_BSIZE_BITS
;
info
->
si_freeb
=
(
le32_to_cpu
(
bfs_sb
->
s_end
)
+
1
-
le32_to_cpu
(
bfs_sb
->
s_start
))
>>
BFS_BSIZE_BITS
;
info
->
si_freei
=
0
;
info
->
si_lf_eblk
=
0
;
info
->
si_lf_sblk
=
0
;
info
->
si_lf_ioff
=
0
;
bh
=
NULL
;
for
(
i
=
BFS_ROOT_INO
;
i
<=
info
->
si_lasti
;
i
++
)
{
inode
=
iget
(
s
,
i
);
if
(
BFS_I
(
inode
)
->
i_dsk_ino
==
0
)
struct
bfs_inode
*
di
;
int
block
=
(
i
-
BFS_ROOT_INO
)
/
BFS_INODES_PER_BLOCK
+
1
;
int
off
=
(
i
-
BFS_ROOT_INO
)
%
BFS_INODES_PER_BLOCK
;
unsigned
long
sblock
,
eblock
;
if
(
!
off
)
{
brelse
(
bh
);
bh
=
sb_bread
(
s
,
block
);
}
if
(
!
bh
)
continue
;
di
=
(
struct
bfs_inode
*
)
bh
->
b_data
+
off
;
if
(
!
di
->
i_ino
)
{
info
->
si_freei
++
;
else
{
set_bit
(
i
,
info
->
si_imap
);
info
->
si_freeb
-=
inode
->
i_blocks
;
if
(
BFS_I
(
inode
)
->
i_eblock
>
info
->
si_lf_eblk
)
{
info
->
si_lf_eblk
=
BFS_I
(
inode
)
->
i_eblock
;
info
->
si_lf_sblk
=
BFS_I
(
inode
)
->
i_sblock
;
info
->
si_lf_ioff
=
BFS_INO2OFF
(
i
);
}
continue
;
}
set_bit
(
i
,
info
->
si_imap
);
info
->
si_freeb
-=
BFS_FILEBLOCKS
(
di
);
sblock
=
le32_to_cpu
(
di
->
i_sblock
);
eblock
=
le32_to_cpu
(
di
->
i_eblock
);
if
(
eblock
>
info
->
si_lf_eblk
)
{
info
->
si_lf_eblk
=
eblock
;
info
->
si_lf_sblk
=
sblock
;
info
->
si_lf_ioff
=
BFS_INO2OFF
(
i
);
}
iput
(
inode
);
}
brelse
(
bh
);
if
(
!
(
s
->
s_flags
&
MS_RDONLY
))
{
mark_buffer_dirty
(
bh
);
mark_buffer_dirty
(
info
->
si_s
bh
);
s
->
s_dirt
=
1
;
}
dump_imap
(
"read_super"
,
s
);
...
...
fs/ntfs/ChangeLog
View file @
0d69ae5f
...
...
@@ -102,6 +102,9 @@ ToDo/Notes:
inode instead of a vfs inode as parameter.
- Fix the definition of the CHKD ntfs record magic. It had an off by
two error causing it to be CHKB instead of CHKD.
- Fix a stupid bug in __ntfs_bitmap_set_bits_in_run() which caused the
count to become negative and hence we had a wild memset() scribbling
all over the system's ram.
2.1.23 - Implement extension of resident files and make writing safe as well as
many bug fixes, cleanups, and enhancements...
...
...
fs/ntfs/bitmap.c
View file @
0d69ae5f
/*
* bitmap.c - NTFS kernel bitmap handling. Part of the Linux-NTFS project.
*
* Copyright (c) 2004 Anton Altaparmakov
* Copyright (c) 2004
-2005
Anton Altaparmakov
*
* This program/include file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
...
...
@@ -90,7 +90,8 @@ int __ntfs_bitmap_set_bits_in_run(struct inode *vi, const s64 start_bit,
/* If the first byte is partial, modify the appropriate bits in it. */
if
(
bit
)
{
u8
*
byte
=
kaddr
+
pos
;
while
((
bit
&
7
)
&&
cnt
--
)
{
while
((
bit
&
7
)
&&
cnt
)
{
cnt
--
;
if
(
value
)
*
byte
|=
1
<<
bit
++
;
else
...
...
fs/ntfs/layout.h
View file @
0d69ae5f
...
...
@@ -309,7 +309,7 @@ typedef le16 MFT_RECORD_FLAGS;
* Note: The _LE versions will return a CPU endian formatted value!
*/
#define MFT_REF_MASK_CPU 0x0000ffffffffffffULL
#define MFT_REF_MASK_LE const_cpu_to_le64(
0x0000ffffffffffffULL
)
#define MFT_REF_MASK_LE const_cpu_to_le64(
MFT_REF_MASK_CPU
)
typedef
u64
MFT_REF
;
typedef
le64
leMFT_REF
;
...
...
fs/ntfs/mft.c
View file @
0d69ae5f
...
...
@@ -58,7 +58,8 @@ static inline MFT_RECORD *map_mft_record_page(ntfs_inode *ni)
* overflowing the unsigned long, but I don't think we would ever get
* here if the volume was that big...
*/
index
=
ni
->
mft_no
<<
vol
->
mft_record_size_bits
>>
PAGE_CACHE_SHIFT
;
index
=
(
u64
)
ni
->
mft_no
<<
vol
->
mft_record_size_bits
>>
PAGE_CACHE_SHIFT
;
ofs
=
(
ni
->
mft_no
<<
vol
->
mft_record_size_bits
)
&
~
PAGE_CACHE_MASK
;
i_size
=
i_size_read
(
mft_vi
);
...
...
fs/ntfs/unistr.c
View file @
0d69ae5f
/*
* unistr.c - NTFS Unicode string handling. Part of the Linux-NTFS project.
*
* Copyright (c) 2001-200
4
Anton Altaparmakov
* Copyright (c) 2001-200
5
Anton Altaparmakov
*
* This program/include file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
...
...
include/asm-arm/arch-h720x/system.h
View file @
0d69ae5f
...
...
@@ -17,9 +17,11 @@
static
void
arch_idle
(
void
)
{
CPU_REG
(
PMU_BASE
,
PMU_MODE
)
=
PMU_MODE_IDLE
;
__asm__
__volatile__
(
"mov r0, r0
\n\t
"
"mov r0, r0"
);
nop
();
nop
();
CPU_REG
(
PMU_BASE
,
PMU_MODE
)
=
PMU_MODE_RUN
;
nop
();
nop
();
}
...
...
include/asm-arm/arch-imx/imx-regs.h
View file @
0d69ae5f
...
...
@@ -76,6 +76,7 @@
#define GPIO_PIN_MASK 0x1f
#define GPIO_PORT_MASK (0x3 << 5)
#define GPIO_PORT_SHIFT 5
#define GPIO_PORTA (0<<5)
#define GPIO_PORTB (1<<5)
#define GPIO_PORTC (2<<5)
...
...
@@ -88,24 +89,37 @@
#define GPIO_PF (0<<9)
#define GPIO_AF (1<<9)
#define GPIO_OCR_SHIFT 10
#define GPIO_OCR_MASK (3<<10)
#define GPIO_AIN (0<<10)
#define GPIO_BIN (1<<10)
#define GPIO_CIN (2<<10)
#define GPIO_
GPIO
(3<<10)
#define GPIO_
DR
(3<<10)
#define GPIO_AOUT (1<<12)
#define GPIO_BOUT (1<<13)
#define GPIO_AOUT_SHIFT 12
#define GPIO_AOUT_MASK (3<<12)
#define GPIO_AOUT (0<<12)
#define GPIO_AOUT_ISR (1<<12)
#define GPIO_AOUT_0 (2<<12)
#define GPIO_AOUT_1 (3<<12)
#define GPIO_BOUT_SHIFT 14
#define GPIO_BOUT_MASK (3<<14)
#define GPIO_BOUT (0<<14)
#define GPIO_BOUT_ISR (1<<14)
#define GPIO_BOUT_0 (2<<14)
#define GPIO_BOUT_1 (3<<14)
#define GPIO_GIUS (1<<16)
/* assignements for GPIO alternate/primary functions */
/* FIXME: This list is not completed. The correct directions are
* missing on some (many) pins
*/
#define PA0_PF_A24 ( GPIO_PORTA | GPIO_PF | 0 )
#define PA0_AIN_SPI2_CLK ( GPIO_PORTA | GPIO_OUT | GPIO_AIN | 0 )
#define PA0_AIN_SPI2_CLK ( GPIO_GIUS | GPIO_PORTA | GPIO_OUT | 0 )
#define PA0_AF_ETMTRACESYNC ( GPIO_PORTA | GPIO_AF | 0 )
#define PA1_AOUT_SPI2_RXD ( GPIO_
PORTA | GPIO_IN | GPIO_AOUT
| 1 )
#define PA1_AOUT_SPI2_RXD ( GPIO_
GIUS | GPIO_PORTA | GPIO_IN
| 1 )
#define PA1_PF_TIN ( GPIO_PORTA | GPIO_PF | 1 )
#define PA2_PF_PWM0 ( GPIO_PORTA | GPIO_OUT | GPIO_PF | 2 )
#define PA3_PF_CSI_MCLK ( GPIO_PORTA | GPIO_PF | 3 )
...
...
@@ -123,7 +137,7 @@
#define PA15_PF_I2C_SDA ( GPIO_PORTA | GPIO_OUT | GPIO_PF | 15 )
#define PA16_PF_I2C_SCL ( GPIO_PORTA | GPIO_OUT | GPIO_PF | 16 )
#define PA17_AF_ETMTRACEPKT4 ( GPIO_PORTA | GPIO_AF | 17 )
#define PA17_AIN_SPI2_SS ( GPIO_
PORTA | GPIO_AIN
| 17 )
#define PA17_AIN_SPI2_SS ( GPIO_
GIUS | GPIO_PORTA | GPIO_OUT
| 17 )
#define PA18_AF_ETMTRACEPKT5 ( GPIO_PORTA | GPIO_AF | 18 )
#define PA19_AF_ETMTRACEPKT6 ( GPIO_PORTA | GPIO_AF | 19 )
#define PA20_AF_ETMTRACEPKT7 ( GPIO_PORTA | GPIO_AF | 20 )
...
...
@@ -191,19 +205,27 @@
#define PC15_PF_SPI1_SS ( GPIO_PORTC | GPIO_PF | 15 )
#define PC16_PF_SPI1_MISO ( GPIO_PORTC | GPIO_PF | 16 )
#define PC17_PF_SPI1_MOSI ( GPIO_PORTC | GPIO_PF | 17 )
#define PC24_BIN_UART3_RI ( GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 24 )
#define PC25_BIN_UART3_DSR ( GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 25 )
#define PC26_AOUT_UART3_DTR ( GPIO_GIUS | GPIO_PORTC | GPIO_IN | 26 )
#define PC27_BIN_UART3_DCD ( GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 27 )
#define PC28_BIN_UART3_CTS ( GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 28 )
#define PC29_AOUT_UART3_RTS ( GPIO_GIUS | GPIO_PORTC | GPIO_IN | 29 )
#define PC30_BIN_UART3_TX ( GPIO_GIUS | GPIO_PORTC | GPIO_BIN | 30 )
#define PC31_AOUT_UART3_RX ( GPIO_GIUS | GPIO_PORTC | GPIO_IN | 31)
#define PD6_PF_LSCLK ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 6 )
#define PD7_PF_REV ( GPIO_PORTD | GPIO_PF | 7 )
#define PD7_AF_UART2_DTR ( GPIO_PORTD | GPIO_IN | GPIO_AF | 7 )
#define PD7_AIN_SPI2_SCLK ( GPIO_PORTD | GPIO_AIN | 7 )
#define PD7_AIN_SPI2_SCLK ( GPIO_
GIUS | GPIO_
PORTD | GPIO_AIN | 7 )
#define PD8_PF_CLS ( GPIO_PORTD | GPIO_PF | 8 )
#define PD8_AF_UART2_DCD ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 8 )
#define PD8_AIN_SPI2_SS ( GPIO_PORTD | GPIO_AIN | 8 )
#define PD8_AIN_SPI2_SS ( GPIO_
GIUS | GPIO_
PORTD | GPIO_AIN | 8 )
#define PD9_PF_PS ( GPIO_PORTD | GPIO_PF | 9 )
#define PD9_AF_UART2_RI ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 9 )
#define PD9_AOUT_SPI2_RXD ( GPIO_
PORTD | GPIO_IN | GPIO_AOUT
| 9 )
#define PD9_AOUT_SPI2_RXD ( GPIO_
GIUS | GPIO_PORTD | GPIO_IN
| 9 )
#define PD10_PF_SPL_SPR ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 10 )
#define PD10_AF_UART2_DSR ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 10 )
#define PD10_AIN_SPI2_TXD ( GPIO_
PORTD | GPIO_OUT | GPIO_AIN
| 10 )
#define PD10_AIN_SPI2_TXD ( GPIO_
GIUS | GPIO_PORTD | GPIO_OUT
| 10 )
#define PD11_PF_CONTRAST ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 11 )
#define PD12_PF_ACD_OE ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 12 )
#define PD13_PF_LP_HSYNC ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 13 )
...
...
@@ -225,7 +247,7 @@
#define PD29_PF_LD14 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 29 )
#define PD30_PF_LD15 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 30 )
#define PD31_PF_TMR2OUT ( GPIO_PORTD | GPIO_PF | 31 )
#define PD31_BIN_SPI2_TXD ( GPIO_PORTD | GPIO_BIN | 31 )
#define PD31_BIN_SPI2_TXD ( GPIO_
GIUS | GPIO_
PORTD | GPIO_BIN | 31 )
/*
* PWM controller
...
...
include/asm-arm/arch-ixp4xx/platform.h
View file @
0d69ae5f
...
...
@@ -93,7 +93,7 @@ extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys);
static
inline
void
gpio_line_config
(
u8
line
,
u32
direction
)
{
if
(
direction
==
IXP4XX_GPIO_
OUT
)
if
(
direction
==
IXP4XX_GPIO_
IN
)
*
IXP4XX_GPIO_GPOER
|=
(
1
<<
line
);
else
*
IXP4XX_GPIO_GPOER
&=
~
(
1
<<
line
);
...
...
include/asm-sparc/btfixup.h
View file @
0d69ae5f
...
...
@@ -51,7 +51,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
#define BTFIXUPDEF_SIMM13(__name) \
extern unsigned int ___sf_##__name(void) __attribute_const__; \
extern unsigned ___ss_##__name[2]; \
extern __inline__
unsigned int ___sf_##__name(void) { \
static inline
unsigned int ___sf_##__name(void) { \
unsigned int ret; \
__asm__ ("or %%g0, ___s_" #__name ", %0" : "=r"(ret)); \
return ret; \
...
...
@@ -59,7 +59,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
#define BTFIXUPDEF_SIMM13_INIT(__name,__val) \
extern unsigned int ___sf_##__name(void) __attribute_const__; \
extern unsigned ___ss_##__name[2]; \
extern __inline__
unsigned int ___sf_##__name(void) { \
static inline
unsigned int ___sf_##__name(void) { \
unsigned int ret; \
__asm__ ("or %%g0, ___s_" #__name "__btset_" #__val ", %0" : "=r"(ret));\
return ret; \
...
...
@@ -73,7 +73,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
#define BTFIXUPDEF_HALF(__name) \
extern unsigned int ___af_##__name(void) __attribute_const__; \
extern unsigned ___as_##__name[2]; \
extern __inline__
unsigned int ___af_##__name(void) { \
static inline
unsigned int ___af_##__name(void) { \
unsigned int ret; \
__asm__ ("or %%g0, ___a_" #__name ", %0" : "=r"(ret)); \
return ret; \
...
...
@@ -81,7 +81,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
#define BTFIXUPDEF_HALF_INIT(__name,__val) \
extern unsigned int ___af_##__name(void) __attribute_const__; \
extern unsigned ___as_##__name[2]; \
extern __inline__
unsigned int ___af_##__name(void) { \
static inline
unsigned int ___af_##__name(void) { \
unsigned int ret; \
__asm__ ("or %%g0, ___a_" #__name "__btset_" #__val ", %0" : "=r"(ret));\
return ret; \
...
...
@@ -92,7 +92,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
#define BTFIXUPDEF_SETHI(__name) \
extern unsigned int ___hf_##__name(void) __attribute_const__; \
extern unsigned ___hs_##__name[2]; \
extern __inline__
unsigned int ___hf_##__name(void) { \
static inline
unsigned int ___hf_##__name(void) { \
unsigned int ret; \
__asm__ ("sethi %%hi(___h_" #__name "), %0" : "=r"(ret)); \
return ret; \
...
...
@@ -100,7 +100,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
#define BTFIXUPDEF_SETHI_INIT(__name,__val) \
extern unsigned int ___hf_##__name(void) __attribute_const__; \
extern unsigned ___hs_##__name[2]; \
extern __inline__
unsigned int ___hf_##__name(void) { \
static inline
unsigned int ___hf_##__name(void) { \
unsigned int ret; \
__asm__ ("sethi %%hi(___h_" #__name "__btset_" #__val "), %0" : \
"=r"(ret)); \
...
...
include/asm-sparc/cache.h
View file @
0d69ae5f
...
...
@@ -27,7 +27,7 @@
*/
/* First, cache-tag access. */
extern
__inline__
unsigned
int
get_icache_tag
(
int
setnum
,
int
tagnum
)
static
inline
unsigned
int
get_icache_tag
(
int
setnum
,
int
tagnum
)
{
unsigned
int
vaddr
,
retval
;
...
...
@@ -38,7 +38,7 @@ extern __inline__ unsigned int get_icache_tag(int setnum, int tagnum)
return
retval
;
}
extern
__inline__
void
put_icache_tag
(
int
setnum
,
int
tagnum
,
unsigned
int
entry
)
static
inline
void
put_icache_tag
(
int
setnum
,
int
tagnum
,
unsigned
int
entry
)
{
unsigned
int
vaddr
;
...
...
@@ -51,7 +51,7 @@ extern __inline__ void put_icache_tag(int setnum, int tagnum, unsigned int entry
/* Second cache-data access. The data is returned two-32bit quantities
* at a time.
*/
extern
__inline__
void
get_icache_data
(
int
setnum
,
int
tagnum
,
int
subblock
,
static
inline
void
get_icache_data
(
int
setnum
,
int
tagnum
,
int
subblock
,
unsigned
int
*
data
)
{
unsigned
int
value1
,
value2
,
vaddr
;
...
...
@@ -67,7 +67,7 @@ extern __inline__ void get_icache_data(int setnum, int tagnum, int subblock,
data
[
0
]
=
value1
;
data
[
1
]
=
value2
;
}
extern
__inline__
void
put_icache_data
(
int
setnum
,
int
tagnum
,
int
subblock
,
static
inline
void
put_icache_data
(
int
setnum
,
int
tagnum
,
int
subblock
,
unsigned
int
*
data
)
{
unsigned
int
value1
,
value2
,
vaddr
;
...
...
@@ -92,35 +92,35 @@ extern __inline__ void put_icache_data(int setnum, int tagnum, int subblock,
*/
/* Flushes which clear out both the on-chip and external caches */
extern
__inline__
void
flush_ei_page
(
unsigned
int
addr
)
static
inline
void
flush_ei_page
(
unsigned
int
addr
)
{
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
"r"
(
addr
),
"i"
(
ASI_M_FLUSH_PAGE
)
:
"memory"
);
}
extern
__inline__
void
flush_ei_seg
(
unsigned
int
addr
)
static
inline
void
flush_ei_seg
(
unsigned
int
addr
)
{
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
"r"
(
addr
),
"i"
(
ASI_M_FLUSH_SEG
)
:
"memory"
);
}
extern
__inline__
void
flush_ei_region
(
unsigned
int
addr
)
static
inline
void
flush_ei_region
(
unsigned
int
addr
)
{
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
"r"
(
addr
),
"i"
(
ASI_M_FLUSH_REGION
)
:
"memory"
);
}
extern
__inline__
void
flush_ei_ctx
(
unsigned
int
addr
)
static
inline
void
flush_ei_ctx
(
unsigned
int
addr
)
{
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
"r"
(
addr
),
"i"
(
ASI_M_FLUSH_CTX
)
:
"memory"
);
}
extern
__inline__
void
flush_ei_user
(
unsigned
int
addr
)
static
inline
void
flush_ei_user
(
unsigned
int
addr
)
{
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
"r"
(
addr
),
"i"
(
ASI_M_FLUSH_USER
)
:
...
...
include/asm-sparc/cypress.h
View file @
0d69ae5f
...
...
@@ -48,25 +48,25 @@
#define CYPRESS_NFAULT 0x00000002
#define CYPRESS_MENABLE 0x00000001
extern
__inline__
void
cypress_flush_page
(
unsigned
long
page
)
static
inline
void
cypress_flush_page
(
unsigned
long
page
)
{
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
"r"
(
page
),
"i"
(
ASI_M_FLUSH_PAGE
));
}
extern
__inline__
void
cypress_flush_segment
(
unsigned
long
addr
)
static
inline
void
cypress_flush_segment
(
unsigned
long
addr
)
{
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
"r"
(
addr
),
"i"
(
ASI_M_FLUSH_SEG
));
}
extern
__inline__
void
cypress_flush_region
(
unsigned
long
addr
)
static
inline
void
cypress_flush_region
(
unsigned
long
addr
)
{
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
"r"
(
addr
),
"i"
(
ASI_M_FLUSH_REGION
));
}
extern
__inline__
void
cypress_flush_context
(
void
)
static
inline
void
cypress_flush_context
(
void
)
{
__asm__
__volatile__
(
"sta %%g0, [%%g0] %0
\n\t
"
:
:
"i"
(
ASI_M_FLUSH_CTX
));
...
...
include/asm-sparc/delay.h
View file @
0d69ae5f
...
...
@@ -10,7 +10,7 @@
#include <linux/config.h>
#include <asm/cpudata.h>
extern
__inline__
void
__delay
(
unsigned
long
loops
)
static
inline
void
__delay
(
unsigned
long
loops
)
{
__asm__
__volatile__
(
"cmp %0, 0
\n\t
"
"1: bne 1b
\n\t
"
...
...
include/asm-sparc/dma.h
View file @
0d69ae5f
...
...
@@ -198,7 +198,7 @@ extern void dvma_init(struct sbus_bus *);
/* Pause until counter runs out or BIT isn't set in the DMA condition
* register.
*/
extern __inline__
void sparc_dma_pause(struct sparc_dma_registers *regs,
static inline
void sparc_dma_pause(struct sparc_dma_registers *regs,
unsigned long bit)
{
int ctr = 50000; /* Let's find some bugs ;) */
...
...
include/asm-sparc/iommu.h
View file @
0d69ae5f
...
...
@@ -108,12 +108,12 @@ struct iommu_struct {
struct
bit_map
usemap
;
};
extern
__inline__
void
iommu_invalidate
(
struct
iommu_regs
*
regs
)
static
inline
void
iommu_invalidate
(
struct
iommu_regs
*
regs
)
{
regs
->
tlbflush
=
0
;
}
extern
__inline__
void
iommu_invalidate_page
(
struct
iommu_regs
*
regs
,
unsigned
long
ba
)
static
inline
void
iommu_invalidate_page
(
struct
iommu_regs
*
regs
,
unsigned
long
ba
)
{
regs
->
pageflush
=
(
ba
&
PAGE_MASK
);
}
...
...
include/asm-sparc/kdebug.h
View file @
0d69ae5f
...
...
@@ -46,7 +46,7 @@ struct kernel_debug {
extern
struct
kernel_debug
*
linux_dbvec
;
/* Use this macro in C-code to enter the debugger. */
extern
__inline__
void
sp_enter_debugger
(
void
)
static
inline
void
sp_enter_debugger
(
void
)
{
__asm__
__volatile__
(
"jmpl %0, %%o7
\n\t
"
"nop
\n\t
"
:
:
...
...
include/asm-sparc/mbus.h
View file @
0d69ae5f
...
...
@@ -83,7 +83,7 @@ extern unsigned int hwbug_bitmask;
*/
#define TBR_ID_SHIFT 20
extern
__inline__
int
get_cpuid
(
void
)
static
inline
int
get_cpuid
(
void
)
{
register
int
retval
;
__asm__
__volatile__
(
"rd %%tbr, %0
\n\t
"
...
...
@@ -93,7 +93,7 @@ extern __inline__ int get_cpuid(void)
return
(
retval
&
3
);
}
extern
__inline__
int
get_modid
(
void
)
static
inline
int
get_modid
(
void
)
{
return
(
get_cpuid
()
|
0x8
);
}
...
...
include/asm-sparc/msi.h
View file @
0d69ae5f
...
...
@@ -19,7 +19,7 @@
#define MSI_ASYNC_MODE 0x80000000
/* Operate the MSI asynchronously */
extern
__inline__
void
msi_set_sync
(
void
)
static
inline
void
msi_set_sync
(
void
)
{
__asm__
__volatile__
(
"lda [%0] %1, %%g3
\n\t
"
"andn %%g3, %2, %%g3
\n\t
"
...
...
include/asm-sparc/mxcc.h
View file @
0d69ae5f
...
...
@@ -85,7 +85,7 @@
#ifndef __ASSEMBLY__
extern
__inline__
void
mxcc_set_stream_src
(
unsigned
long
*
paddr
)
static
inline
void
mxcc_set_stream_src
(
unsigned
long
*
paddr
)
{
unsigned
long
data0
=
paddr
[
0
];
unsigned
long
data1
=
paddr
[
1
];
...
...
@@ -98,7 +98,7 @@ extern __inline__ void mxcc_set_stream_src(unsigned long *paddr)
"i"
(
ASI_M_MXCC
)
:
"g2"
,
"g3"
);
}
extern
__inline__
void
mxcc_set_stream_dst
(
unsigned
long
*
paddr
)
static
inline
void
mxcc_set_stream_dst
(
unsigned
long
*
paddr
)
{
unsigned
long
data0
=
paddr
[
0
];
unsigned
long
data1
=
paddr
[
1
];
...
...
@@ -111,7 +111,7 @@ extern __inline__ void mxcc_set_stream_dst(unsigned long *paddr)
"i"
(
ASI_M_MXCC
)
:
"g2"
,
"g3"
);
}
extern
__inline__
unsigned
long
mxcc_get_creg
(
void
)
static
inline
unsigned
long
mxcc_get_creg
(
void
)
{
unsigned
long
mxcc_control
;
...
...
@@ -125,7 +125,7 @@ extern __inline__ unsigned long mxcc_get_creg(void)
return
mxcc_control
;
}
extern
__inline__
void
mxcc_set_creg
(
unsigned
long
mxcc_control
)
static
inline
void
mxcc_set_creg
(
unsigned
long
mxcc_control
)
{
__asm__
__volatile__
(
"sta %0, [%1] %2
\n\t
"
:
:
"r"
(
mxcc_control
),
"r"
(
MXCC_CREG
),
...
...
include/asm-sparc/obio.h
View file @
0d69ae5f
...
...
@@ -98,7 +98,7 @@
#ifndef __ASSEMBLY__
extern
__inline__
int
bw_get_intr_mask
(
int
sbus_level
)
static
inline
int
bw_get_intr_mask
(
int
sbus_level
)
{
int
mask
;
...
...
@@ -109,7 +109,7 @@ extern __inline__ int bw_get_intr_mask(int sbus_level)
return
mask
;
}
extern
__inline__
void
bw_clear_intr_mask
(
int
sbus_level
,
int
mask
)
static
inline
void
bw_clear_intr_mask
(
int
sbus_level
,
int
mask
)
{
__asm__
__volatile__
(
"stha %0, [%1] %2"
:
:
"r"
(
mask
),
...
...
@@ -117,7 +117,7 @@ extern __inline__ void bw_clear_intr_mask(int sbus_level, int mask)
"i"
(
ASI_M_CTL
));
}
extern
__inline__
unsigned
bw_get_prof_limit
(
int
cpu
)
static
inline
unsigned
bw_get_prof_limit
(
int
cpu
)
{
unsigned
limit
;
...
...
@@ -128,7 +128,7 @@ extern __inline__ unsigned bw_get_prof_limit(int cpu)
return
limit
;
}
extern
__inline__
void
bw_set_prof_limit
(
int
cpu
,
unsigned
limit
)
static
inline
void
bw_set_prof_limit
(
int
cpu
,
unsigned
limit
)
{
__asm__
__volatile__
(
"sta %0, [%1] %2"
:
:
"r"
(
limit
),
...
...
@@ -136,7 +136,7 @@ extern __inline__ void bw_set_prof_limit(int cpu, unsigned limit)
"i"
(
ASI_M_CTL
));
}
extern
__inline__
unsigned
bw_get_ctrl
(
int
cpu
)
static
inline
unsigned
bw_get_ctrl
(
int
cpu
)
{
unsigned
ctrl
;
...
...
@@ -147,7 +147,7 @@ extern __inline__ unsigned bw_get_ctrl(int cpu)
return
ctrl
;
}
extern
__inline__
void
bw_set_ctrl
(
int
cpu
,
unsigned
ctrl
)
static
inline
void
bw_set_ctrl
(
int
cpu
,
unsigned
ctrl
)
{
__asm__
__volatile__
(
"sta %0, [%1] %2"
:
:
"r"
(
ctrl
),
...
...
@@ -157,7 +157,7 @@ extern __inline__ void bw_set_ctrl(int cpu, unsigned ctrl)
extern
unsigned
char
cpu_leds
[
32
];
extern
__inline__
void
show_leds
(
int
cpuid
)
static
inline
void
show_leds
(
int
cpuid
)
{
cpuid
&=
0x1e
;
__asm__
__volatile__
(
"stba %0, [%1] %2"
:
:
...
...
@@ -166,7 +166,7 @@ extern __inline__ void show_leds(int cpuid)
"i"
(
ASI_M_CTL
));
}
extern
__inline__
unsigned
cc_get_ipen
(
void
)
static
inline
unsigned
cc_get_ipen
(
void
)
{
unsigned
pending
;
...
...
@@ -177,7 +177,7 @@ extern __inline__ unsigned cc_get_ipen(void)
return
pending
;
}
extern
__inline__
void
cc_set_iclr
(
unsigned
clear
)
static
inline
void
cc_set_iclr
(
unsigned
clear
)
{
__asm__
__volatile__
(
"stha %0, [%1] %2"
:
:
"r"
(
clear
),
...
...
@@ -185,7 +185,7 @@ extern __inline__ void cc_set_iclr(unsigned clear)
"i"
(
ASI_M_MXCC
));
}
extern
__inline__
unsigned
cc_get_imsk
(
void
)
static
inline
unsigned
cc_get_imsk
(
void
)
{
unsigned
mask
;
...
...
@@ -196,7 +196,7 @@ extern __inline__ unsigned cc_get_imsk(void)
return
mask
;
}
extern
__inline__
void
cc_set_imsk
(
unsigned
mask
)
static
inline
void
cc_set_imsk
(
unsigned
mask
)
{
__asm__
__volatile__
(
"stha %0, [%1] %2"
:
:
"r"
(
mask
),
...
...
@@ -204,7 +204,7 @@ extern __inline__ void cc_set_imsk(unsigned mask)
"i"
(
ASI_M_MXCC
));
}
extern
__inline__
unsigned
cc_get_imsk_other
(
int
cpuid
)
static
inline
unsigned
cc_get_imsk_other
(
int
cpuid
)
{
unsigned
mask
;
...
...
@@ -215,7 +215,7 @@ extern __inline__ unsigned cc_get_imsk_other(int cpuid)
return
mask
;
}
extern
__inline__
void
cc_set_imsk_other
(
int
cpuid
,
unsigned
mask
)
static
inline
void
cc_set_imsk_other
(
int
cpuid
,
unsigned
mask
)
{
__asm__
__volatile__
(
"stha %0, [%1] %2"
:
:
"r"
(
mask
),
...
...
@@ -223,7 +223,7 @@ extern __inline__ void cc_set_imsk_other(int cpuid, unsigned mask)
"i"
(
ASI_M_CTL
));
}
extern
__inline__
void
cc_set_igen
(
unsigned
gen
)
static
inline
void
cc_set_igen
(
unsigned
gen
)
{
__asm__
__volatile__
(
"sta %0, [%1] %2"
:
:
"r"
(
gen
),
...
...
@@ -239,7 +239,7 @@ extern __inline__ void cc_set_igen(unsigned gen)
#define IGEN_MESSAGE(bcast, devid, sid, levels) \
(((bcast) << 31) | ((devid) << 23) | ((sid) << 15) | (levels))
extern
__inline__
void
sun4d_send_ipi
(
int
cpu
,
int
level
)
static
inline
void
sun4d_send_ipi
(
int
cpu
,
int
level
)
{
cc_set_igen
(
IGEN_MESSAGE
(
0
,
cpu
<<
3
,
6
+
((
level
>>
1
)
&
7
),
1
<<
(
level
-
1
)));
}
...
...
include/asm-sparc/pci.h
View file @
0d69ae5f
...
...
@@ -15,12 +15,12 @@
#define PCI_IRQ_NONE 0xffffffff
extern
inline
void
pcibios_set_master
(
struct
pci_dev
*
dev
)
static
inline
void
pcibios_set_master
(
struct
pci_dev
*
dev
)
{
/* No special bus mastering setup handling */
}
extern
inline
void
pcibios_penalize_isa_irq
(
int
irq
,
int
active
)
static
inline
void
pcibios_penalize_isa_irq
(
int
irq
,
int
active
)
{
/* We don't do dynamic PCI IRQ allocation */
}
...
...
@@ -137,7 +137,7 @@ extern void pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist
* only drive the low 24-bits during PCI bus mastering, then
* you would pass 0x00ffffff as the mask to this function.
*/
extern
inline
int
pci_dma_supported
(
struct
pci_dev
*
hwdev
,
u64
mask
)
static
inline
int
pci_dma_supported
(
struct
pci_dev
*
hwdev
,
u64
mask
)
{
return
1
;
}
...
...
include/asm-sparc/pgtable.h
View file @
0d69ae5f
...
...
@@ -154,7 +154,7 @@ BTFIXUPDEF_CALL_CONST(int, pte_present, pte_t)
BTFIXUPDEF_CALL
(
void
,
pte_clear
,
pte_t
*
)
BTFIXUPDEF_CALL
(
int
,
pte_read
,
pte_t
)
extern
__inline__
int
pte_none
(
pte_t
pte
)
static
inline
int
pte_none
(
pte_t
pte
)
{
return
!
(
pte_val
(
pte
)
&
~
BTFIXUP_SETHI
(
none_mask
));
}
...
...
@@ -167,7 +167,7 @@ BTFIXUPDEF_CALL_CONST(int, pmd_bad, pmd_t)
BTFIXUPDEF_CALL_CONST
(
int
,
pmd_present
,
pmd_t
)
BTFIXUPDEF_CALL
(
void
,
pmd_clear
,
pmd_t
*
)
extern
__inline__
int
pmd_none
(
pmd_t
pmd
)
static
inline
int
pmd_none
(
pmd_t
pmd
)
{
return
!
(
pmd_val
(
pmd
)
&
~
BTFIXUP_SETHI
(
none_mask
));
}
...
...
@@ -195,19 +195,19 @@ BTFIXUPDEF_HALF(pte_dirtyi)
BTFIXUPDEF_HALF
(
pte_youngi
)
extern
int
pte_write
(
pte_t
pte
)
__attribute_const__
;
extern
__inline__
int
pte_write
(
pte_t
pte
)
static
inline
int
pte_write
(
pte_t
pte
)
{
return
pte_val
(
pte
)
&
BTFIXUP_HALF
(
pte_writei
);
}
extern
int
pte_dirty
(
pte_t
pte
)
__attribute_const__
;
extern
__inline__
int
pte_dirty
(
pte_t
pte
)
static
inline
int
pte_dirty
(
pte_t
pte
)
{
return
pte_val
(
pte
)
&
BTFIXUP_HALF
(
pte_dirtyi
);
}
extern
int
pte_young
(
pte_t
pte
)
__attribute_const__
;
extern
__inline__
int
pte_young
(
pte_t
pte
)
static
inline
int
pte_young
(
pte_t
pte
)
{
return
pte_val
(
pte
)
&
BTFIXUP_HALF
(
pte_youngi
);
}
...
...
@@ -218,7 +218,7 @@ extern __inline__ int pte_young(pte_t pte)
BTFIXUPDEF_HALF
(
pte_filei
)
extern
int
pte_file
(
pte_t
pte
)
__attribute_const__
;
extern
__inline__
int
pte_file
(
pte_t
pte
)
static
inline
int
pte_file
(
pte_t
pte
)
{
return
pte_val
(
pte
)
&
BTFIXUP_HALF
(
pte_filei
);
}
...
...
@@ -230,19 +230,19 @@ BTFIXUPDEF_HALF(pte_mkcleani)
BTFIXUPDEF_HALF
(
pte_mkoldi
)
extern
pte_t
pte_wrprotect
(
pte_t
pte
)
__attribute_const__
;
extern
__inline__
pte_t
pte_wrprotect
(
pte_t
pte
)
static
inline
pte_t
pte_wrprotect
(
pte_t
pte
)
{
return
__pte
(
pte_val
(
pte
)
&
~
BTFIXUP_HALF
(
pte_wrprotecti
));
}
extern
pte_t
pte_mkclean
(
pte_t
pte
)
__attribute_const__
;
extern
__inline__
pte_t
pte_mkclean
(
pte_t
pte
)
static
inline
pte_t
pte_mkclean
(
pte_t
pte
)
{
return
__pte
(
pte_val
(
pte
)
&
~
BTFIXUP_HALF
(
pte_mkcleani
));
}
extern
pte_t
pte_mkold
(
pte_t
pte
)
__attribute_const__
;
extern
__inline__
pte_t
pte_mkold
(
pte_t
pte
)
static
inline
pte_t
pte_mkold
(
pte_t
pte
)
{
return
__pte
(
pte_val
(
pte
)
&
~
BTFIXUP_HALF
(
pte_mkoldi
));
}
...
...
@@ -279,7 +279,7 @@ BTFIXUPDEF_CALL_CONST(pte_t, mk_pte_io, unsigned long, pgprot_t, int)
BTFIXUPDEF_INT
(
pte_modify_mask
)
extern
pte_t
pte_modify
(
pte_t
pte
,
pgprot_t
newprot
)
__attribute_const__
;
extern
__inline__
pte_t
pte_modify
(
pte_t
pte
,
pgprot_t
newprot
)
static
inline
pte_t
pte_modify
(
pte_t
pte
,
pgprot_t
newprot
)
{
return
__pte
((
pte_val
(
pte
)
&
BTFIXUP_INT
(
pte_modify_mask
))
|
pgprot_val
(
newprot
));
...
...
@@ -386,13 +386,13 @@ extern struct ctx_list ctx_used; /* Head of used contexts list */
#define NO_CONTEXT -1
extern
__inline__
void
remove_from_ctx_list
(
struct
ctx_list
*
entry
)
static
inline
void
remove_from_ctx_list
(
struct
ctx_list
*
entry
)
{
entry
->
next
->
prev
=
entry
->
prev
;
entry
->
prev
->
next
=
entry
->
next
;
}
extern
__inline__
void
add_to_ctx_list
(
struct
ctx_list
*
head
,
struct
ctx_list
*
entry
)
static
inline
void
add_to_ctx_list
(
struct
ctx_list
*
head
,
struct
ctx_list
*
entry
)
{
entry
->
next
=
head
;
(
entry
->
prev
=
head
->
prev
)
->
next
=
entry
;
...
...
@@ -401,7 +401,7 @@ extern __inline__ void add_to_ctx_list(struct ctx_list *head, struct ctx_list *e
#define add_to_free_ctxlist(entry) add_to_ctx_list(&ctx_free, entry)
#define add_to_used_ctxlist(entry) add_to_ctx_list(&ctx_used, entry)
extern
__inline__
unsigned
long
static
inline
unsigned
long
__get_phys
(
unsigned
long
addr
)
{
switch
(
sparc_cpu_model
){
...
...
@@ -416,7 +416,7 @@ __get_phys (unsigned long addr)
}
}
extern
__inline__
int
static
inline
int
__get_iospace
(
unsigned
long
addr
)
{
switch
(
sparc_cpu_model
){
...
...
include/asm-sparc/pgtsrmmu.h
View file @
0d69ae5f
...
...
@@ -148,7 +148,7 @@ extern void *srmmu_nocache_pool;
#define __nocache_fix(VADDR) __va(__nocache_pa(VADDR))
/* Accessing the MMU control register. */
extern
__inline__
unsigned
int
srmmu_get_mmureg
(
void
)
static
inline
unsigned
int
srmmu_get_mmureg
(
void
)
{
unsigned
int
retval
;
__asm__
__volatile__
(
"lda [%%g0] %1, %0
\n\t
"
:
...
...
@@ -157,14 +157,14 @@ extern __inline__ unsigned int srmmu_get_mmureg(void)
return
retval
;
}
extern
__inline__
void
srmmu_set_mmureg
(
unsigned
long
regval
)
static
inline
void
srmmu_set_mmureg
(
unsigned
long
regval
)
{
__asm__
__volatile__
(
"sta %0, [%%g0] %1
\n\t
"
:
:
"r"
(
regval
),
"i"
(
ASI_M_MMUREGS
)
:
"memory"
);
}
extern
__inline__
void
srmmu_set_ctable_ptr
(
unsigned
long
paddr
)
static
inline
void
srmmu_set_ctable_ptr
(
unsigned
long
paddr
)
{
paddr
=
((
paddr
>>
4
)
&
SRMMU_CTX_PMASK
);
__asm__
__volatile__
(
"sta %0, [%1] %2
\n\t
"
:
:
...
...
@@ -173,7 +173,7 @@ extern __inline__ void srmmu_set_ctable_ptr(unsigned long paddr)
"memory"
);
}
extern
__inline__
unsigned
long
srmmu_get_ctable_ptr
(
void
)
static
inline
unsigned
long
srmmu_get_ctable_ptr
(
void
)
{
unsigned
int
retval
;
...
...
@@ -184,14 +184,14 @@ extern __inline__ unsigned long srmmu_get_ctable_ptr(void)
return
(
retval
&
SRMMU_CTX_PMASK
)
<<
4
;
}
extern
__inline__
void
srmmu_set_context
(
int
context
)
static
inline
void
srmmu_set_context
(
int
context
)
{
__asm__
__volatile__
(
"sta %0, [%1] %2
\n\t
"
:
:
"r"
(
context
),
"r"
(
SRMMU_CTX_REG
),
"i"
(
ASI_M_MMUREGS
)
:
"memory"
);
}
extern
__inline__
int
srmmu_get_context
(
void
)
static
inline
int
srmmu_get_context
(
void
)
{
register
int
retval
;
__asm__
__volatile__
(
"lda [%1] %2, %0
\n\t
"
:
...
...
@@ -201,7 +201,7 @@ extern __inline__ int srmmu_get_context(void)
return
retval
;
}
extern
__inline__
unsigned
int
srmmu_get_fstatus
(
void
)
static
inline
unsigned
int
srmmu_get_fstatus
(
void
)
{
unsigned
int
retval
;
...
...
@@ -211,7 +211,7 @@ extern __inline__ unsigned int srmmu_get_fstatus(void)
return
retval
;
}
extern
__inline__
unsigned
int
srmmu_get_faddr
(
void
)
static
inline
unsigned
int
srmmu_get_faddr
(
void
)
{
unsigned
int
retval
;
...
...
@@ -222,7 +222,7 @@ extern __inline__ unsigned int srmmu_get_faddr(void)
}
/* This is guaranteed on all SRMMU's. */
extern
__inline__
void
srmmu_flush_whole_tlb
(
void
)
static
inline
void
srmmu_flush_whole_tlb
(
void
)
{
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
"r"
(
0x400
),
/* Flush entire TLB!! */
...
...
@@ -231,7 +231,7 @@ extern __inline__ void srmmu_flush_whole_tlb(void)
}
/* These flush types are not available on all chips... */
extern
__inline__
void
srmmu_flush_tlb_ctx
(
void
)
static
inline
void
srmmu_flush_tlb_ctx
(
void
)
{
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
"r"
(
0x300
),
/* Flush TLB ctx.. */
...
...
@@ -239,7 +239,7 @@ extern __inline__ void srmmu_flush_tlb_ctx(void)
}
extern
__inline__
void
srmmu_flush_tlb_region
(
unsigned
long
addr
)
static
inline
void
srmmu_flush_tlb_region
(
unsigned
long
addr
)
{
addr
&=
SRMMU_PGDIR_MASK
;
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
...
...
@@ -249,7 +249,7 @@ extern __inline__ void srmmu_flush_tlb_region(unsigned long addr)
}
extern
__inline__
void
srmmu_flush_tlb_segment
(
unsigned
long
addr
)
static
inline
void
srmmu_flush_tlb_segment
(
unsigned
long
addr
)
{
addr
&=
SRMMU_REAL_PMD_MASK
;
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
...
...
@@ -258,7 +258,7 @@ extern __inline__ void srmmu_flush_tlb_segment(unsigned long addr)
}
extern
__inline__
void
srmmu_flush_tlb_page
(
unsigned
long
page
)
static
inline
void
srmmu_flush_tlb_page
(
unsigned
long
page
)
{
page
&=
PAGE_MASK
;
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
...
...
@@ -267,7 +267,7 @@ extern __inline__ void srmmu_flush_tlb_page(unsigned long page)
}
extern
__inline__
unsigned
long
srmmu_hwprobe
(
unsigned
long
vaddr
)
static
inline
unsigned
long
srmmu_hwprobe
(
unsigned
long
vaddr
)
{
unsigned
long
retval
;
...
...
@@ -279,7 +279,7 @@ extern __inline__ unsigned long srmmu_hwprobe(unsigned long vaddr)
return
retval
;
}
extern
__inline__
int
static
inline
int
srmmu_get_pte
(
unsigned
long
addr
)
{
register
unsigned
long
entry
;
...
...
include/asm-sparc/processor.h
View file @
0d69ae5f
...
...
@@ -79,7 +79,7 @@ struct thread_struct {
extern
unsigned
long
thread_saved_pc
(
struct
task_struct
*
t
);
/* Do necessary setup to start up a newly executed thread. */
extern
__inline__
void
start_thread
(
struct
pt_regs
*
regs
,
unsigned
long
pc
,
static
inline
void
start_thread
(
struct
pt_regs
*
regs
,
unsigned
long
pc
,
unsigned
long
sp
)
{
register
unsigned
long
zero
asm
(
"g1"
);
...
...
include/asm-sparc/psr.h
View file @
0d69ae5f
...
...
@@ -38,7 +38,7 @@
#ifndef __ASSEMBLY__
/* Get the %psr register. */
extern
__inline__
unsigned
int
get_psr
(
void
)
static
inline
unsigned
int
get_psr
(
void
)
{
unsigned
int
psr
;
__asm__
__volatile__
(
...
...
@@ -53,7 +53,7 @@ extern __inline__ unsigned int get_psr(void)
return
psr
;
}
extern
__inline__
void
put_psr
(
unsigned
int
new_psr
)
static
inline
void
put_psr
(
unsigned
int
new_psr
)
{
__asm__
__volatile__
(
"wr %0, 0x0, %%psr
\n\t
"
...
...
@@ -72,7 +72,7 @@ extern __inline__ void put_psr(unsigned int new_psr)
extern
unsigned
int
fsr_storage
;
extern
__inline__
unsigned
int
get_fsr
(
void
)
static
inline
unsigned
int
get_fsr
(
void
)
{
unsigned
int
fsr
=
0
;
...
...
include/asm-sparc/sbi.h
View file @
0d69ae5f
...
...
@@ -65,7 +65,7 @@ struct sbi_regs {
#ifndef __ASSEMBLY__
extern
__inline__
int
acquire_sbi
(
int
devid
,
int
mask
)
static
inline
int
acquire_sbi
(
int
devid
,
int
mask
)
{
__asm__
__volatile__
(
"swapa [%2] %3, %0"
:
"=r"
(
mask
)
:
...
...
@@ -75,7 +75,7 @@ extern __inline__ int acquire_sbi(int devid, int mask)
return
mask
;
}
extern
__inline__
void
release_sbi
(
int
devid
,
int
mask
)
static
inline
void
release_sbi
(
int
devid
,
int
mask
)
{
__asm__
__volatile__
(
"sta %0, [%1] %2"
:
:
"r"
(
mask
),
...
...
@@ -83,7 +83,7 @@ extern __inline__ void release_sbi(int devid, int mask)
"i"
(
ASI_M_CTL
));
}
extern
__inline__
void
set_sbi_tid
(
int
devid
,
int
targetid
)
static
inline
void
set_sbi_tid
(
int
devid
,
int
targetid
)
{
__asm__
__volatile__
(
"sta %0, [%1] %2"
:
:
"r"
(
targetid
),
...
...
@@ -91,7 +91,7 @@ extern __inline__ void set_sbi_tid(int devid, int targetid)
"i"
(
ASI_M_CTL
));
}
extern
__inline__
int
get_sbi_ctl
(
int
devid
,
int
cfgno
)
static
inline
int
get_sbi_ctl
(
int
devid
,
int
cfgno
)
{
int
cfg
;
...
...
@@ -102,7 +102,7 @@ extern __inline__ int get_sbi_ctl(int devid, int cfgno)
return
cfg
;
}
extern
__inline__
void
set_sbi_ctl
(
int
devid
,
int
cfgno
,
int
cfg
)
static
inline
void
set_sbi_ctl
(
int
devid
,
int
cfgno
,
int
cfg
)
{
__asm__
__volatile__
(
"sta %0, [%1] %2"
:
:
"r"
(
cfg
),
...
...
include/asm-sparc/sbus.h
View file @
0d69ae5f
...
...
@@ -28,12 +28,12 @@
* numbers + offsets, and vice versa.
*/
extern
__inline__
unsigned
long
sbus_devaddr
(
int
slotnum
,
unsigned
long
offset
)
static
inline
unsigned
long
sbus_devaddr
(
int
slotnum
,
unsigned
long
offset
)
{
return
(
unsigned
long
)
(
SUN_SBUS_BVADDR
+
((
slotnum
)
<<
25
)
+
(
offset
));
}
extern
__inline__
int
sbus_dev_slot
(
unsigned
long
dev_addr
)
static
inline
int
sbus_dev_slot
(
unsigned
long
dev_addr
)
{
return
(
int
)
(((
dev_addr
)
-
SUN_SBUS_BVADDR
)
>>
25
);
}
...
...
@@ -80,7 +80,7 @@ struct sbus_bus {
extern
struct
sbus_bus
*
sbus_root
;
extern
__inline__
int
static
inline
int
sbus_is_slave
(
struct
sbus_dev
*
dev
)
{
/* XXX Have to write this for sun4c's */
...
...
include/asm-sparc/smp.h
View file @
0d69ae5f
...
...
@@ -60,22 +60,22 @@ BTFIXUPDEF_BLACKBOX(load_current)
#define smp_cross_call(func,arg1,arg2,arg3,arg4,arg5) BTFIXUP_CALL(smp_cross_call)(func,arg1,arg2,arg3,arg4,arg5)
#define smp_message_pass(target,msg,data,wait) BTFIXUP_CALL(smp_message_pass)(target,msg,data,wait)
extern
__inline__
void
xc0
(
smpfunc_t
func
)
{
smp_cross_call
(
func
,
0
,
0
,
0
,
0
,
0
);
}
extern
__inline__
void
xc1
(
smpfunc_t
func
,
unsigned
long
arg1
)
static
inline
void
xc0
(
smpfunc_t
func
)
{
smp_cross_call
(
func
,
0
,
0
,
0
,
0
,
0
);
}
static
inline
void
xc1
(
smpfunc_t
func
,
unsigned
long
arg1
)
{
smp_cross_call
(
func
,
arg1
,
0
,
0
,
0
,
0
);
}
extern
__inline__
void
xc2
(
smpfunc_t
func
,
unsigned
long
arg1
,
unsigned
long
arg2
)
static
inline
void
xc2
(
smpfunc_t
func
,
unsigned
long
arg1
,
unsigned
long
arg2
)
{
smp_cross_call
(
func
,
arg1
,
arg2
,
0
,
0
,
0
);
}
extern
__inline__
void
xc3
(
smpfunc_t
func
,
unsigned
long
arg1
,
unsigned
long
arg2
,
static
inline
void
xc3
(
smpfunc_t
func
,
unsigned
long
arg1
,
unsigned
long
arg2
,
unsigned
long
arg3
)
{
smp_cross_call
(
func
,
arg1
,
arg2
,
arg3
,
0
,
0
);
}
extern
__inline__
void
xc4
(
smpfunc_t
func
,
unsigned
long
arg1
,
unsigned
long
arg2
,
static
inline
void
xc4
(
smpfunc_t
func
,
unsigned
long
arg1
,
unsigned
long
arg2
,
unsigned
long
arg3
,
unsigned
long
arg4
)
{
smp_cross_call
(
func
,
arg1
,
arg2
,
arg3
,
arg4
,
0
);
}
extern
__inline__
void
xc5
(
smpfunc_t
func
,
unsigned
long
arg1
,
unsigned
long
arg2
,
static
inline
void
xc5
(
smpfunc_t
func
,
unsigned
long
arg1
,
unsigned
long
arg2
,
unsigned
long
arg3
,
unsigned
long
arg4
,
unsigned
long
arg5
)
{
smp_cross_call
(
func
,
arg1
,
arg2
,
arg3
,
arg4
,
arg5
);
}
extern
__inline__
int
smp_call_function
(
void
(
*
func
)(
void
*
info
),
void
*
info
,
int
nonatomic
,
int
wait
)
static
inline
int
smp_call_function
(
void
(
*
func
)(
void
*
info
),
void
*
info
,
int
nonatomic
,
int
wait
)
{
xc1
((
smpfunc_t
)
func
,
(
unsigned
long
)
info
);
return
0
;
...
...
@@ -84,16 +84,16 @@ extern __inline__ int smp_call_function(void (*func)(void *info), void *info, in
extern
__volatile__
int
__cpu_number_map
[
NR_CPUS
];
extern
__volatile__
int
__cpu_logical_map
[
NR_CPUS
];
extern
__inline__
int
cpu_logical_map
(
int
cpu
)
static
inline
int
cpu_logical_map
(
int
cpu
)
{
return
__cpu_logical_map
[
cpu
];
}
extern
__inline__
int
cpu_number_map
(
int
cpu
)
static
inline
int
cpu_number_map
(
int
cpu
)
{
return
__cpu_number_map
[
cpu
];
}
extern
__inline__
int
hard_smp4m_processor_id
(
void
)
static
inline
int
hard_smp4m_processor_id
(
void
)
{
int
cpuid
;
...
...
@@ -104,7 +104,7 @@ extern __inline__ int hard_smp4m_processor_id(void)
return
cpuid
;
}
extern
__inline__
int
hard_smp4d_processor_id
(
void
)
static
inline
int
hard_smp4d_processor_id
(
void
)
{
int
cpuid
;
...
...
@@ -114,7 +114,7 @@ extern __inline__ int hard_smp4d_processor_id(void)
}
#ifndef MODULE
extern
__inline__
int
hard_smp_processor_id
(
void
)
static
inline
int
hard_smp_processor_id
(
void
)
{
int
cpuid
;
...
...
@@ -136,7 +136,7 @@ extern __inline__ int hard_smp_processor_id(void)
return
cpuid
;
}
#else
extern
__inline__
int
hard_smp_processor_id
(
void
)
static
inline
int
hard_smp_processor_id
(
void
)
{
int
cpuid
;
...
...
include/asm-sparc/smpprim.h
View file @
0d69ae5f
...
...
@@ -15,7 +15,7 @@
* atomic.
*/
extern
__inline__
__volatile__
char
test_and_set
(
void
*
addr
)
static
inline
__volatile__
char
test_and_set
(
void
*
addr
)
{
char
state
=
0
;
...
...
@@ -27,7 +27,7 @@ extern __inline__ __volatile__ char test_and_set(void *addr)
}
/* Initialize a spin-lock. */
extern
__inline__
__volatile__
smp_initlock
(
void
*
spinlock
)
static
inline
__volatile__
smp_initlock
(
void
*
spinlock
)
{
/* Unset the lock. */
*
((
unsigned
char
*
)
spinlock
)
=
0
;
...
...
@@ -36,7 +36,7 @@ extern __inline__ __volatile__ smp_initlock(void *spinlock)
}
/* This routine spins until it acquires the lock at ADDR. */
extern
__inline__
__volatile__
smp_lock
(
void
*
addr
)
static
inline
__volatile__
smp_lock
(
void
*
addr
)
{
while
(
test_and_set
(
addr
)
==
0xff
)
;
...
...
@@ -46,7 +46,7 @@ extern __inline__ __volatile__ smp_lock(void *addr)
}
/* This routine releases the lock at ADDR. */
extern
__inline__
__volatile__
smp_unlock
(
void
*
addr
)
static
inline
__volatile__
smp_unlock
(
void
*
addr
)
{
*
((
unsigned
char
*
)
addr
)
=
0
;
}
...
...
include/asm-sparc/spinlock.h
View file @
0d69ae5f
...
...
@@ -17,7 +17,7 @@
#define __raw_spin_unlock_wait(lock) \
do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0)
extern
__inline__
void
__raw_spin_lock
(
raw_spinlock_t
*
lock
)
static
inline
void
__raw_spin_lock
(
raw_spinlock_t
*
lock
)
{
__asm__
__volatile__
(
"
\n
1:
\n\t
"
...
...
@@ -37,7 +37,7 @@ extern __inline__ void __raw_spin_lock(raw_spinlock_t *lock)
:
"g2"
,
"memory"
,
"cc"
);
}
extern
__inline__
int
__raw_spin_trylock
(
raw_spinlock_t
*
lock
)
static
inline
int
__raw_spin_trylock
(
raw_spinlock_t
*
lock
)
{
unsigned
int
result
;
__asm__
__volatile__
(
"ldstub [%1], %0"
...
...
@@ -47,7 +47,7 @@ extern __inline__ int __raw_spin_trylock(raw_spinlock_t *lock)
return
(
result
==
0
);
}
extern
__inline__
void
__raw_spin_unlock
(
raw_spinlock_t
*
lock
)
static
inline
void
__raw_spin_unlock
(
raw_spinlock_t
*
lock
)
{
__asm__
__volatile__
(
"stb %%g0, [%0]"
:
:
"r"
(
lock
)
:
"memory"
);
}
...
...
@@ -78,7 +78,7 @@ extern __inline__ void __raw_spin_unlock(raw_spinlock_t *lock)
*
* Unfortunately this scheme limits us to ~16,000,000 cpus.
*/
extern
__inline__
void
__read_lock
(
raw_rwlock_t
*
rw
)
static
inline
void
__read_lock
(
raw_rwlock_t
*
rw
)
{
register
raw_rwlock_t
*
lp
asm
(
"g1"
);
lp
=
rw
;
...
...
@@ -98,7 +98,7 @@ do { unsigned long flags; \
local_irq_restore(flags); \
} while(0)
extern
__inline__
void
__read_unlock
(
raw_rwlock_t
*
rw
)
static
inline
void
__read_unlock
(
raw_rwlock_t
*
rw
)
{
register
raw_rwlock_t
*
lp
asm
(
"g1"
);
lp
=
rw
;
...
...
include/asm-sparc/system.h
View file @
0d69ae5f
...
...
@@ -204,7 +204,7 @@ static inline unsigned long getipl(void)
BTFIXUPDEF_CALL
(
void
,
___xchg32
,
void
)
#endif
extern
__inline__
unsigned
long
xchg_u32
(
__volatile__
unsigned
long
*
m
,
unsigned
long
val
)
static
inline
unsigned
long
xchg_u32
(
__volatile__
unsigned
long
*
m
,
unsigned
long
val
)
{
#ifdef CONFIG_SMP
__asm__
__volatile__
(
"swap [%2], %0"
...
...
include/asm-sparc/traps.h
View file @
0d69ae5f
...
...
@@ -22,7 +22,7 @@ struct tt_entry {
/* We set this to _start in system setup. */
extern
struct
tt_entry
*
sparc_ttable
;
extern
__inline__
unsigned
long
get_tbr
(
void
)
static
inline
unsigned
long
get_tbr
(
void
)
{
unsigned
long
tbr
;
...
...
include/asm-um/processor-generic.h
View file @
0d69ae5f
...
...
@@ -13,6 +13,7 @@ struct task_struct;
#include "linux/config.h"
#include "asm/ptrace.h"
#include "choose-mode.h"
#include "registers.h"
struct
mm_struct
;
...
...
@@ -136,19 +137,15 @@ extern struct cpuinfo_um cpu_data[];
#define current_cpu_data boot_cpu_data
#endif
#define KSTK_EIP(tsk) (PT_REGS_IP(&tsk->thread.regs))
#define KSTK_ESP(tsk) (PT_REGS_SP(&tsk->thread.regs))
#define get_wchan(p) (0)
#ifdef CONFIG_MODE_SKAS
#define KSTK_REG(tsk, reg) \
({ union uml_pt_regs regs; \
get_thread_regs(®s, tsk->thread.mode.skas.switch_buf); \
UPT_REG(®s, reg); })
#else
#define KSTK_REG(tsk, reg) (0xbadbabe)
#endif
#define get_wchan(p) (0)
/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* Emacs will notice this stuff at the end of the file and automatically
* adjust the settings for this buffer only. This must remain at the end
* of the file.
* ---------------------------------------------------------------------------
* Local variables:
* c-file-style: "linux"
* End:
*/
#endif
include/asm-um/processor-i386.h
View file @
0d69ae5f
...
...
@@ -43,17 +43,10 @@ static inline void rep_nop(void)
#define ARCH_IS_STACKGROW(address) \
(address + 32 >= UPT_SP(¤t->thread.regs.regs))
#define KSTK_EIP(tsk) KSTK_REG(tsk, EIP)
#define KSTK_ESP(tsk) KSTK_REG(tsk, UESP)
#define KSTK_EBP(tsk) KSTK_REG(tsk, EBP)
#include "asm/processor-generic.h"
#endif
/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* Emacs will notice this stuff at the end of the file and automatically
* adjust the settings for this buffer only. This must remain at the end
* of the file.
* ---------------------------------------------------------------------------
* Local variables:
* c-file-style: "linux"
* End:
*/
include/asm-um/processor-x86_64.h
View file @
0d69ae5f
...
...
@@ -36,17 +36,9 @@ extern inline void rep_nop(void)
#define ARCH_IS_STACKGROW(address) \
(address + 128 >= UPT_SP(¤t->thread.regs.regs))
#define KSTK_EIP(tsk) KSTK_REG(tsk, RIP)
#define KSTK_ESP(tsk) KSTK_REG(tsk, RSP)
#include "asm/processor-generic.h"
#endif
/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* Emacs will notice this stuff at the end of the file and automatically
* adjust the settings for this buffer only. This must remain at the end
* of the file.
* ---------------------------------------------------------------------------
* Local variables:
* c-file-style: "linux"
* End:
*/
include/linux/bfs_fs.h
View file @
0d69ae5f
...
...
@@ -20,19 +20,19 @@
/* BFS inode layout on disk */
struct
bfs_inode
{
__
u
16
i_ino
;
__
le
16
i_ino
;
__u16
i_unused
;
__
u
32
i_sblock
;
__
u
32
i_eblock
;
__
u
32
i_eoffset
;
__
u
32
i_vtype
;
__
u
32
i_mode
;
__
s
32
i_uid
;
__
s
32
i_gid
;
__
u
32
i_nlink
;
__
u
32
i_atime
;
__
u
32
i_mtime
;
__
u
32
i_ctime
;
__
le
32
i_sblock
;
__
le
32
i_eblock
;
__
le
32
i_eoffset
;
__
le
32
i_vtype
;
__
le
32
i_mode
;
__
le
32
i_uid
;
__
le
32
i_gid
;
__
le
32
i_nlink
;
__
le
32
i_atime
;
__
le
32
i_mtime
;
__
le
32
i_ctime
;
__u32
i_padding
[
4
];
};
...
...
@@ -41,17 +41,17 @@ struct bfs_inode {
#define BFS_DIRS_PER_BLOCK 32
struct
bfs_dirent
{
__
u
16
ino
;
__
le
16
ino
;
char
name
[
BFS_NAMELEN
];
};
/* BFS superblock layout on disk */
struct
bfs_super_block
{
__
u
32
s_magic
;
__
u
32
s_start
;
__
u
32
s_end
;
__
s
32
s_from
;
__
s
32
s_to
;
__
le
32
s_magic
;
__
le
32
s_start
;
__
le
32
s_end
;
__
le
32
s_from
;
__
le
32
s_to
;
__s32
s_bfrom
;
__s32
s_bto
;
char
s_fsname
[
6
];
...
...
@@ -66,15 +66,15 @@ struct bfs_super_block {
#define BFS_INO2OFF(ino) \
((__u32)(((ino) - BFS_ROOT_INO) * sizeof(struct bfs_inode)) + BFS_BSIZE)
#define BFS_NZFILESIZE(ip) \
((
cpu_to_le32((ip)->i_eoffset) + 1) - cpu_to_le32
((ip)->i_sblock) * BFS_BSIZE)
((
le32_to_cpu((ip)->i_eoffset) + 1) - le32_to_cpu
((ip)->i_sblock) * BFS_BSIZE)
#define BFS_FILESIZE(ip) \
((ip)->i_sblock == 0 ? 0 : BFS_NZFILESIZE(ip))
#define BFS_FILEBLOCKS(ip) \
((ip)->i_sblock == 0 ? 0 : (
cpu_to_le32((ip)->i_eblock) + 1) - cpu_to_le32
((ip)->i_sblock))
((ip)->i_sblock == 0 ? 0 : (
le32_to_cpu((ip)->i_eblock) + 1) - le32_to_cpu
((ip)->i_sblock))
#define BFS_UNCLEAN(bfs_sb, sb) \
((
cpu_to_le32(bfs_sb->s_from) != -1) && (cpu_to_le32
(bfs_sb->s_to) != -1) && !(sb->s_flags & MS_RDONLY))
((
le32_to_cpu(bfs_sb->s_from) != -1) && (le32_to_cpu
(bfs_sb->s_to) != -1) && !(sb->s_flags & MS_RDONLY))
#endif
/* _LINUX_BFS_FS_H */
net/ipv4/fib_trie.c
View file @
0d69ae5f
...
...
@@ -286,6 +286,8 @@ static inline void check_tnode(const struct tnode *tn)
static
int
halve_threshold
=
25
;
static
int
inflate_threshold
=
50
;
static
int
halve_threshold_root
=
15
;
static
int
inflate_threshold_root
=
25
;
static
void
__alias_free_mem
(
struct
rcu_head
*
head
)
...
...
@@ -449,6 +451,8 @@ static struct node *resize(struct trie *t, struct tnode *tn)
int
i
;
int
err
=
0
;
struct
tnode
*
old_tn
;
int
inflate_threshold_use
;
int
halve_threshold_use
;
if
(
!
tn
)
return
NULL
;
...
...
@@ -541,10 +545,17 @@ static struct node *resize(struct trie *t, struct tnode *tn)
check_tnode
(
tn
);
/* Keep root node larger */
if
(
!
tn
->
parent
)
inflate_threshold_use
=
inflate_threshold_root
;
else
inflate_threshold_use
=
inflate_threshold
;
err
=
0
;
while
((
tn
->
full_children
>
0
&&
50
*
(
tn
->
full_children
+
tnode_child_length
(
tn
)
-
tn
->
empty_children
)
>=
inflate_threshold
*
tnode_child_length
(
tn
)))
{
inflate_threshold
_use
*
tnode_child_length
(
tn
)))
{
old_tn
=
tn
;
tn
=
inflate
(
t
,
tn
);
...
...
@@ -564,10 +575,18 @@ static struct node *resize(struct trie *t, struct tnode *tn)
* node is above threshold.
*/
/* Keep root node larger */
if
(
!
tn
->
parent
)
halve_threshold_use
=
halve_threshold_root
;
else
halve_threshold_use
=
halve_threshold
;
err
=
0
;
while
(
tn
->
bits
>
1
&&
100
*
(
tnode_child_length
(
tn
)
-
tn
->
empty_children
)
<
halve_threshold
*
tnode_child_length
(
tn
))
{
halve_threshold
_use
*
tnode_child_length
(
tn
))
{
old_tn
=
tn
;
tn
=
halve
(
t
,
tn
);
...
...
net/ipv6/udp.c
View file @
0d69ae5f
...
...
@@ -99,7 +99,7 @@ static int udp_v6_get_port(struct sock *sk, unsigned short snum)
next:
;
}
result
=
best
;
for
(
;;
result
+=
UDP_HTABLE_SIZE
)
{
for
(
i
=
0
;
i
<
(
1
<<
16
)
/
UDP_HTABLE_SIZE
;
i
++
,
result
+=
UDP_HTABLE_SIZE
)
{
if
(
result
>
sysctl_local_port_range
[
1
])
result
=
sysctl_local_port_range
[
0
]
+
((
result
-
sysctl_local_port_range
[
0
])
&
...
...
@@ -107,6 +107,8 @@ static int udp_v6_get_port(struct sock *sk, unsigned short snum)
if
(
!
udp_lport_inuse
(
result
))
break
;
}
if
(
i
>=
(
1
<<
16
)
/
UDP_HTABLE_SIZE
)
goto
fail
;
gotit:
udp_port_rover
=
snum
=
result
;
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment