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
e360aa91
Commit
e360aa91
authored
Oct 19, 2003
by
David Mosberger
Browse files
Options
Browse Files
Download
Plain Diff
Merge tiger.hpl.hp.com:/data1/bk/vanilla/linux-2.5
into tiger.hpl.hp.com:/data1/bk/lia64/to-linus-2.5
parents
740ba8b9
d86d6278
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
107 additions
and
45 deletions
+107
-45
arch/ia64/kernel/efi.c
arch/ia64/kernel/efi.c
+24
-31
arch/ia64/kernel/ia64_ksyms.c
arch/ia64/kernel/ia64_ksyms.c
+3
-6
arch/ia64/kernel/perfmon.c
arch/ia64/kernel/perfmon.c
+1
-1
arch/ia64/kernel/process.c
arch/ia64/kernel/process.c
+6
-0
arch/ia64/kernel/setup.c
arch/ia64/kernel/setup.c
+5
-3
arch/ia64/lib/checksum.c
arch/ia64/lib/checksum.c
+8
-2
arch/ia64/lib/csum_partial_copy.c
arch/ia64/lib/csum_partial_copy.c
+4
-2
arch/ia64/mm/init.c
arch/ia64/mm/init.c
+3
-0
arch/ia64/mm/numa.c
arch/ia64/mm/numa.c
+53
-0
No files found.
arch/ia64/kernel/efi.c
View file @
e360aa91
...
...
@@ -297,9 +297,9 @@ efi_memmap_walk (efi_freemem_callback_t callback, void *arg)
u64
start
;
u64
end
;
}
prev
,
curr
;
void
*
efi_map_start
,
*
efi_map_end
,
*
p
,
*
q
,
*
r
;
void
*
efi_map_start
,
*
efi_map_end
,
*
p
,
*
q
;
efi_memory_desc_t
*
md
,
*
check_md
;
u64
efi_desc_size
,
start
,
end
,
granule_addr
,
first_non_wb_addr
=
0
;
u64
efi_desc_size
,
start
,
end
,
granule_addr
,
last_granule_addr
,
first_non_wb_addr
=
0
;
efi_map_start
=
__va
(
ia64_boot_param
->
efi_memmap
);
efi_map_end
=
efi_map_start
+
ia64_boot_param
->
efi_memmap_size
;
...
...
@@ -312,41 +312,34 @@ efi_memmap_walk (efi_freemem_callback_t callback, void *arg)
if
(
!
(
md
->
attribute
&
EFI_MEMORY_WB
))
continue
;
if
(
md
->
phys_addr
+
(
md
->
num_pages
<<
EFI_PAGE_SHIFT
)
>
first_non_wb_addr
)
{
/*
* Search for the next run of contiguous WB memory. Start search
* at first granule boundary covered by md.
*/
granule_addr
=
((
md
->
phys_addr
+
IA64_GRANULE_SIZE
-
1
)
&
-
IA64_GRANULE_SIZE
);
first_non_wb_addr
=
granule_addr
;
for
(
q
=
p
;
q
<
efi_map_end
;
q
+=
efi_desc_size
)
{
check_md
=
q
;
if
(
check_md
->
attribute
&
EFI_MEMORY_WB
)
trim_bottom
(
check_md
,
granule_addr
);
if
(
check_md
->
phys_addr
<
granule_addr
)
continue
;
/*
* granule_addr is the base of md's first granule.
* [granule_addr - first_non_wb_addr) is guaranteed to
* be contiguous WB memory.
*/
granule_addr
=
md
->
phys_addr
&
~
(
IA64_GRANULE_SIZE
-
1
);
first_non_wb_addr
=
max
(
first_non_wb_addr
,
granule_addr
);
if
(
!
(
check_md
->
attribute
&
EFI_MEMORY_WB
))
break
;
/* hit a non-WB region; stop search */
if
(
first_non_wb_addr
<
md
->
phys_addr
)
{
trim_bottom
(
md
,
granule_addr
+
IA64_GRANULE_SIZE
);
granule_addr
=
md
->
phys_addr
&
~
(
IA64_GRANULE_SIZE
-
1
);
first_non_wb_addr
=
max
(
first_non_wb_addr
,
granule_addr
);
}
if
(
check_md
->
phys_addr
!=
first_non_wb_addr
)
break
;
/* hit a memory hole; stop search */
for
(
q
=
p
;
q
<
efi_map_end
;
q
+=
efi_desc_size
)
{
check_md
=
q
;
if
((
check_md
->
attribute
&
EFI_MEMORY_WB
)
&&
(
check_md
->
phys_addr
==
first_non_wb_addr
))
first_non_wb_addr
+=
check_md
->
num_pages
<<
EFI_PAGE_SHIFT
;
}
/* round it down to the previous granule-boundary: */
first_non_wb_addr
&=
-
IA64_GRANULE_SIZE
;
if
(
!
(
first_non_wb_addr
>
granule_addr
))
continue
;
/* couldn't find enough contiguous memory */
for
(
r
=
p
;
r
<
q
;
r
+=
efi_desc_size
)
trim_top
(
r
,
first_non_wb_addr
);
else
break
;
/* non-WB or hole */
}
last_granule_addr
=
first_non_wb_addr
&
~
(
IA64_GRANULE_SIZE
-
1
);
if
(
last_granule_addr
<
md
->
phys_addr
+
(
md
->
num_pages
<<
EFI_PAGE_SHIFT
))
trim_top
(
md
,
last_granule_addr
);
if
(
is_available_memory
(
md
))
{
if
(
md
->
phys_addr
+
(
md
->
num_pages
<<
EFI_PAGE_SHIFT
)
>
mem_limit
)
{
if
(
md
->
phys_addr
>
mem_limit
)
...
...
arch/ia64/kernel/ia64_ksyms.c
View file @
e360aa91
...
...
@@ -34,13 +34,8 @@ EXPORT_SYMBOL(disable_irq_nosync);
#include <linux/interrupt.h>
EXPORT_SYMBOL
(
probe_irq_mask
);
#include <linux/in6.h>
#include <asm/checksum.h>
/* not coded yet?? EXPORT_SYMBOL(csum_ipv6_magic); */
EXPORT_SYMBOL
(
csum_partial_copy_nocheck
);
EXPORT_SYMBOL
(
csum_tcpudp_magic
);
EXPORT_SYMBOL
(
ip_compute_csum
);
EXPORT_SYMBOL
(
ip_fast_csum
);
EXPORT_SYMBOL
(
ip_fast_csum
);
/* hand-coded assembly */
#include <asm/io.h>
EXPORT_SYMBOL
(
__ia64_memcpy_fromio
);
...
...
@@ -58,9 +53,11 @@ EXPORT_SYMBOL_NOVERS(__up);
EXPORT_SYMBOL
(
clear_page
);
#ifdef CONFIG_VIRTUAL_MEM_MAP
#include <linux/bootmem.h>
#include <asm/pgtable.h>
EXPORT_SYMBOL
(
vmalloc_end
);
EXPORT_SYMBOL
(
ia64_pfn_valid
);
EXPORT_SYMBOL
(
max_low_pfn
);
/* defined by bootmem.c, but not exported by generic code */
#endif
#include <asm/processor.h>
...
...
arch/ia64/kernel/perfmon.c
View file @
e360aa91
...
...
@@ -4225,7 +4225,7 @@ pfm_context_load(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs)
ret
=
-
EBUSY
;
}
else
{
pfm_sessions
.
pfs_sys_use_dbregs
++
;
DPRINT
((
"load [%d] increased sys_use_dbreg=%
l
u
\n
"
,
task
->
pid
,
pfm_sessions
.
pfs_sys_use_dbregs
));
DPRINT
((
"load [%d] increased sys_use_dbreg=%u
\n
"
,
task
->
pid
,
pfm_sessions
.
pfs_sys_use_dbregs
));
set_dbregs
=
1
;
}
}
...
...
arch/ia64/kernel/process.c
View file @
e360aa91
...
...
@@ -685,12 +685,16 @@ machine_restart (char *restart_cmd)
(
*
efi
.
reset_system
)(
EFI_RESET_WARM
,
0
,
0
,
0
);
}
EXPORT_SYMBOL
(
machine_restart
);
void
machine_halt
(
void
)
{
cpu_halt
();
}
EXPORT_SYMBOL
(
machine_halt
);
void
machine_power_off
(
void
)
{
...
...
@@ -698,3 +702,5 @@ machine_power_off (void)
pm_power_off
();
machine_halt
();
}
EXPORT_SYMBOL
(
machine_power_off
);
arch/ia64/kernel/setup.c
View file @
e360aa91
...
...
@@ -327,9 +327,11 @@ setup_arch (char **cmdline_p)
* because we don't *really* know whether there's anything there, but we hope that
* all new boxes will implement HCDP.
*/
extern
unsigned
char
acpi_legacy_devices
;
if
(
!
efi
.
hcdp
&&
acpi_legacy_devices
)
setup_serial_legacy
();
{
extern
unsigned
char
acpi_legacy_devices
;
if
(
!
efi
.
hcdp
&&
acpi_legacy_devices
)
setup_serial_legacy
();
}
#endif
#ifdef CONFIG_VT
...
...
arch/ia64/lib/checksum.c
View file @
e360aa91
/*
* Network checksum routines
*
* Copyright (C) 1999 Hewlett-Packard Co
*
Copyright (C) 1999
Stephane Eranian <eranian@hpl.hp.com>
* Copyright (C) 1999
, 2003
Hewlett-Packard Co
*
Stephane Eranian <eranian@hpl.hp.com>
*
* Most of the code coming from arch/alpha/lib/checksum.c
*
...
...
@@ -10,6 +10,7 @@
* in an architecture-specific manner due to speed..
*/
#include <linux/module.h>
#include <linux/string.h>
#include <asm/byteorder.h>
...
...
@@ -40,6 +41,8 @@ csum_tcpudp_magic (unsigned long saddr, unsigned long daddr, unsigned short len,
((
unsigned
long
)
proto
<<
8
));
}
EXPORT_SYMBOL
(
csum_tcpudp_magic
);
unsigned
int
csum_tcpudp_nofold
(
unsigned
long
saddr
,
unsigned
long
daddr
,
unsigned
short
len
,
unsigned
short
proto
,
unsigned
int
sum
)
...
...
@@ -84,6 +87,7 @@ csum_partial (const unsigned char * buff, int len, unsigned int sum)
return
result
;
}
EXPORT_SYMBOL
(
csum_partial
);
/*
* this routine is used for miscellaneous IP-like checksums, mainly
...
...
@@ -94,3 +98,5 @@ ip_compute_csum (unsigned char * buff, int len)
{
return
~
do_csum
(
buff
,
len
);
}
EXPORT_SYMBOL
(
ip_compute_csum
);
arch/ia64/lib/csum_partial_copy.c
View file @
e360aa91
/*
* Network Checksum & Copy routine
*
* Copyright (C) 1999 Hewlett-Packard Co
*
Copyright (C) 1999
Stephane Eranian <eranian@hpl.hp.com>
* Copyright (C) 1999
, 2003
Hewlett-Packard Co
*
Stephane Eranian <eranian@hpl.hp.com>
*
* Most of the code has been imported from Linux/Alpha
*/
#include <linux/module.h>
#include <linux/types.h>
#include <linux/string.h>
...
...
@@ -146,3 +147,4 @@ csum_partial_copy_nocheck(const char *src, char *dst, int len, unsigned int sum)
return
do_csum_partial_copy_from_user
(
src
,
dst
,
len
,
sum
,
NULL
);
}
EXPORT_SYMBOL
(
csum_partial_copy_nocheck
);
arch/ia64/mm/init.c
View file @
e360aa91
...
...
@@ -13,6 +13,7 @@
#include <linux/elf.h>
#include <linux/mm.h>
#include <linux/mmzone.h>
#include <linux/module.h>
#include <linux/personality.h>
#include <linux/reboot.h>
#include <linux/slab.h>
...
...
@@ -43,6 +44,8 @@ unsigned long MAX_DMA_ADDRESS = PAGE_OFFSET + 0x100000000UL;
#ifdef CONFIG_VIRTUAL_MEM_MAP
unsigned
long
vmalloc_end
=
VMALLOC_END_INIT
;
struct
page
*
vmem_map
;
EXPORT_SYMBOL
(
vmem_map
);
#endif
static
int
pgt_cache_water
[
2
]
=
{
25
,
50
};
...
...
arch/ia64/mm/numa.c
View file @
e360aa91
...
...
@@ -11,12 +11,19 @@
*/
#include <linux/config.h>
#include <linux/cpu.h>
#include <linux/kernel.h>
#include <linux/memblk.h>
#include <linux/mm.h>
#include <linux/node.h>
#include <linux/init.h>
#include <linux/bootmem.h>
#include <asm/numa.h>
static
struct
memblk
*
sysfs_memblks
;
static
struct
node
*
sysfs_nodes
;
static
struct
cpu
*
sysfs_cpus
;
/*
* The following structures are usually initialized by ACPI or
* similar mechanisms and describe the NUMA characteristics of the machine.
...
...
@@ -43,3 +50,49 @@ paddr_to_nid(unsigned long paddr)
return
(
i
<
num_memblks
)
?
node_memblk
[
i
].
nid
:
(
num_memblks
?
-
1
:
0
);
}
static
int
__init
topology_init
(
void
)
{
int
i
,
err
=
0
;
sysfs_nodes
=
kmalloc
(
sizeof
(
struct
node
)
*
numnodes
,
GFP_KERNEL
);
if
(
!
sysfs_nodes
)
{
err
=
-
ENOMEM
;
goto
out
;
}
sysfs_memblks
=
kmalloc
(
sizeof
(
struct
memblk
)
*
num_memblks
,
GFP_KERNEL
);
if
(
!
sysfs_memblks
)
{
kfree
(
sysfs_nodes
);
err
=
-
ENOMEM
;
goto
out
;
}
sysfs_cpus
=
kmalloc
(
sizeof
(
struct
cpu
)
*
NR_CPUS
,
GFP_KERNEL
);
if
(
!
sysfs_cpus
)
{
kfree
(
sysfs_memblks
);
kfree
(
sysfs_nodes
);
err
=
-
ENOMEM
;
goto
out
;
}
for
(
i
=
0
;
i
<
numnodes
;
i
++
)
if
((
err
=
register_node
(
&
sysfs_nodes
[
i
],
i
,
0
)))
goto
out
;
for
(
i
=
0
;
i
<
num_memblks
;
i
++
)
if
((
err
=
register_memblk
(
&
sysfs_memblks
[
i
],
i
,
&
sysfs_nodes
[
memblk_to_node
(
i
)])))
goto
out
;
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
if
(
cpu_online
(
i
))
if
((
err
=
register_cpu
(
&
sysfs_cpus
[
i
],
i
,
&
sysfs_nodes
[
cpu_to_node
(
i
)])))
goto
out
;
out:
return
err
;
}
__initcall
(
topology_init
);
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