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
nexedi
linux
Commits
c2e2d4f7
Commit
c2e2d4f7
authored
Jun 03, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://ldm.bkbits.net/linux-2.5-core
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
ed2110ce
6f79387d
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
727 additions
and
271 deletions
+727
-271
arch/i386/kernel/smp.c
arch/i386/kernel/smp.c
+0
-11
arch/ia64/kernel/smp.c
arch/ia64/kernel/smp.c
+0
-18
arch/ppc64/kernel/smp.c
arch/ppc64/kernel/smp.c
+0
-11
drivers/ide/ide-proc.c
drivers/ide/ide-proc.c
+1
-35
drivers/ide/ide.c
drivers/ide/ide.c
+4
-2
fs/bio.c
fs/bio.c
+1
-1
fs/dquot.c
fs/dquot.c
+79
-13
fs/libfs.c
fs/libfs.c
+1
-1
include/asm-i386/smp.h
include/asm-i386/smp.h
+0
-1
include/asm-ia64/smp.h
include/asm-ia64/smp.h
+0
-2
include/asm-ppc64/smp.h
include/asm-ppc64/smp.h
+0
-1
include/asm-x86_64/smp.h
include/asm-x86_64/smp.h
+0
-1
include/linux/ide.h
include/linux/ide.h
+0
-1
include/linux/smp.h
include/linux/smp.h
+0
-1
kernel/exec_domain.c
kernel/exec_domain.c
+62
-20
kernel/resource.c
kernel/resource.c
+13
-2
kernel/sysctl.c
kernel/sysctl.c
+566
-150
No files found.
arch/i386/kernel/smp.c
View file @
c2e2d4f7
...
@@ -460,17 +460,6 @@ void smp_send_reschedule(int cpu)
...
@@ -460,17 +460,6 @@ void smp_send_reschedule(int cpu)
send_IPI_mask
(
1
<<
cpu
,
RESCHEDULE_VECTOR
);
send_IPI_mask
(
1
<<
cpu
,
RESCHEDULE_VECTOR
);
}
}
/*
* this function sends a reschedule IPI to all (other) CPUs.
* This should only be used if some 'global' task became runnable,
* such as a RT task, that must be handled now. The first CPU
* that manages to grab the task will run it.
*/
void
smp_send_reschedule_all
(
void
)
{
send_IPI_allbutself
(
RESCHEDULE_VECTOR
);
}
/*
/*
* Structure and data for smp_call_function(). This is designed to minimise
* Structure and data for smp_call_function(). This is designed to minimise
* static memory requirements. It also looks cleaner.
* static memory requirements. It also looks cleaner.
...
...
arch/ia64/kernel/smp.c
View file @
c2e2d4f7
...
@@ -205,24 +205,6 @@ smp_send_reschedule (int cpu)
...
@@ -205,24 +205,6 @@ smp_send_reschedule (int cpu)
platform_send_ipi
(
cpu
,
IA64_IPI_RESCHEDULE
,
IA64_IPI_DM_INT
,
0
);
platform_send_ipi
(
cpu
,
IA64_IPI_RESCHEDULE
,
IA64_IPI_DM_INT
,
0
);
}
}
/*
* This function sends a reschedule IPI to all (other) CPUs. This should only be used if
* some 'global' task became runnable, such as a RT task, that must be handled now. The
* first CPU that manages to grab the task will run it.
*/
void
smp_send_reschedule_all
(
void
)
{
int
i
;
int
cpu
=
get_cpu
();
/* disable preemption */
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
if
(
cpu_online
(
i
)
&&
i
!=
cpu
)
smp_send_reschedule
(
i
);
put_cpu
();
}
void
void
smp_flush_tlb_all
(
void
)
smp_flush_tlb_all
(
void
)
{
{
...
...
arch/ppc64/kernel/smp.c
View file @
c2e2d4f7
...
@@ -392,17 +392,6 @@ void smp_send_reschedule(int cpu)
...
@@ -392,17 +392,6 @@ void smp_send_reschedule(int cpu)
smp_message_pass
(
cpu
,
PPC_MSG_RESCHEDULE
,
0
,
0
);
smp_message_pass
(
cpu
,
PPC_MSG_RESCHEDULE
,
0
,
0
);
}
}
/*
* this function sends a reschedule IPI to all (other) CPUs.
* This should only be used if some 'global' task became runnable,
* such as a RT task, that must be handled now. The first CPU
* that manages to grab the task will run it.
*/
void
smp_send_reschedule_all
(
void
)
{
smp_message_pass
(
MSG_ALL_BUT_SELF
,
PPC_MSG_RESCHEDULE
,
0
,
0
);
}
#ifdef CONFIG_XMON
#ifdef CONFIG_XMON
void
smp_send_xmon_break
(
int
cpu
)
void
smp_send_xmon_break
(
int
cpu
)
{
{
...
...
drivers/ide/ide-proc.c
View file @
c2e2d4f7
...
@@ -712,7 +712,6 @@ void create_proc_ide_drives(ide_hwif_t *hwif)
...
@@ -712,7 +712,6 @@ void create_proc_ide_drives(ide_hwif_t *hwif)
for
(
d
=
0
;
d
<
MAX_DRIVES
;
d
++
)
{
for
(
d
=
0
;
d
<
MAX_DRIVES
;
d
++
)
{
ide_drive_t
*
drive
=
&
hwif
->
drives
[
d
];
ide_drive_t
*
drive
=
&
hwif
->
drives
[
d
];
ide_driver_t
*
driver
=
drive
->
driver
;
if
(
!
drive
->
present
)
if
(
!
drive
->
present
)
continue
;
continue
;
...
@@ -720,13 +719,8 @@ void create_proc_ide_drives(ide_hwif_t *hwif)
...
@@ -720,13 +719,8 @@ void create_proc_ide_drives(ide_hwif_t *hwif)
continue
;
continue
;
drive
->
proc
=
proc_mkdir
(
drive
->
name
,
parent
);
drive
->
proc
=
proc_mkdir
(
drive
->
name
,
parent
);
if
(
drive
->
proc
)
{
if
(
drive
->
proc
)
ide_add_proc_entries
(
drive
->
proc
,
generic_drive_entries
,
drive
);
ide_add_proc_entries
(
drive
->
proc
,
generic_drive_entries
,
drive
);
if
(
driver
)
{
ide_add_proc_entries
(
drive
->
proc
,
generic_subdriver_entries
,
drive
);
ide_add_proc_entries
(
drive
->
proc
,
driver
->
proc
,
drive
);
}
}
sprintf
(
name
,
"ide%d/%s"
,
(
drive
->
name
[
2
]
-
'a'
)
/
2
,
drive
->
name
);
sprintf
(
name
,
"ide%d/%s"
,
(
drive
->
name
[
2
]
-
'a'
)
/
2
,
drive
->
name
);
ent
=
proc_symlink
(
drive
->
name
,
proc_ide_root
,
name
);
ent
=
proc_symlink
(
drive
->
name
,
proc_ide_root
,
name
);
if
(
!
ent
)
return
;
if
(
!
ent
)
return
;
...
@@ -735,34 +729,6 @@ void create_proc_ide_drives(ide_hwif_t *hwif)
...
@@ -735,34 +729,6 @@ void create_proc_ide_drives(ide_hwif_t *hwif)
EXPORT_SYMBOL
(
create_proc_ide_drives
);
EXPORT_SYMBOL
(
create_proc_ide_drives
);
void
recreate_proc_ide_device
(
ide_hwif_t
*
hwif
,
ide_drive_t
*
drive
)
{
struct
proc_dir_entry
*
ent
;
struct
proc_dir_entry
*
parent
=
hwif
->
proc
;
char
name
[
64
];
if
(
drive
->
present
&&
!
drive
->
proc
)
{
drive
->
proc
=
proc_mkdir
(
drive
->
name
,
parent
);
if
(
drive
->
proc
)
ide_add_proc_entries
(
drive
->
proc
,
generic_drive_entries
,
drive
);
/*
* assume that we have these already, however, should test FIXME!
* if (driver) {
* ide_add_proc_entries(drive->proc, generic_subdriver_entries, drive);
* ide_add_proc_entries(drive->proc, driver->proc, drive);
* }
*
*/
sprintf
(
name
,
"ide%d/%s"
,
(
drive
->
name
[
2
]
-
'a'
)
/
2
,
drive
->
name
);
ent
=
proc_symlink
(
drive
->
name
,
proc_ide_root
,
name
);
if
(
!
ent
)
return
;
}
}
EXPORT_SYMBOL
(
recreate_proc_ide_device
);
void
destroy_proc_ide_device
(
ide_hwif_t
*
hwif
,
ide_drive_t
*
drive
)
void
destroy_proc_ide_device
(
ide_hwif_t
*
hwif
,
ide_drive_t
*
drive
)
{
{
ide_driver_t
*
driver
=
drive
->
driver
;
ide_driver_t
*
driver
=
drive
->
driver
;
...
...
drivers/ide/ide.c
View file @
c2e2d4f7
...
@@ -2349,8 +2349,10 @@ int ide_register_subdriver (ide_drive_t *drive, ide_driver_t *driver, int versio
...
@@ -2349,8 +2349,10 @@ int ide_register_subdriver (ide_drive_t *drive, ide_driver_t *driver, int versio
}
}
drive
->
suspend_reset
=
0
;
drive
->
suspend_reset
=
0
;
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
if
(
drive
->
driver
!=
&
idedefault_driver
)
{
ide_add_proc_entries
(
drive
->
proc
,
generic_subdriver_entries
,
drive
);
ide_add_proc_entries
(
drive
->
proc
,
generic_subdriver_entries
,
drive
);
ide_add_proc_entries
(
drive
->
proc
,
driver
->
proc
,
drive
);
ide_add_proc_entries
(
drive
->
proc
,
driver
->
proc
,
drive
);
}
#endif
#endif
return
0
;
return
0
;
}
}
...
...
fs/bio.c
View file @
c2e2d4f7
...
@@ -53,7 +53,7 @@ struct biovec_pool {
...
@@ -53,7 +53,7 @@ struct biovec_pool {
* unsigned short
* unsigned short
*/
*/
#define BV(x) {
x,
"biovec-" #x }
#define BV(x) {
.nr_vecs = x, .name =
"biovec-" #x }
static
struct
biovec_pool
bvec_array
[
BIOVEC_NR_POOLS
]
=
{
static
struct
biovec_pool
bvec_array
[
BIOVEC_NR_POOLS
]
=
{
BV
(
1
),
BV
(
4
),
BV
(
16
),
BV
(
64
),
BV
(
128
),
BV
(
BIO_MAX_PAGES
),
BV
(
1
),
BV
(
4
),
BV
(
16
),
BV
(
64
),
BV
(
128
),
BV
(
BIO_MAX_PAGES
),
};
};
...
...
fs/dquot.c
View file @
c2e2d4f7
...
@@ -1348,25 +1348,91 @@ struct quotactl_ops vfs_quotactl_ops = {
...
@@ -1348,25 +1348,91 @@ struct quotactl_ops vfs_quotactl_ops = {
};
};
static
ctl_table
fs_dqstats_table
[]
=
{
static
ctl_table
fs_dqstats_table
[]
=
{
{
FS_DQ_LOOKUPS
,
"lookups"
,
&
dqstats
.
lookups
,
sizeof
(
int
),
0444
,
NULL
,
&
proc_dointvec
},
{
{
FS_DQ_DROPS
,
"drops"
,
&
dqstats
.
drops
,
sizeof
(
int
),
0444
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
FS_DQ_LOOKUPS
,
{
FS_DQ_READS
,
"reads"
,
&
dqstats
.
reads
,
sizeof
(
int
),
0444
,
NULL
,
&
proc_dointvec
},
.
procname
=
"lookups"
,
{
FS_DQ_WRITES
,
"writes"
,
&
dqstats
.
writes
,
sizeof
(
int
),
0444
,
NULL
,
&
proc_dointvec
},
.
data
=
&
dqstats
.
lookups
,
{
FS_DQ_CACHE_HITS
,
"cache_hits"
,
&
dqstats
.
cache_hits
,
sizeof
(
int
),
0444
,
NULL
,
&
proc_dointvec
},
.
maxlen
=
sizeof
(
int
),
{
FS_DQ_ALLOCATED
,
"allocated_dquots"
,
&
dqstats
.
allocated_dquots
,
sizeof
(
int
),
0444
,
NULL
,
&
proc_dointvec
},
.
mode
=
0444
,
{
FS_DQ_FREE
,
"free_dquots"
,
&
dqstats
.
free_dquots
,
sizeof
(
int
),
0444
,
NULL
,
&
proc_dointvec
},
.
proc_handler
=
&
proc_dointvec
,
{
FS_DQ_SYNCS
,
"syncs"
,
&
dqstats
.
syncs
,
sizeof
(
int
),
0444
,
NULL
,
&
proc_dointvec
},
},
{},
{
.
ctl_name
=
FS_DQ_DROPS
,
.
procname
=
"drops"
,
.
data
=
&
dqstats
.
drops
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0444
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
FS_DQ_READS
,
.
procname
=
"reads"
,
.
data
=
&
dqstats
.
reads
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0444
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
FS_DQ_WRITES
,
.
procname
=
"writes"
,
.
data
=
&
dqstats
.
writes
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0444
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
FS_DQ_CACHE_HITS
,
.
procname
=
"cache_hits"
,
.
data
=
&
dqstats
.
cache_hits
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0444
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
FS_DQ_ALLOCATED
,
.
procname
=
"allocated_dquots"
,
.
data
=
&
dqstats
.
allocated_dquots
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0444
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
FS_DQ_FREE
,
.
procname
=
"free_dquots"
,
.
data
=
&
dqstats
.
free_dquots
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0444
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
FS_DQ_SYNCS
,
.
procname
=
"syncs"
,
.
data
=
&
dqstats
.
syncs
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0444
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
0
},
};
};
static
ctl_table
fs_table
[]
=
{
static
ctl_table
fs_table
[]
=
{
{
FS_DQSTATS
,
"quota"
,
NULL
,
0
,
0555
,
fs_dqstats_table
},
{
{},
.
ctl_name
=
FS_DQSTATS
,
.
procname
=
"quota"
,
.
mode
=
0555
,
.
child
=
fs_dqstats_table
,
},
{
.
ctl_name
=
0
},
};
};
static
ctl_table
sys_table
[]
=
{
static
ctl_table
sys_table
[]
=
{
{
CTL_FS
,
"fs"
,
NULL
,
0
,
0555
,
fs_table
},
{
{},
.
ctl_name
=
CTL_FS
,
.
procname
=
"fs"
,
.
mode
=
0555
,
.
child
=
fs_table
,
},
{
.
ctl_name
=
0
},
};
};
/* SLAB cache for dquot structures */
/* SLAB cache for dquot structures */
...
...
fs/libfs.c
View file @
c2e2d4f7
...
@@ -336,7 +336,7 @@ int simple_commit_write(struct file *file, struct page *page,
...
@@ -336,7 +336,7 @@ int simple_commit_write(struct file *file, struct page *page,
int
simple_fill_super
(
struct
super_block
*
s
,
int
magic
,
struct
tree_descr
*
files
)
int
simple_fill_super
(
struct
super_block
*
s
,
int
magic
,
struct
tree_descr
*
files
)
{
{
static
struct
super_operations
s_ops
=
{
statfs
:
simple_statfs
};
static
struct
super_operations
s_ops
=
{
.
statfs
=
simple_statfs
};
struct
inode
*
inode
;
struct
inode
*
inode
;
struct
dentry
*
root
;
struct
dentry
*
root
;
struct
dentry
*
dentry
;
struct
dentry
*
dentry
;
...
...
include/asm-i386/smp.h
View file @
c2e2d4f7
...
@@ -41,7 +41,6 @@ extern int cpu_sibling_map[];
...
@@ -41,7 +41,6 @@ extern int cpu_sibling_map[];
extern
void
smp_flush_tlb
(
void
);
extern
void
smp_flush_tlb
(
void
);
extern
void
smp_message_irq
(
int
cpl
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
extern
void
smp_message_irq
(
int
cpl
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
extern
void
smp_send_reschedule
(
int
cpu
);
extern
void
smp_send_reschedule
(
int
cpu
);
extern
void
smp_send_reschedule_all
(
void
);
extern
void
smp_invalidate_rcv
(
void
);
/* Process an NMI */
extern
void
smp_invalidate_rcv
(
void
);
/* Process an NMI */
extern
void
(
*
mtrr_hook
)
(
void
);
extern
void
(
*
mtrr_hook
)
(
void
);
extern
void
zap_low_mappings
(
void
);
extern
void
zap_low_mappings
(
void
);
...
...
include/asm-ia64/smp.h
View file @
c2e2d4f7
...
@@ -136,8 +136,6 @@ extern void smp_do_timer (struct pt_regs *regs);
...
@@ -136,8 +136,6 @@ extern void smp_do_timer (struct pt_regs *regs);
extern
int
smp_call_function_single
(
int
cpuid
,
void
(
*
func
)
(
void
*
info
),
void
*
info
,
extern
int
smp_call_function_single
(
int
cpuid
,
void
(
*
func
)
(
void
*
info
),
void
*
info
,
int
retry
,
int
wait
);
int
retry
,
int
wait
);
extern
void
smp_send_reschedule
(
int
cpu
);
extern
void
smp_send_reschedule
(
int
cpu
);
extern
void
smp_send_reschedule_all
(
void
);
#endif
/* CONFIG_SMP */
#endif
/* CONFIG_SMP */
#endif
/* _ASM_IA64_SMP_H */
#endif
/* _ASM_IA64_SMP_H */
include/asm-ppc64/smp.h
View file @
c2e2d4f7
...
@@ -34,7 +34,6 @@ extern void smp_send_tlb_invalidate(int);
...
@@ -34,7 +34,6 @@ extern void smp_send_tlb_invalidate(int);
extern
void
smp_send_xmon_break
(
int
cpu
);
extern
void
smp_send_xmon_break
(
int
cpu
);
struct
pt_regs
;
struct
pt_regs
;
extern
void
smp_message_recv
(
int
,
struct
pt_regs
*
);
extern
void
smp_message_recv
(
int
,
struct
pt_regs
*
);
extern
void
smp_send_reschedule_all
(
void
);
#define NO_PROC_ID 0xFF
/* No processor magic marker */
#define NO_PROC_ID 0xFF
/* No processor magic marker */
...
...
include/asm-x86_64/smp.h
View file @
c2e2d4f7
...
@@ -42,7 +42,6 @@ extern int pic_mode;
...
@@ -42,7 +42,6 @@ extern int pic_mode;
extern
void
smp_flush_tlb
(
void
);
extern
void
smp_flush_tlb
(
void
);
extern
void
smp_message_irq
(
int
cpl
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
extern
void
smp_message_irq
(
int
cpl
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
extern
void
smp_send_reschedule
(
int
cpu
);
extern
void
smp_send_reschedule
(
int
cpu
);
extern
void
smp_send_reschedule_all
(
void
);
extern
void
smp_invalidate_rcv
(
void
);
/* Process an NMI */
extern
void
smp_invalidate_rcv
(
void
);
/* Process an NMI */
extern
void
(
*
mtrr_hook
)
(
void
);
extern
void
(
*
mtrr_hook
)
(
void
);
extern
void
zap_low_mappings
(
void
);
extern
void
zap_low_mappings
(
void
);
...
...
include/linux/ide.h
View file @
c2e2d4f7
...
@@ -1115,7 +1115,6 @@ typedef struct {
...
@@ -1115,7 +1115,6 @@ typedef struct {
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
extern
void
proc_ide_create
(
void
);
extern
void
proc_ide_create
(
void
);
extern
void
proc_ide_destroy
(
void
);
extern
void
proc_ide_destroy
(
void
);
extern
void
recreate_proc_ide_device
(
ide_hwif_t
*
,
ide_drive_t
*
);
extern
void
destroy_proc_ide_device
(
ide_hwif_t
*
,
ide_drive_t
*
);
extern
void
destroy_proc_ide_device
(
ide_hwif_t
*
,
ide_drive_t
*
);
extern
void
destroy_proc_ide_drives
(
ide_hwif_t
*
);
extern
void
destroy_proc_ide_drives
(
ide_hwif_t
*
);
extern
void
create_proc_ide_interfaces
(
void
);
extern
void
create_proc_ide_interfaces
(
void
);
...
...
include/linux/smp.h
View file @
c2e2d4f7
...
@@ -110,7 +110,6 @@ void smp_prepare_boot_cpu(void);
...
@@ -110,7 +110,6 @@ void smp_prepare_boot_cpu(void);
#define smp_call_function(func,info,retry,wait) ({ 0; })
#define smp_call_function(func,info,retry,wait) ({ 0; })
#define on_each_cpu(func,info,retry,wait) ({ func(info); 0; })
#define on_each_cpu(func,info,retry,wait) ({ func(info); 0; })
static
inline
void
smp_send_reschedule
(
int
cpu
)
{
}
static
inline
void
smp_send_reschedule
(
int
cpu
)
{
}
static
inline
void
smp_send_reschedule_all
(
void
)
{
}
#define cpu_online_map 1
#define cpu_online_map 1
#define cpu_online(cpu) ({ BUG_ON((cpu) != 0); 1; })
#define cpu_online(cpu) ({ BUG_ON((cpu) != 0); 1; })
#define num_online_cpus() 1
#define num_online_cpus() 1
...
...
kernel/exec_domain.c
View file @
c2e2d4f7
...
@@ -32,11 +32,12 @@ static u_long ident_map[32] = {
...
@@ -32,11 +32,12 @@ static u_long ident_map[32] = {
};
};
struct
exec_domain
default_exec_domain
=
{
struct
exec_domain
default_exec_domain
=
{
"Linux"
,
/* name */
.
name
=
"Linux"
,
/* name */
default_handler
,
/* lcall7 causes a seg fault. */
.
handler
=
default_handler
,
/* lcall7 causes a seg fault. */
0
,
0
,
/* PER_LINUX personality. */
.
pers_low
=
0
,
/* PER_LINUX personality. */
ident_map
,
/* Identity map signals. */
.
pers_high
=
0
,
/* PER_LINUX personality. */
ident_map
,
/* - both ways. */
.
signal_map
=
ident_map
,
/* Identity map signals. */
.
signal_invmap
=
ident_map
,
/* - both ways. */
};
};
...
@@ -247,24 +248,65 @@ u_int abi_traceflg;
...
@@ -247,24 +248,65 @@ u_int abi_traceflg;
int
abi_fake_utsname
;
int
abi_fake_utsname
;
static
struct
ctl_table
abi_table
[]
=
{
static
struct
ctl_table
abi_table
[]
=
{
{
ABI_DEFHANDLER_COFF
,
"defhandler_coff"
,
&
abi_defhandler_coff
,
{
sizeof
(
int
),
0644
,
NULL
,
&
proc_doulongvec_minmax
},
.
ctl_name
=
ABI_DEFHANDLER_COFF
,
{
ABI_DEFHANDLER_ELF
,
"defhandler_elf"
,
&
abi_defhandler_elf
,
.
procname
=
"defhandler_coff"
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_doulongvec_minmax
},
.
data
=
&
abi_defhandler_coff
,
{
ABI_DEFHANDLER_LCALL7
,
"defhandler_lcall7"
,
&
abi_defhandler_lcall7
,
.
maxlen
=
sizeof
(
int
),
sizeof
(
int
),
0644
,
NULL
,
&
proc_doulongvec_minmax
},
.
mode
=
0644
,
{
ABI_DEFHANDLER_LIBCSO
,
"defhandler_libcso"
,
&
abi_defhandler_libcso
,
.
proc_handler
=
&
proc_doulongvec_minmax
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_doulongvec_minmax
},
},
{
ABI_TRACE
,
"trace"
,
&
abi_traceflg
,
{
sizeof
(
u_int
),
0644
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
ABI_DEFHANDLER_ELF
,
{
ABI_FAKE_UTSNAME
,
"fake_utsname"
,
&
abi_fake_utsname
,
.
procname
=
"defhandler_elf"
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
.
data
=
&
abi_defhandler_elf
,
{
0
}
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_doulongvec_minmax
,
},
{
.
ctl_name
=
ABI_DEFHANDLER_LCALL7
,
.
procname
=
"defhandler_lcall7"
,
.
data
=
&
abi_defhandler_lcall7
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_doulongvec_minmax
,
},
{
.
ctl_name
=
ABI_DEFHANDLER_LIBCSO
,
.
procname
=
"defhandler_libcso"
,
.
data
=
&
abi_defhandler_libcso
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_doulongvec_minmax
,
},
{
.
ctl_name
=
ABI_TRACE
,
.
procname
=
"trace"
,
.
data
=
&
abi_traceflg
,
.
maxlen
=
sizeof
(
u_int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
ABI_FAKE_UTSNAME
,
.
procname
=
"fake_utsname"
,
.
data
=
&
abi_fake_utsname
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
0
}
};
};
static
struct
ctl_table
abi_root_table
[]
=
{
static
struct
ctl_table
abi_root_table
[]
=
{
{
CTL_ABI
,
"abi"
,
NULL
,
0
,
0555
,
abi_table
},
{
{
0
}
.
ctl_name
=
CTL_ABI
,
.
procname
=
"abi"
,
.
mode
=
0555
,
.
child
=
abi_table
,
},
{
.
ctl_name
=
0
}
};
};
static
int
__init
static
int
__init
...
...
kernel/resource.c
View file @
c2e2d4f7
...
@@ -20,8 +20,19 @@
...
@@ -20,8 +20,19 @@
#include <asm/io.h>
#include <asm/io.h>
struct
resource
ioport_resource
=
{
"PCI IO"
,
0x0000
,
IO_SPACE_LIMIT
,
IORESOURCE_IO
};
struct
resource
ioport_resource
=
{
struct
resource
iomem_resource
=
{
"PCI mem"
,
0UL
,
~
0UL
,
IORESOURCE_MEM
};
.
name
=
"PCI IO"
,
.
start
=
0x0000
,
.
end
=
IO_SPACE_LIMIT
,
.
flags
=
IORESOURCE_IO
,
};
struct
resource
iomem_resource
=
{
.
name
=
"PCI mem"
,
.
start
=
0UL
,
.
end
=
~
0UL
,
.
flags
=
IORESOURCE_MEM
,
};
static
rwlock_t
resource_lock
=
RW_LOCK_UNLOCKED
;
static
rwlock_t
resource_lock
=
RW_LOCK_UNLOCKED
;
...
...
kernel/sysctl.c
View file @
c2e2d4f7
...
@@ -149,123 +149,408 @@ static void unregister_proc_table(ctl_table *, struct proc_dir_entry *);
...
@@ -149,123 +149,408 @@ static void unregister_proc_table(ctl_table *, struct proc_dir_entry *);
/* The default sysctl tables: */
/* The default sysctl tables: */
static
ctl_table
root_table
[]
=
{
static
ctl_table
root_table
[]
=
{
{
CTL_KERN
,
"kernel"
,
NULL
,
0
,
0555
,
kern_table
},
{
{
CTL_VM
,
"vm"
,
NULL
,
0
,
0555
,
vm_table
},
.
ctl_name
=
CTL_KERN
,
.
procname
=
"kernel"
,
.
mode
=
0555
,
.
child
=
kern_table
,
},
{
.
ctl_name
=
CTL_VM
,
.
procname
=
"vm"
,
.
mode
=
0555
,
.
child
=
vm_table
,
},
#ifdef CONFIG_NET
#ifdef CONFIG_NET
{
CTL_NET
,
"net"
,
NULL
,
0
,
0555
,
net_table
},
{
.
ctl_name
=
CTL_NET
,
.
procname
=
"net"
,
.
mode
=
0555
,
.
child
=
net_table
,
},
#endif
#endif
{
CTL_PROC
,
"proc"
,
NULL
,
0
,
0555
,
proc_table
},
{
{
CTL_FS
,
"fs"
,
NULL
,
0
,
0555
,
fs_table
},
.
ctl_name
=
CTL_PROC
,
{
CTL_DEBUG
,
"debug"
,
NULL
,
0
,
0555
,
debug_table
},
.
procname
=
"proc"
,
{
CTL_DEV
,
"dev"
,
NULL
,
0
,
0555
,
dev_table
},
.
mode
=
0555
,
{
0
}
.
child
=
proc_table
,
},
{
.
ctl_name
=
CTL_FS
,
.
procname
=
"fs"
,
.
mode
=
0555
,
.
child
=
fs_table
,
},
{
.
ctl_name
=
CTL_DEBUG
,
.
procname
=
"debug"
,
.
mode
=
0555
,
.
child
=
debug_table
,
},
{
.
ctl_name
=
CTL_DEV
,
.
procname
=
"dev"
,
.
mode
=
0555
,
.
child
=
dev_table
,
},
{
.
ctl_name
=
0
}
};
};
static
ctl_table
kern_table
[]
=
{
static
ctl_table
kern_table
[]
=
{
{
KERN_OSTYPE
,
"ostype"
,
system_utsname
.
sysname
,
64
,
{
0444
,
NULL
,
&
proc_doutsstring
,
&
sysctl_string
},
.
ctl_name
=
KERN_OSTYPE
,
{
KERN_OSRELEASE
,
"osrelease"
,
system_utsname
.
release
,
64
,
.
procname
=
"ostype"
,
0444
,
NULL
,
&
proc_doutsstring
,
&
sysctl_string
},
.
data
=
system_utsname
.
sysname
,
{
KERN_VERSION
,
"version"
,
system_utsname
.
version
,
64
,
.
maxlen
=
64
,
0444
,
NULL
,
&
proc_doutsstring
,
&
sysctl_string
},
.
mode
=
0444
,
{
KERN_NODENAME
,
"hostname"
,
system_utsname
.
nodename
,
64
,
.
proc_handler
=
&
proc_doutsstring
,
0644
,
NULL
,
&
proc_doutsstring
,
&
sysctl_string
},
.
strategy
=
&
sysctl_string
,
{
KERN_DOMAINNAME
,
"domainname"
,
system_utsname
.
domainname
,
64
,
},
0644
,
NULL
,
&
proc_doutsstring
,
&
sysctl_string
},
{
{
KERN_PANIC
,
"panic"
,
&
panic_timeout
,
sizeof
(
int
),
.
ctl_name
=
KERN_OSRELEASE
,
0644
,
NULL
,
&
proc_dointvec
},
.
procname
=
"osrelease"
,
{
KERN_CORE_USES_PID
,
"core_uses_pid"
,
&
core_uses_pid
,
sizeof
(
int
),
.
data
=
system_utsname
.
release
,
0644
,
NULL
,
&
proc_dointvec
},
.
maxlen
=
64
,
{
KERN_CORE_PATTERN
,
"core_pattern"
,
core_pattern
,
64
,
.
mode
=
0444
,
0644
,
NULL
,
&
proc_dostring
,
&
sysctl_string
},
.
proc_handler
=
&
proc_doutsstring
,
{
KERN_TAINTED
,
"tainted"
,
&
tainted
,
sizeof
(
int
),
.
strategy
=
&
sysctl_string
,
0644
,
NULL
,
&
proc_dointvec
},
},
{
KERN_CAP_BSET
,
"cap-bound"
,
&
cap_bset
,
sizeof
(
kernel_cap_t
),
{
0600
,
NULL
,
&
proc_dointvec_bset
},
.
ctl_name
=
KERN_VERSION
,
.
procname
=
"version"
,
.
data
=
system_utsname
.
version
,
.
maxlen
=
64
,
.
mode
=
0444
,
.
proc_handler
=
&
proc_doutsstring
,
.
strategy
=
&
sysctl_string
,
},
{
.
ctl_name
=
KERN_NODENAME
,
.
procname
=
"hostname"
,
.
data
=
system_utsname
.
nodename
,
.
maxlen
=
64
,
.
mode
=
0644
,
.
proc_handler
=
&
proc_doutsstring
,
.
strategy
=
&
sysctl_string
,
},
{
.
ctl_name
=
KERN_DOMAINNAME
,
.
procname
=
"domainname"
,
.
data
=
system_utsname
.
domainname
,
.
maxlen
=
64
,
.
mode
=
0644
,
.
proc_handler
=
&
proc_doutsstring
,
.
strategy
=
&
sysctl_string
,
},
{
.
ctl_name
=
KERN_PANIC
,
.
procname
=
"panic"
,
.
data
=
&
panic_timeout
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
KERN_CORE_USES_PID
,
.
procname
=
"core_uses_pid"
,
.
data
=
&
core_uses_pid
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
KERN_CORE_PATTERN
,
.
procname
=
"core_pattern"
,
.
data
=
core_pattern
,
.
maxlen
=
64
,
.
mode
=
0644
,
.
proc_handler
=
&
proc_dostring
,
.
strategy
=
&
sysctl_string
,
},
{
.
ctl_name
=
KERN_TAINTED
,
.
procname
=
"tainted"
,
.
data
=
&
tainted
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
KERN_CAP_BSET
,
.
procname
=
"cap-bound"
,
.
data
=
&
cap_bset
,
.
maxlen
=
sizeof
(
kernel_cap_t
),
.
mode
=
0600
,
.
proc_handler
=
&
proc_dointvec_bset
,
},
#ifdef CONFIG_BLK_DEV_INITRD
#ifdef CONFIG_BLK_DEV_INITRD
{
KERN_REALROOTDEV
,
"real-root-dev"
,
&
real_root_dev
,
sizeof
(
int
),
{
0644
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
KERN_REALROOTDEV
,
.
procname
=
"real-root-dev"
,
.
data
=
&
real_root_dev
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
#endif
#endif
#ifdef __sparc__
#ifdef __sparc__
{
KERN_SPARC_REBOOT
,
"reboot-cmd"
,
reboot_command
,
{
256
,
0644
,
NULL
,
&
proc_dostring
,
&
sysctl_string
},
.
ctl_name
=
KERN_SPARC_REBOOT
,
{
KERN_SPARC_STOP_A
,
"stop-a"
,
&
stop_a_enabled
,
sizeof
(
int
),
.
procname
=
"reboot-cmd"
,
0644
,
NULL
,
&
proc_dointvec
},
.
data
=
reboot_command
,
.
maxlen
=
256
,
.
mode
=
0644
,
.
proc_handler
=
&
proc_dostring
,
.
strategy
=
&
sysctl_string
,
},
{
.
ctl_name
=
KERN_SPARC_STOP_A
,
.
procname
=
"stop-a"
,
.
data
=
&
stop_a_enabled
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
#endif
#endif
#if defined(CONFIG_PPC32) && defined(CONFIG_6xx)
#if defined(CONFIG_PPC32) && defined(CONFIG_6xx)
{
KERN_PPC_POWERSAVE_NAP
,
"powersave-nap"
,
&
powersave_nap
,
sizeof
(
int
),
{
0644
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
KERN_PPC_POWERSAVE_NAP
,
{
KERN_PPC_L2CR
,
"l2cr"
,
NULL
,
0
,
.
procname
=
"powersave-nap"
,
0644
,
NULL
,
&
proc_dol2crvec
},
.
data
=
&
powersave_nap
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
KERN_PPC_L2CR
,
.
procname
=
"l2cr"
,
.
mode
=
0644
,
.
proc_handler
=
&
proc_dol2crvec
,
},
#endif
#endif
{
KERN_CTLALTDEL
,
"ctrl-alt-del"
,
&
C_A_D
,
sizeof
(
int
),
{
0644
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
KERN_CTLALTDEL
,
{
KERN_PRINTK
,
"printk"
,
&
console_loglevel
,
4
*
sizeof
(
int
),
.
procname
=
"ctrl-alt-del"
,
0644
,
NULL
,
&
proc_dointvec
},
.
data
=
&
C_A_D
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
KERN_PRINTK
,
.
procname
=
"printk"
,
.
data
=
&
console_loglevel
,
.
maxlen
=
4
*
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
#ifdef CONFIG_KMOD
#ifdef CONFIG_KMOD
{
KERN_MODPROBE
,
"modprobe"
,
&
modprobe_path
,
256
,
{
0644
,
NULL
,
&
proc_dostring
,
&
sysctl_string
},
.
ctl_name
=
KERN_MODPROBE
,
.
procname
=
"modprobe"
,
.
data
=
&
modprobe_path
,
.
maxlen
=
256
,
.
mode
=
0644
,
.
proc_handler
=
&
proc_dostring
,
.
strategy
=
&
sysctl_string
,
},
#endif
#endif
#ifdef CONFIG_HOTPLUG
#ifdef CONFIG_HOTPLUG
{
KERN_HOTPLUG
,
"hotplug"
,
&
hotplug_path
,
256
,
{
0644
,
NULL
,
&
proc_dostring
,
&
sysctl_string
},
.
ctl_name
=
KERN_HOTPLUG
,
.
procname
=
"hotplug"
,
.
data
=
&
hotplug_path
,
.
maxlen
=
256
,
.
mode
=
0644
,
.
proc_handler
=
&
proc_dostring
,
.
strategy
=
&
sysctl_string
,
},
#endif
#endif
#ifdef CONFIG_CHR_DEV_SG
#ifdef CONFIG_CHR_DEV_SG
{
KERN_SG_BIG_BUFF
,
"sg-big-buff"
,
&
sg_big_buff
,
sizeof
(
int
),
{
0444
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
KERN_SG_BIG_BUFF
,
.
procname
=
"sg-big-buff"
,
.
data
=
&
sg_big_buff
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0444
,
.
proc_handler
=
&
proc_dointvec
,
},
#endif
#endif
#ifdef CONFIG_BSD_PROCESS_ACCT
#ifdef CONFIG_BSD_PROCESS_ACCT
{
KERN_ACCT
,
"acct"
,
&
acct_parm
,
3
*
sizeof
(
int
),
{
0644
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
KERN_ACCT
,
.
procname
=
"acct"
,
.
data
=
&
acct_parm
,
.
maxlen
=
3
*
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
#endif
#endif
{
KERN_RTSIGNR
,
"rtsig-nr"
,
&
nr_queued_signals
,
sizeof
(
int
),
{
0444
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
KERN_RTSIGNR
,
{
KERN_RTSIGMAX
,
"rtsig-max"
,
&
max_queued_signals
,
sizeof
(
int
),
.
procname
=
"rtsig-nr"
,
0644
,
NULL
,
&
proc_dointvec
},
.
data
=
&
nr_queued_signals
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0444
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
KERN_RTSIGMAX
,
.
procname
=
"rtsig-max"
,
.
data
=
&
max_queued_signals
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
#ifdef CONFIG_SYSVIPC
#ifdef CONFIG_SYSVIPC
{
KERN_SHMMAX
,
"shmmax"
,
&
shm_ctlmax
,
sizeof
(
size_t
),
{
0644
,
NULL
,
&
proc_doulongvec_minmax
},
.
ctl_name
=
KERN_SHMMAX
,
{
KERN_SHMALL
,
"shmall"
,
&
shm_ctlall
,
sizeof
(
size_t
),
.
procname
=
"shmmax"
,
0644
,
NULL
,
&
proc_doulongvec_minmax
},
.
data
=
&
shm_ctlmax
,
{
KERN_SHMMNI
,
"shmmni"
,
&
shm_ctlmni
,
sizeof
(
int
),
.
maxlen
=
sizeof
(
size_t
),
0644
,
NULL
,
&
proc_dointvec
},
.
mode
=
0644
,
{
KERN_MSGMAX
,
"msgmax"
,
&
msg_ctlmax
,
sizeof
(
int
),
.
proc_handler
=
&
proc_doulongvec_minmax
,
0644
,
NULL
,
&
proc_dointvec
},
},
{
KERN_MSGMNI
,
"msgmni"
,
&
msg_ctlmni
,
sizeof
(
int
),
{
0644
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
KERN_SHMALL
,
{
KERN_MSGMNB
,
"msgmnb"
,
&
msg_ctlmnb
,
sizeof
(
int
),
.
procname
=
"shmall"
,
0644
,
NULL
,
&
proc_dointvec
},
.
data
=
&
shm_ctlall
,
{
KERN_SEM
,
"sem"
,
&
sem_ctls
,
4
*
sizeof
(
int
),
.
maxlen
=
sizeof
(
size_t
),
0644
,
NULL
,
&
proc_dointvec
},
.
mode
=
0644
,
.
proc_handler
=
&
proc_doulongvec_minmax
,
},
{
.
ctl_name
=
KERN_SHMMNI
,
.
procname
=
"shmmni"
,
.
data
=
&
shm_ctlmni
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
KERN_MSGMAX
,
.
procname
=
"msgmax"
,
.
data
=
&
msg_ctlmax
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
KERN_MSGMNI
,
.
procname
=
"msgmni"
,
.
data
=
&
msg_ctlmni
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
KERN_MSGMNB
,
.
procname
=
"msgmnb"
,
.
data
=
&
msg_ctlmnb
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
KERN_SEM
,
.
procname
=
"sem"
,
.
data
=
&
sem_ctls
,
.
maxlen
=
4
*
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
#endif
#endif
#ifdef CONFIG_MAGIC_SYSRQ
#ifdef CONFIG_MAGIC_SYSRQ
{
KERN_SYSRQ
,
"sysrq"
,
&
sysrq_enabled
,
sizeof
(
int
),
{
0644
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
KERN_SYSRQ
,
.
procname
=
"sysrq"
,
.
data
=
&
sysrq_enabled
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
#endif
#endif
{
KERN_CADPID
,
"cad_pid"
,
&
cad_pid
,
sizeof
(
int
),
{
0600
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
KERN_CADPID
,
{
KERN_MAX_THREADS
,
"threads-max"
,
&
max_threads
,
sizeof
(
int
),
.
procname
=
"cad_pid"
,
0644
,
NULL
,
&
proc_dointvec
},
.
data
=
&
cad_pid
,
{
KERN_RANDOM
,
"random"
,
NULL
,
0
,
0555
,
random_table
},
.
maxlen
=
sizeof
(
int
),
{
KERN_OVERFLOWUID
,
"overflowuid"
,
&
overflowuid
,
sizeof
(
int
),
0644
,
NULL
,
.
mode
=
0600
,
&
proc_dointvec_minmax
,
&
sysctl_intvec
,
NULL
,
.
proc_handler
=
&
proc_dointvec
,
&
minolduid
,
&
maxolduid
},
},
{
KERN_OVERFLOWGID
,
"overflowgid"
,
&
overflowgid
,
sizeof
(
int
),
0644
,
NULL
,
{
&
proc_dointvec_minmax
,
&
sysctl_intvec
,
NULL
,
.
ctl_name
=
KERN_MAX_THREADS
,
&
minolduid
,
&
maxolduid
},
.
procname
=
"threads-max"
,
.
data
=
&
max_threads
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
KERN_RANDOM
,
.
procname
=
"random"
,
.
mode
=
0555
,
.
child
=
random_table
,
},
{
.
ctl_name
=
KERN_OVERFLOWUID
,
.
procname
=
"overflowuid"
,
.
data
=
&
overflowuid
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec_minmax
,
.
strategy
=
&
sysctl_intvec
,
.
extra1
=
&
minolduid
,
.
extra2
=
&
maxolduid
,
},
{
.
ctl_name
=
KERN_OVERFLOWGID
,
.
procname
=
"overflowgid"
,
.
data
=
&
overflowgid
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec_minmax
,
.
strategy
=
&
sysctl_intvec
,
.
extra1
=
&
minolduid
,
.
extra2
=
&
maxolduid
,
},
#ifdef CONFIG_ARCH_S390
#ifdef CONFIG_ARCH_S390
#ifdef CONFIG_MATHEMU
#ifdef CONFIG_MATHEMU
{
KERN_IEEE_EMULATION_WARNINGS
,
"ieee_emulation_warnings"
,
{
&
sysctl_ieee_emulation_warnings
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
KERN_IEEE_EMULATION_WARNINGS
,
.
procname
=
"ieee_emulation_warnings"
,
.
data
=
&
sysctl_ieee_emulation_warnings
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
#endif
#endif
{
KERN_S390_USER_DEBUG_LOGGING
,
"userprocess_debug"
,
{
&
sysctl_userprocess_debug
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
KERN_S390_USER_DEBUG_LOGGING
,
.
procname
=
"userprocess_debug"
,
.
data
=
&
sysctl_userprocess_debug
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
#endif
#endif
{
KERN_PIDMAX
,
"pid_max"
,
&
pid_max
,
sizeof
(
int
),
{
0600
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
KERN_PIDMAX
,
{
KERN_PANIC_ON_OOPS
,
"panic_on_oops"
,
.
procname
=
"pid_max"
,
&
panic_on_oops
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
.
data
=
&
pid_max
,
{
0
}
.
maxlen
=
sizeof
(
int
),
.
mode
=
0600
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
KERN_PANIC_ON_OOPS
,
.
procname
=
"panic_on_oops"
,
.
data
=
&
panic_on_oops
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
0
}
};
};
/* Constants for minimum and maximum testing in vm_table.
/* Constants for minimum and maximum testing in vm_table.
...
@@ -275,79 +560,210 @@ static int one_hundred = 100;
...
@@ -275,79 +560,210 @@ static int one_hundred = 100;
static
ctl_table
vm_table
[]
=
{
static
ctl_table
vm_table
[]
=
{
{
VM_OVERCOMMIT_MEMORY
,
"overcommit_memory"
,
&
sysctl_overcommit_memory
,
{
sizeof
(
sysctl_overcommit_memory
),
0644
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
VM_OVERCOMMIT_MEMORY
,
{
VM_OVERCOMMIT_RATIO
,
"overcommit_ratio"
,
.
procname
=
"overcommit_memory"
,
&
sysctl_overcommit_ratio
,
sizeof
(
sysctl_overcommit_ratio
),
0644
,
.
data
=
&
sysctl_overcommit_memory
,
NULL
,
&
proc_dointvec
},
.
maxlen
=
sizeof
(
sysctl_overcommit_memory
),
{
VM_PAGE_CLUSTER
,
"page-cluster"
,
.
mode
=
0644
,
&
page_cluster
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
.
proc_handler
=
&
proc_dointvec
,
{
VM_DIRTY_BACKGROUND
,
"dirty_background_ratio"
,
},
&
dirty_background_ratio
,
sizeof
(
dirty_background_ratio
),
{
0644
,
NULL
,
&
proc_dointvec_minmax
,
&
sysctl_intvec
,
NULL
,
.
ctl_name
=
VM_OVERCOMMIT_RATIO
,
&
zero
,
&
one_hundred
},
.
procname
=
"overcommit_ratio"
,
{
VM_DIRTY_RATIO
,
"dirty_ratio"
,
&
vm_dirty_ratio
,
.
data
=
&
sysctl_overcommit_ratio
,
sizeof
(
vm_dirty_ratio
),
0644
,
NULL
,
&
proc_dointvec_minmax
,
.
maxlen
=
sizeof
(
sysctl_overcommit_ratio
),
&
sysctl_intvec
,
NULL
,
&
zero
,
&
one_hundred
},
.
mode
=
0644
,
{
VM_DIRTY_WB_CS
,
"dirty_writeback_centisecs"
,
.
proc_handler
=
&
proc_dointvec
,
&
dirty_writeback_centisecs
,
sizeof
(
dirty_writeback_centisecs
),
0644
,
},
NULL
,
dirty_writeback_centisecs_handler
},
{
{
VM_DIRTY_EXPIRE_CS
,
"dirty_expire_centisecs"
,
.
ctl_name
=
VM_PAGE_CLUSTER
,
&
dirty_expire_centisecs
,
sizeof
(
dirty_expire_centisecs
),
0644
,
.
procname
=
"page-cluster"
,
NULL
,
&
proc_dointvec
},
.
data
=
&
page_cluster
,
{
VM_NR_PDFLUSH_THREADS
,
"nr_pdflush_threads"
,
.
maxlen
=
sizeof
(
int
),
&
nr_pdflush_threads
,
sizeof
nr_pdflush_threads
,
.
mode
=
0644
,
0444
/* read-only*/
,
NULL
,
&
proc_dointvec
},
.
proc_handler
=
&
proc_dointvec
,
{
VM_SWAPPINESS
,
"swappiness"
,
&
vm_swappiness
,
sizeof
(
vm_swappiness
),
},
0644
,
NULL
,
&
proc_dointvec_minmax
,
&
sysctl_intvec
,
NULL
,
&
zero
,
{
&
one_hundred
},
.
ctl_name
=
VM_DIRTY_BACKGROUND
,
.
procname
=
"dirty_background_ratio"
,
.
data
=
&
dirty_background_ratio
,
.
maxlen
=
sizeof
(
dirty_background_ratio
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec_minmax
,
.
strategy
=
&
sysctl_intvec
,
.
extra1
=
&
zero
,
.
extra2
=
&
one_hundred
,
},
{
.
ctl_name
=
VM_DIRTY_RATIO
,
.
procname
=
"dirty_ratio"
,
.
data
=
&
vm_dirty_ratio
,
.
maxlen
=
sizeof
(
vm_dirty_ratio
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec_minmax
,
.
strategy
=
&
sysctl_intvec
,
.
extra1
=
&
zero
,
.
extra2
=
&
one_hundred
,
},
{
.
ctl_name
=
VM_DIRTY_WB_CS
,
.
procname
=
"dirty_writeback_centisecs"
,
.
data
=
&
dirty_writeback_centisecs
,
.
maxlen
=
sizeof
(
dirty_writeback_centisecs
),
.
mode
=
0644
,
.
proc_handler
=
dirty_writeback_centisecs_handler
,
},
{
.
ctl_name
=
VM_DIRTY_EXPIRE_CS
,
.
procname
=
"dirty_expire_centisecs"
,
.
data
=
&
dirty_expire_centisecs
,
.
maxlen
=
sizeof
(
dirty_expire_centisecs
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
VM_NR_PDFLUSH_THREADS
,
.
procname
=
"nr_pdflush_threads"
,
.
data
=
&
nr_pdflush_threads
,
.
maxlen
=
sizeof
nr_pdflush_threads
,
.
mode
=
0444
/* read-only*/
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
VM_SWAPPINESS
,
.
procname
=
"swappiness"
,
.
data
=
&
vm_swappiness
,
.
maxlen
=
sizeof
(
vm_swappiness
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec_minmax
,
.
strategy
=
&
sysctl_intvec
,
.
extra1
=
&
zero
,
.
extra2
=
&
one_hundred
,
},
#ifdef CONFIG_HUGETLB_PAGE
#ifdef CONFIG_HUGETLB_PAGE
{
VM_HUGETLB_PAGES
,
"nr_hugepages"
,
&
htlbpage_max
,
sizeof
(
int
),
0644
,
{
NULL
,
&
hugetlb_sysctl_handler
},
.
ctl_name
=
VM_HUGETLB_PAGES
,
.
procname
=
"nr_hugepages"
,
.
data
=
&
htlbpage_max
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
hugetlb_sysctl_handler
,
},
#endif
#endif
{
VM_LOWER_ZONE_PROTECTION
,
"lower_zone_protection"
,
{
&
sysctl_lower_zone_protection
,
sizeof
(
sysctl_lower_zone_protection
),
.
ctl_name
=
VM_LOWER_ZONE_PROTECTION
,
0644
,
NULL
,
&
proc_dointvec_minmax
,
&
sysctl_intvec
,
NULL
,
&
zero
,
.
procname
=
"lower_zone_protection"
,
NULL
,
},
.
data
=
&
sysctl_lower_zone_protection
,
{
0
}
.
maxlen
=
sizeof
(
sysctl_lower_zone_protection
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec_minmax
,
.
strategy
=
&
sysctl_intvec
,
.
extra1
=
&
zero
,
},
{
.
ctl_name
=
0
}
};
};
static
ctl_table
proc_table
[]
=
{
static
ctl_table
proc_table
[]
=
{
{
0
}
{
.
ctl_name
=
0
}
};
};
static
ctl_table
fs_table
[]
=
{
static
ctl_table
fs_table
[]
=
{
{
FS_NRINODE
,
"inode-nr"
,
&
inodes_stat
,
2
*
sizeof
(
int
),
{
0444
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
FS_NRINODE
,
{
FS_STATINODE
,
"inode-state"
,
&
inodes_stat
,
7
*
sizeof
(
int
),
.
procname
=
"inode-nr"
,
0444
,
NULL
,
&
proc_dointvec
},
.
data
=
&
inodes_stat
,
{
FS_NRFILE
,
"file-nr"
,
&
files_stat
,
3
*
sizeof
(
int
),
.
maxlen
=
2
*
sizeof
(
int
),
0444
,
NULL
,
&
proc_dointvec
},
.
mode
=
0444
,
{
FS_MAXFILE
,
"file-max"
,
&
files_stat
.
max_files
,
sizeof
(
int
),
.
proc_handler
=
&
proc_dointvec
,
0644
,
NULL
,
&
proc_dointvec
},
},
{
FS_DENTRY
,
"dentry-state"
,
&
dentry_stat
,
6
*
sizeof
(
int
),
{
0444
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
FS_STATINODE
,
{
FS_OVERFLOWUID
,
"overflowuid"
,
&
fs_overflowuid
,
sizeof
(
int
),
0644
,
NULL
,
.
procname
=
"inode-state"
,
&
proc_dointvec_minmax
,
&
sysctl_intvec
,
NULL
,
.
data
=
&
inodes_stat
,
&
minolduid
,
&
maxolduid
},
.
maxlen
=
7
*
sizeof
(
int
),
{
FS_OVERFLOWGID
,
"overflowgid"
,
&
fs_overflowgid
,
sizeof
(
int
),
0644
,
NULL
,
.
mode
=
0444
,
&
proc_dointvec_minmax
,
&
sysctl_intvec
,
NULL
,
.
proc_handler
=
&
proc_dointvec
,
&
minolduid
,
&
maxolduid
},
},
{
FS_LEASES
,
"leases-enable"
,
&
leases_enable
,
sizeof
(
int
),
{
0644
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
FS_NRFILE
,
{
FS_DIR_NOTIFY
,
"dir-notify-enable"
,
&
dir_notify_enable
,
.
procname
=
"file-nr"
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
.
data
=
&
files_stat
,
{
FS_LEASE_TIME
,
"lease-break-time"
,
&
lease_break_time
,
sizeof
(
int
),
.
maxlen
=
3
*
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
.
mode
=
0444
,
{
0
}
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
FS_MAXFILE
,
.
procname
=
"file-max"
,
.
data
=
&
files_stat
.
max_files
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
FS_DENTRY
,
.
procname
=
"dentry-state"
,
.
data
=
&
dentry_stat
,
.
maxlen
=
6
*
sizeof
(
int
),
.
mode
=
0444
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
FS_OVERFLOWUID
,
.
procname
=
"overflowuid"
,
.
data
=
&
fs_overflowuid
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec_minmax
,
.
strategy
=
&
sysctl_intvec
,
.
extra1
=
&
minolduid
,
.
extra2
=
&
maxolduid
,
},
{
.
ctl_name
=
FS_OVERFLOWGID
,
.
procname
=
"overflowgid"
,
.
data
=
&
fs_overflowgid
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec_minmax
,
.
strategy
=
&
sysctl_intvec
,
.
extra1
=
&
minolduid
,
.
extra2
=
&
maxolduid
,
},
{
.
ctl_name
=
FS_LEASES
,
.
procname
=
"leases-enable"
,
.
data
=
&
leases_enable
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
FS_DIR_NOTIFY
,
.
procname
=
"dir-notify-enable"
,
.
data
=
&
dir_notify_enable
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
FS_LEASE_TIME
,
.
procname
=
"lease-break-time"
,
.
data
=
&
lease_break_time
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
0
}
};
};
static
ctl_table
debug_table
[]
=
{
static
ctl_table
debug_table
[]
=
{
{
0
}
{
.
ctl_name
=
0
}
};
};
static
ctl_table
dev_table
[]
=
{
static
ctl_table
dev_table
[]
=
{
{
0
}
{
.
ctl_name
=
0
}
};
};
extern
void
init_irq_proc
(
void
);
extern
void
init_irq_proc
(
void
);
...
...
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