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
3a883dd4
Commit
3a883dd4
authored
Jul 25, 2003
by
David Mosberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ia64: Take advantage of <asm/sections.h>.
parent
fa3fc4fe
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
53 deletions
+23
-53
arch/ia64/kernel/patch.c
arch/ia64/kernel/patch.c
+3
-10
arch/ia64/kernel/setup.c
arch/ia64/kernel/setup.c
+3
-24
arch/ia64/kernel/time.c
arch/ia64/kernel/time.c
+2
-2
arch/ia64/kernel/unwind.c
arch/ia64/kernel/unwind.c
+4
-3
arch/ia64/mm/init.c
arch/ia64/mm/init.c
+8
-11
arch/ia64/vmlinux.lds.S
arch/ia64/vmlinux.lds.S
+3
-3
No files found.
arch/ia64/kernel/patch.c
View file @
3a883dd4
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include <asm/patch.h>
#include <asm/patch.h>
#include <asm/processor.h>
#include <asm/processor.h>
#include <asm/sections.h>
#include <asm/system.h>
#include <asm/system.h>
#include <asm/unistd.h>
#include <asm/unistd.h>
...
@@ -176,16 +177,8 @@ patch_brl_fsys_bubble_down (unsigned long start, unsigned long end)
...
@@ -176,16 +177,8 @@ patch_brl_fsys_bubble_down (unsigned long start, unsigned long end)
void
void
ia64_patch_gate
(
void
)
ia64_patch_gate
(
void
)
{
{
extern
char
__start_gate_mckinley_e9_patchlist
;
# define START(name) ((unsigned long) __start_gate_##name##_patchlist)
extern
char
__end_gate_mckinley_e9_patchlist
;
# define END(name) ((unsigned long)__end_gate_##name##_patchlist)
extern
char
__start_gate_vtop_patchlist
;
extern
char
__end_gate_vtop_patchlist
;
extern
char
__start_gate_fsyscall_patchlist
;
extern
char
__end_gate_fsyscall_patchlist
;
extern
char
__start_gate_brl_fsys_bubble_down_patchlist
;
extern
char
__end_gate_brl_fsys_bubble_down_patchlist
;
# define START(name) ((unsigned long) &__start_gate_##name##_patchlist)
# define END(name) ((unsigned long)&__end_gate_##name##_patchlist)
patch_fsyscall_table
(
START
(
fsyscall
),
END
(
fsyscall
));
patch_fsyscall_table
(
START
(
fsyscall
),
END
(
fsyscall
));
patch_brl_fsys_bubble_down
(
START
(
brl_fsys_bubble_down
),
END
(
brl_fsys_bubble_down
));
patch_brl_fsys_bubble_down
(
START
(
brl_fsys_bubble_down
),
END
(
brl_fsys_bubble_down
));
...
...
arch/ia64/kernel/setup.c
View file @
3a883dd4
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
#include <asm/pgtable.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
#include <asm/processor.h>
#include <asm/sal.h>
#include <asm/sal.h>
#include <asm/sections.h>
#include <asm/smp.h>
#include <asm/smp.h>
#include <asm/system.h>
#include <asm/system.h>
#include <asm/unistd.h>
#include <asm/unistd.h>
...
@@ -49,8 +50,6 @@
...
@@ -49,8 +50,6 @@
# error "struct cpuinfo_ia64 too big!"
# error "struct cpuinfo_ia64 too big!"
#endif
#endif
extern
char
_end
;
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
unsigned
long
__per_cpu_offset
[
NR_CPUS
];
unsigned
long
__per_cpu_offset
[
NR_CPUS
];
#endif
#endif
...
@@ -279,7 +278,6 @@ sort_regions (struct rsvd_region *rsvd_region, int max)
...
@@ -279,7 +278,6 @@ sort_regions (struct rsvd_region *rsvd_region, int max)
static
void
static
void
find_memory
(
void
)
find_memory
(
void
)
{
{
# define KERNEL_END (&_end)
unsigned
long
bootmap_size
;
unsigned
long
bootmap_size
;
int
n
=
0
;
int
n
=
0
;
...
@@ -300,7 +298,7 @@ find_memory (void)
...
@@ -300,7 +298,7 @@ find_memory (void)
n
++
;
n
++
;
rsvd_region
[
n
].
start
=
(
unsigned
long
)
ia64_imva
((
void
*
)
KERNEL_START
);
rsvd_region
[
n
].
start
=
(
unsigned
long
)
ia64_imva
((
void
*
)
KERNEL_START
);
rsvd_region
[
n
].
end
=
(
unsigned
long
)
ia64_imva
(
KERNEL_END
);
rsvd_region
[
n
].
end
=
(
unsigned
long
)
ia64_imva
(
_end
);
n
++
;
n
++
;
#ifdef CONFIG_BLK_DEV_INITRD
#ifdef CONFIG_BLK_DEV_INITRD
...
@@ -363,13 +361,12 @@ find_memory (void)
...
@@ -363,13 +361,12 @@ find_memory (void)
void
__init
void
__init
setup_arch
(
char
**
cmdline_p
)
setup_arch
(
char
**
cmdline_p
)
{
{
extern
unsigned
long
*
__start___vtop_patchlist
[],
*
__end____vtop_patchlist
[];
extern
unsigned
long
ia64_iobase
;
extern
unsigned
long
ia64_iobase
;
unsigned
long
phys_iobase
;
unsigned
long
phys_iobase
;
unw_init
();
unw_init
();
ia64_patch_vtop
((
u64
)
__start___vtop_patchlist
,
(
u64
)
__end___
_
vtop_patchlist
);
ia64_patch_vtop
((
u64
)
__start___vtop_patchlist
,
(
u64
)
__end___vtop_patchlist
);
*
cmdline_p
=
__va
(
ia64_boot_param
->
command_line
);
*
cmdline_p
=
__va
(
ia64_boot_param
->
command_line
);
strlcpy
(
saved_command_line
,
*
cmdline_p
,
sizeof
(
saved_command_line
));
strlcpy
(
saved_command_line
,
*
cmdline_p
,
sizeof
(
saved_command_line
));
...
@@ -390,19 +387,6 @@ setup_arch (char **cmdline_p)
...
@@ -390,19 +387,6 @@ setup_arch (char **cmdline_p)
find_memory
();
find_memory
();
#if 0
/* XXX fix me */
init_mm.start_code = (unsigned long) &_stext;
init_mm.end_code = (unsigned long) &_etext;
init_mm.end_data = (unsigned long) &_edata;
init_mm.brk = (unsigned long) &_end;
code_resource.start = virt_to_bus(&_text);
code_resource.end = virt_to_bus(&_etext) - 1;
data_resource.start = virt_to_bus(&_etext);
data_resource.end = virt_to_bus(&_edata) - 1;
#endif
/* process SAL system table: */
/* process SAL system table: */
ia64_sal_init
(
efi
.
sal_systab
);
ia64_sal_init
(
efi
.
sal_systab
);
...
@@ -687,7 +671,6 @@ get_max_cacheline_size (void)
...
@@ -687,7 +671,6 @@ get_max_cacheline_size (void)
void
void
cpu_init
(
void
)
cpu_init
(
void
)
{
{
extern
char
__per_cpu_start
[],
__phys_per_cpu_start
[];
extern
void
__init
ia64_mmu_init
(
void
*
);
extern
void
__init
ia64_mmu_init
(
void
*
);
unsigned
long
num_phys_stacked
;
unsigned
long
num_phys_stacked
;
pal_vm_info_2_u_t
vmi
;
pal_vm_info_2_u_t
vmi
;
...
@@ -696,7 +679,6 @@ cpu_init (void)
...
@@ -696,7 +679,6 @@ cpu_init (void)
void
*
cpu_data
;
void
*
cpu_data
;
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
extern
char
__per_cpu_end
[];
int
cpu
;
int
cpu
;
/*
/*
...
@@ -812,9 +794,6 @@ cpu_init (void)
...
@@ -812,9 +794,6 @@ cpu_init (void)
void
void
check_bugs
(
void
)
check_bugs
(
void
)
{
{
extern
char
__start___mckinley_e9_bundles
[];
extern
char
__end___mckinley_e9_bundles
[];
ia64_patch_mckinley_e9
((
unsigned
long
)
__start___mckinley_e9_bundles
,
ia64_patch_mckinley_e9
((
unsigned
long
)
__start___mckinley_e9_bundles
,
(
unsigned
long
)
__end___mckinley_e9_bundles
);
(
unsigned
long
)
__end___mckinley_e9_bundles
);
}
}
arch/ia64/kernel/time.c
View file @
3a883dd4
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include <asm/hw_irq.h>
#include <asm/hw_irq.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/sal.h>
#include <asm/sal.h>
#include <asm/sections.h>
#include <asm/system.h>
#include <asm/system.h>
extern
unsigned
long
wall_jiffies
;
extern
unsigned
long
wall_jiffies
;
...
@@ -41,7 +42,6 @@ static void
...
@@ -41,7 +42,6 @@ static void
do_profile
(
unsigned
long
ip
)
do_profile
(
unsigned
long
ip
)
{
{
extern
unsigned
long
prof_cpu_mask
;
extern
unsigned
long
prof_cpu_mask
;
extern
char
_stext
;
if
(
!
prof_buffer
)
if
(
!
prof_buffer
)
return
;
return
;
...
@@ -49,7 +49,7 @@ do_profile (unsigned long ip)
...
@@ -49,7 +49,7 @@ do_profile (unsigned long ip)
if
(
!
((
1UL
<<
smp_processor_id
())
&
prof_cpu_mask
))
if
(
!
((
1UL
<<
smp_processor_id
())
&
prof_cpu_mask
))
return
;
return
;
ip
-=
(
unsigned
long
)
&
_stext
;
ip
-=
(
unsigned
long
)
_stext
;
ip
>>=
prof_shift
;
ip
>>=
prof_shift
;
/*
/*
* Don't ignore out-of-bounds IP values silently, put them into the last
* Don't ignore out-of-bounds IP values silently, put them into the last
...
...
arch/ia64/kernel/unwind.c
View file @
3a883dd4
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/ptrace_offsets.h>
#include <asm/ptrace_offsets.h>
#include <asm/rse.h>
#include <asm/rse.h>
#include <asm/sections.h>
#include <asm/system.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
...
@@ -2178,7 +2179,7 @@ __initcall(create_gate_table);
...
@@ -2178,7 +2179,7 @@ __initcall(create_gate_table);
void
__init
void
__init
unw_init
(
void
)
unw_init
(
void
)
{
{
extern
int
ia64_unw_start
,
ia64_unw_end
,
__gp
;
extern
char
__gp
[]
;
extern
void
unw_hash_index_t_is_too_narrow
(
void
);
extern
void
unw_hash_index_t_is_too_narrow
(
void
);
long
i
,
off
;
long
i
,
off
;
...
@@ -2211,8 +2212,8 @@ unw_init (void)
...
@@ -2211,8 +2212,8 @@ unw_init (void)
unw
.
lru_head
=
UNW_CACHE_SIZE
-
1
;
unw
.
lru_head
=
UNW_CACHE_SIZE
-
1
;
unw
.
lru_tail
=
0
;
unw
.
lru_tail
=
0
;
init_unwind_table
(
&
unw
.
kernel_table
,
"kernel"
,
KERNEL_START
,
(
unsigned
long
)
&
__gp
,
init_unwind_table
(
&
unw
.
kernel_table
,
"kernel"
,
KERNEL_START
,
(
unsigned
long
)
__gp
,
&
ia64_unw_start
,
&
ia64_unw_e
nd
);
__start_unwind
,
__end_unwi
nd
);
}
}
/*
/*
...
...
arch/ia64/mm/init.c
View file @
3a883dd4
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include <asm/patch.h>
#include <asm/patch.h>
#include <asm/pgalloc.h>
#include <asm/pgalloc.h>
#include <asm/sal.h>
#include <asm/sal.h>
#include <asm/sections.h>
#include <asm/system.h>
#include <asm/system.h>
#include <asm/tlb.h>
#include <asm/tlb.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
...
@@ -34,9 +35,6 @@
...
@@ -34,9 +35,6 @@
DEFINE_PER_CPU
(
struct
mmu_gather
,
mmu_gathers
);
DEFINE_PER_CPU
(
struct
mmu_gather
,
mmu_gathers
);
/* References to section boundaries: */
extern
char
_stext
,
_etext
,
_edata
,
__init_begin
,
__init_end
,
_end
;
extern
void
ia64_tlb_init
(
void
);
extern
void
ia64_tlb_init
(
void
);
unsigned
long
MAX_DMA_ADDRESS
=
PAGE_OFFSET
+
0x100000000UL
;
unsigned
long
MAX_DMA_ADDRESS
=
PAGE_OFFSET
+
0x100000000UL
;
...
@@ -151,8 +149,8 @@ free_initmem (void)
...
@@ -151,8 +149,8 @@ free_initmem (void)
{
{
unsigned
long
addr
,
eaddr
;
unsigned
long
addr
,
eaddr
;
addr
=
(
unsigned
long
)
ia64_imva
(
&
__init_begin
);
addr
=
(
unsigned
long
)
ia64_imva
(
__init_begin
);
eaddr
=
(
unsigned
long
)
ia64_imva
(
&
__init_end
);
eaddr
=
(
unsigned
long
)
ia64_imva
(
__init_end
);
while
(
addr
<
eaddr
)
{
while
(
addr
<
eaddr
)
{
ClearPageReserved
(
virt_to_page
(
addr
));
ClearPageReserved
(
virt_to_page
(
addr
));
set_page_count
(
virt_to_page
(
addr
),
1
);
set_page_count
(
virt_to_page
(
addr
),
1
);
...
@@ -161,7 +159,7 @@ free_initmem (void)
...
@@ -161,7 +159,7 @@ free_initmem (void)
addr
+=
PAGE_SIZE
;
addr
+=
PAGE_SIZE
;
}
}
printk
(
KERN_INFO
"Freeing unused kernel memory: %ldkB freed
\n
"
,
printk
(
KERN_INFO
"Freeing unused kernel memory: %ldkB freed
\n
"
,
(
&
__init_end
-
&
__init_begin
)
>>
10
);
(
__init_end
-
__init_begin
)
>>
10
);
}
}
void
void
...
@@ -308,7 +306,6 @@ static void
...
@@ -308,7 +306,6 @@ static void
setup_gate
(
void
)
setup_gate
(
void
)
{
{
struct
page
*
page
;
struct
page
*
page
;
extern
char
__start_gate_section
[];
/*
/*
* Map the gate page twice: once read-only to export the ELF headers etc. and once
* Map the gate page twice: once read-only to export the ELF headers etc. and once
...
@@ -671,7 +668,7 @@ mem_init (void)
...
@@ -671,7 +668,7 @@ mem_init (void)
kclist_add
(
&
kcore_mem
,
__va
(
0
),
max_low_pfn
*
PAGE_SIZE
);
kclist_add
(
&
kcore_mem
,
__va
(
0
),
max_low_pfn
*
PAGE_SIZE
);
kclist_add
(
&
kcore_vmem
,
(
void
*
)
VMALLOC_START
,
VMALLOC_END
-
VMALLOC_START
);
kclist_add
(
&
kcore_vmem
,
(
void
*
)
VMALLOC_START
,
VMALLOC_END
-
VMALLOC_START
);
kclist_add
(
&
kcore_kernel
,
&
_stext
,
&
_end
-
&
_stext
);
kclist_add
(
&
kcore_kernel
,
_stext
,
_end
-
_stext
);
for_each_pgdat
(
pgdat
)
for_each_pgdat
(
pgdat
)
totalram_pages
+=
free_all_bootmem_node
(
pgdat
);
totalram_pages
+=
free_all_bootmem_node
(
pgdat
);
...
@@ -679,9 +676,9 @@ mem_init (void)
...
@@ -679,9 +676,9 @@ mem_init (void)
reserved_pages
=
0
;
reserved_pages
=
0
;
efi_memmap_walk
(
count_reserved_pages
,
&
reserved_pages
);
efi_memmap_walk
(
count_reserved_pages
,
&
reserved_pages
);
codesize
=
(
unsigned
long
)
&
_etext
-
(
unsigned
long
)
&
_stext
;
codesize
=
(
unsigned
long
)
_etext
-
(
unsigned
long
)
_stext
;
datasize
=
(
unsigned
long
)
&
_edata
-
(
unsigned
long
)
&
_etext
;
datasize
=
(
unsigned
long
)
_edata
-
(
unsigned
long
)
_etext
;
initsize
=
(
unsigned
long
)
&
__init_end
-
(
unsigned
long
)
&
__init_begin
;
initsize
=
(
unsigned
long
)
__init_end
-
(
unsigned
long
)
__init_begin
;
printk
(
KERN_INFO
"Memory: %luk/%luk available (%luk code, %luk reserved, "
printk
(
KERN_INFO
"Memory: %luk/%luk available (%luk code, %luk reserved, "
"%luk data, %luk init)
\n
"
,
(
unsigned
long
)
nr_free_pages
()
<<
(
PAGE_SHIFT
-
10
),
"%luk data, %luk init)
\n
"
,
(
unsigned
long
)
nr_free_pages
()
<<
(
PAGE_SHIFT
-
10
),
...
...
arch/ia64/vmlinux.lds.S
View file @
3a883dd4
...
@@ -59,7 +59,7 @@ SECTIONS
...
@@ -59,7 +59,7 @@ SECTIONS
{
{
__start___vtop_patchlist
=
.
;
__start___vtop_patchlist
=
.
;
*(.
data.patch.vtop
)
*(.
data.patch.vtop
)
__end___
_
vtop_patchlist
=
.
;
__end___vtop_patchlist
=
.
;
}
}
.
data.patch.
mckinley_e9
:
AT
(
ADDR
(
.
data
.
patch
.
mckinley_e9
)
-
LOAD_OFFSET
)
.
data.patch.
mckinley_e9
:
AT
(
ADDR
(
.
data
.
patch
.
mckinley_e9
)
-
LOAD_OFFSET
)
...
@@ -89,9 +89,9 @@ SECTIONS
...
@@ -89,9 +89,9 @@ SECTIONS
{
*(
.
IA_64
.
unwind_info
*)
}
{
*(
.
IA_64
.
unwind_info
*)
}
.
IA_64
.
unwind
:
AT
(
ADDR
(
.
IA_64
.
unwind
)
-
LOAD_OFFSET
)
.
IA_64
.
unwind
:
AT
(
ADDR
(
.
IA_64
.
unwind
)
-
LOAD_OFFSET
)
{
{
ia64_unw_start
=
.
;
__start_unwind
=
.
;
*(.
IA_64
.
unwind
*)
*(.
IA_64
.
unwind
*)
ia64_unw_e
nd
=
.
;
__end_unwi
nd
=
.
;
}
}
RODATA
RODATA
...
...
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