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
23dd3db1
Commit
23dd3db1
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 2.3.23pre4
parent
6f053df1
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
453 additions
and
491 deletions
+453
-491
arch/i386/lib/Makefile
arch/i386/lib/Makefile
+1
-1
arch/i386/lib/iodebug.c
arch/i386/lib/iodebug.c
+19
-0
drivers/scsi/st.c
drivers/scsi/st.c
+368
-438
drivers/scsi/st.h
drivers/scsi/st.h
+1
-0
fs/buffer.c
fs/buffer.c
+0
-1
fs/proc/array.c
fs/proc/array.c
+55
-47
include/asm-i386/io.h
include/asm-i386/io.h
+9
-4
No files found.
arch/i386/lib/Makefile
View file @
23dd3db1
...
...
@@ -7,7 +7,7 @@
L_TARGET
=
lib.a
L_OBJS
=
checksum.o old-checksum.o delay.o
\
usercopy.o getuser.o putuser.o
usercopy.o getuser.o putuser.o
iodebug.o
ifdef
CONFIG_X86_USE_3DNOW
L_OBJS
+=
mmx.o
...
...
arch/i386/lib/iodebug.c
0 → 100644
View file @
23dd3db1
#include <asm/io.h>
void
*
__io_virt_debug
(
unsigned
long
x
,
const
char
*
file
,
int
line
)
{
if
(
x
<
PAGE_OFFSET
)
{
printk
(
"io mapaddr 0x%05lx not valid at %s:%d!
\n
"
,
x
,
file
,
line
);
return
__va
(
x
);
}
return
(
void
*
)
x
;
}
unsigned
long
__io_phys_debug
(
unsigned
long
x
,
const
char
*
file
,
int
line
)
{
if
(
x
<
PAGE_OFFSET
)
{
printk
(
"io mapaddr 0x%05lx not valid at %s:%d!
\n
"
,
x
,
file
,
line
);
return
x
;
}
return
__pa
(
x
);
}
drivers/scsi/st.c
View file @
23dd3db1
This diff is collapsed.
Click to expand it.
drivers/scsi/st.h
View file @
23dd3db1
...
...
@@ -104,6 +104,7 @@ typedef struct {
unsigned
char
density
;
unsigned
char
door_locked
;
unsigned
char
rew_at_close
;
unsigned
char
inited
;
int
block_size
;
int
min_block
;
int
max_block
;
...
...
fs/buffer.c
View file @
23dd3db1
...
...
@@ -43,7 +43,6 @@
#include <linux/init.h>
#include <linux/quotaops.h>
#include <linux/iobuf.h>
#include <linux/bigmem.h>
#include <asm/uaccess.h>
#include <asm/io.h>
...
...
fs/proc/array.c
View file @
23dd3db1
...
...
@@ -360,16 +360,24 @@ static int get_meminfo(char * buffer)
struct
sysinfo
i
;
int
len
;
/*
* display in kilobytes.
*/
#define K(x) ((x) << (PAGE_SHIFT - 10))
si_meminfo
(
&
i
);
si_swapinfo
(
&
i
);
len
=
sprintf
(
buffer
,
" total: used: free: shared: buffers: cached:
\n
"
"Mem: %8lu %8lu %8lu %8lu %8lu %8
l
u
\n
"
"Mem: %8lu %8lu %8lu %8lu %8lu %8u
\n
"
"Swap: %8lu %8lu %8lu
\n
"
,
i
.
totalram
,
i
.
totalram
-
i
.
freeram
,
i
.
freeram
,
i
.
sharedram
,
i
.
bufferram
,
(
unsigned
long
)
atomic_read
(
&
page_cache_size
)
*
PAGE_SIZE
,
i
.
totalswap
,
i
.
totalswap
-
i
.
freeswap
,
i
.
freeswap
);
K
(
i
.
totalram
),
K
(
i
.
totalram
-
i
.
freeram
),
K
(
i
.
freeram
),
K
(
i
.
sharedram
),
K
(
i
.
bufferram
),
K
(
atomic_read
(
&
page_cache_size
)),
K
(
i
.
totalswap
),
K
(
i
.
totalswap
-
i
.
freeswap
),
K
(
i
.
freeswap
));
/*
* Tagged format, for easy grepping and expansion. The above will go away
* eventually, once the tools have been updated.
* Tagged format, for easy grepping and expansion.
* The above will go away eventually, once the tools
* have been updated.
*/
return
len
+
sprintf
(
buffer
+
len
,
"MemTotal: %8lu kB
\n
"
...
...
@@ -377,19 +385,20 @@ static int get_meminfo(char * buffer)
"MemShared: %8lu kB
\n
"
"Buffers: %8lu kB
\n
"
"Cached: %8u kB
\n
"
"
BigTotal:
%8lu kB
\n
"
"
BigFree:
%8lu kB
\n
"
"
HighTotal:
%8lu kB
\n
"
"
HighFree:
%8lu kB
\n
"
"SwapTotal: %8lu kB
\n
"
"SwapFree: %8lu kB
\n
"
,
i
.
totalram
>>
10
,
i
.
freeram
>>
10
,
i
.
sharedram
>>
10
,
i
.
bufferram
>>
10
,
atomic_read
(
&
page_cache_size
)
<<
(
PAGE_SHIFT
-
10
),
i
.
totalhigh
>>
10
,
i
.
freehigh
>>
10
,
i
.
totalswap
>>
10
,
i
.
freeswap
>>
10
);
K
(
i
.
totalram
),
K
(
i
.
freeram
),
K
(
i
.
sharedram
),
K
(
i
.
bufferram
),
K
(
atomic_read
(
&
page_cache_size
)),
K
(
i
.
totalhigh
),
K
(
i
.
freehigh
),
K
(
i
.
totalswap
),
K
(
i
.
freeswap
));
#undef K
}
static
int
get_version
(
char
*
buffer
)
...
...
@@ -407,69 +416,68 @@ static int get_cmdline(char * buffer)
return
sprintf
(
buffer
,
"%s
\n
"
,
saved_command_line
);
}
static
struct
page
*
get_phys_
page
(
struct
mm_struct
*
mm
,
unsigned
long
ptr
)
static
struct
page
*
get_phys_
addr
(
struct
mm_struct
*
mm
,
unsigned
long
ptr
)
{
pgd_t
*
p
age_dir
;
pmd_t
*
p
age_middle
;
pgd_t
*
p
gd
;
pmd_t
*
p
md
;
pte_t
pte
;
if
(
ptr
>=
TASK_SIZE
)
return
0
;
p
age_dir
=
pgd_offset
(
mm
,
ptr
);
if
(
pgd_none
(
*
p
age_dir
))
p
gd
=
pgd_offset
(
mm
,
ptr
);
if
(
pgd_none
(
*
p
gd
))
return
0
;
if
(
pgd_bad
(
*
p
age_dir
))
{
p
rintk
(
"bad page directory entry %08lx
\n
"
,
pgd_val
(
*
page_dir
)
);
pgd_clear
(
p
age_dir
);
if
(
pgd_bad
(
*
p
gd
))
{
p
gd_ERROR
(
*
pgd
);
pgd_clear
(
p
gd
);
return
0
;
}
p
age_middle
=
pmd_offset
(
page_dir
,
ptr
);
if
(
pmd_none
(
*
p
age_middle
))
p
md
=
pmd_offset
(
pgd
,
ptr
);
if
(
pmd_none
(
*
p
md
))
return
0
;
if
(
pmd_bad
(
*
p
age_middle
))
{
p
rintk
(
"bad page middle entry %08lx
\n
"
,
pmd_val
(
*
page_middle
)
);
pmd_clear
(
p
age_middle
);
if
(
pmd_bad
(
*
p
md
))
{
p
md_ERROR
(
*
pmd
);
pmd_clear
(
p
md
);
return
0
;
}
pte
=
*
pte_offset
(
p
age_middle
,
ptr
);
pte
=
*
pte_offset
(
p
md
,
ptr
);
if
(
!
pte_present
(
pte
))
return
0
;
return
pte_page
(
pte
);
}
#include <linux/highmem.h>
static
int
get_array
(
struct
mm_struct
*
mm
,
unsigned
long
start
,
unsigned
long
end
,
char
*
buffer
)
{
unsigned
long
addr
;
struct
page
*
page
;
unsigned
long
kaddr
;
int
size
=
0
,
result
=
0
;
char
*
buf
,
c
;
char
c
;
if
(
start
>=
end
)
return
result
;
for
(;;)
{
struct
page
*
page
=
get_phys_page
(
mm
,
start
);
page
=
get_phys_addr
(
mm
,
start
);
if
(
!
page
)
return
result
;
addr
=
kmap
(
page
,
KM_READ
);
buf
=
(
char
*
)
(
addr
+
(
start
&
~
PAGE_MASK
));
kaddr
=
kmap
(
page
,
KM_READ
)
+
(
start
&
~
PAGE_MASK
);
do
{
c
=
*
buf
;
c
=
*
(
char
*
)
kaddr
;
if
(
!
c
)
result
=
size
;
if
(
size
>=
PAGE_SIZE
)
{
kunmap
(
addr
,
KM_READ
);
if
(
size
<
PAGE_SIZE
)
buffer
[
size
++
]
=
c
;
else
{
kunmap
(
kaddr
,
KM_READ
);
return
result
;
}
buffer
[
size
++
]
=
c
;
buf
++
;
kaddr
++
;
start
++
;
if
(
!
c
&&
start
>=
end
)
{
kunmap
(
addr
,
KM_READ
);
kunmap
(
k
addr
,
KM_READ
);
return
result
;
}
}
while
(
~
PAGE_MASK
&
(
unsigned
long
)
buf
);
kunmap
(
addr
,
KM_READ
);
}
while
(
kaddr
&
~
PAGE_MASK
);
kunmap
(
k
addr
,
KM_READ
);
}
return
result
;
}
...
...
@@ -1032,7 +1040,7 @@ static inline void statm_pte_range(pmd_t * pmd, unsigned long address, unsigned
if
(
pmd_none
(
*
pmd
))
return
;
if
(
pmd_bad
(
*
pmd
))
{
p
rintk
(
"statm_pte_range: bad pmd (%08lx)
\n
"
,
pmd_val
(
*
pmd
)
);
p
md_ERROR
(
*
pmd
);
pmd_clear
(
pmd
);
return
;
}
...
...
@@ -1070,7 +1078,7 @@ static inline void statm_pmd_range(pgd_t * pgd, unsigned long address, unsigned
if
(
pgd_none
(
*
pgd
))
return
;
if
(
pgd_bad
(
*
pgd
))
{
p
rintk
(
"statm_pmd_range: bad pgd (%08lx)
\n
"
,
pgd_val
(
*
pgd
)
);
p
gd_ERROR
(
*
pgd
);
pgd_clear
(
pgd
);
return
;
}
...
...
include/asm-i386/io.h
View file @
23dd3db1
...
...
@@ -107,10 +107,15 @@ __OUTS(l)
* Temporary debugging check to catch old code using
* unmapped ISA addresses. Will be removed in 2.4.
*/
#define __io_virt(x) ((unsigned long)(x) < PAGE_OFFSET ? \
({ __label__ __l; __l: printk("io mapaddr %p not valid at %p!\n", (char *)(x), &&__l); __va(x); }) : (char *)(x))
#define __io_phys(x) ((unsigned long)(x) < PAGE_OFFSET ? \
({ __label__ __l; __l: printk("io mapaddr %p not valid at %p!\n", (char *)(x), &&__l); (unsigned long)(x); }) : __pa(x))
#if 1
extern
void
*
__io_virt_debug
(
unsigned
long
x
,
const
char
*
file
,
int
line
);
extern
unsigned
long
__io_phys_debug
(
unsigned
long
x
,
const
char
*
file
,
int
line
);
#define __io_virt(x) __io_virt_debug((unsigned long)(x), __FILE__, __LINE__)
//#define __io_phys(x) __io_phys_debug((unsigned long)(x), __FILE__, __LINE__)
#else
#define __io_virt(x) ((void *)(x))
//#define __io_phys(x) __pa(x)
#endif
/*
* Change virtual addresses to physical addresses and vv.
...
...
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