Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
72274c9e
Commit
72274c9e
authored
Nov 08, 2005
by
Russell King
Committed by
Russell King
Nov 08, 2005
Browse files
Options
Browse Files
Download
Plain Diff
Merge with ARM SMP tree
parents
5285eb57
37ee16ae
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
91 additions
and
0 deletions
+91
-0
arch/arm/Kconfig
arch/arm/Kconfig
+10
-0
arch/arm/kernel/entry-armv.S
arch/arm/kernel/entry-armv.S
+7
-0
arch/arm/kernel/irq.c
arch/arm/kernel/irq.c
+1
-0
arch/arm/kernel/smp.c
arch/arm/kernel/smp.c
+34
-0
include/asm-arm/hardirq.h
include/asm-arm/hardirq.h
+1
-0
include/asm-arm/smp.h
include/asm-arm/smp.h
+38
-0
No files found.
arch/arm/Kconfig
View file @
72274c9e
...
@@ -356,6 +356,16 @@ config HOTPLUG_CPU
...
@@ -356,6 +356,16 @@ config HOTPLUG_CPU
Say Y here to experiment with turning CPUs off and on. CPUs
Say Y here to experiment with turning CPUs off and on. CPUs
can be controlled through /sys/devices/system/cpu.
can be controlled through /sys/devices/system/cpu.
config LOCAL_TIMERS
bool "Use local timer interrupts"
depends on SMP && n
default y
help
Enable support for local timers on SMP platforms, rather then the
legacy IPI broadcast method. Local timers allows the system
accounting to be spread across the timer interval, preventing a
"thundering herd" at every timer tick.
config PREEMPT
config PREEMPT
bool "Preemptible Kernel (EXPERIMENTAL)"
bool "Preemptible Kernel (EXPERIMENTAL)"
depends on EXPERIMENTAL
depends on EXPERIMENTAL
...
...
arch/arm/kernel/entry-armv.S
View file @
72274c9e
...
@@ -47,6 +47,13 @@
...
@@ -47,6 +47,13 @@
movne
r0
,
sp
movne
r0
,
sp
adrne
lr
,
1
b
adrne
lr
,
1
b
bne
do_IPI
bne
do_IPI
#ifdef CONFIG_LOCAL_TIMERS
test_for_ltirq
r0
,
r6
,
r5
,
lr
movne
r0
,
sp
adrne
lr
,
1
b
bne
do_local_timer
#endif
#endif
#endif
.
endm
.
endm
...
...
arch/arm/kernel/irq.c
View file @
72274c9e
...
@@ -264,6 +264,7 @@ unlock:
...
@@ -264,6 +264,7 @@ unlock:
#endif
#endif
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
show_ipi_list
(
p
);
show_ipi_list
(
p
);
show_local_irqs
(
p
);
#endif
#endif
seq_printf
(
p
,
"Err: %10lu
\n
"
,
irq_err_count
);
seq_printf
(
p
,
"Err: %10lu
\n
"
,
irq_err_count
);
}
}
...
...
arch/arm/kernel/smp.c
View file @
72274c9e
...
@@ -184,6 +184,11 @@ int __cpuexit __cpu_disable(void)
...
@@ -184,6 +184,11 @@ int __cpuexit __cpu_disable(void)
*/
*/
migrate_irqs
();
migrate_irqs
();
/*
* Stop the local timer for this CPU.
*/
local_timer_stop
(
cpu
);
/*
/*
* Flush user cache and TLB mappings, and then remove this CPU
* Flush user cache and TLB mappings, and then remove this CPU
* from the vm mask set of all processes.
* from the vm mask set of all processes.
...
@@ -289,6 +294,11 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
...
@@ -289,6 +294,11 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
*/
*/
cpu_set
(
cpu
,
cpu_online_map
);
cpu_set
(
cpu
,
cpu_online_map
);
/*
* Setup local timer for this CPU.
*/
local_timer_setup
(
cpu
);
/*
/*
* OK, it's off to the idle thread for us
* OK, it's off to the idle thread for us
*/
*/
...
@@ -454,6 +464,18 @@ void show_ipi_list(struct seq_file *p)
...
@@ -454,6 +464,18 @@ void show_ipi_list(struct seq_file *p)
seq_putc
(
p
,
'\n'
);
seq_putc
(
p
,
'\n'
);
}
}
void
show_local_irqs
(
struct
seq_file
*
p
)
{
unsigned
int
cpu
;
seq_printf
(
p
,
"LOC: "
);
for_each_present_cpu
(
cpu
)
seq_printf
(
p
,
"%10u "
,
irq_stat
[
cpu
].
local_timer_irqs
);
seq_putc
(
p
,
'\n'
);
}
static
void
ipi_timer
(
struct
pt_regs
*
regs
)
static
void
ipi_timer
(
struct
pt_regs
*
regs
)
{
{
int
user
=
user_mode
(
regs
);
int
user
=
user_mode
(
regs
);
...
@@ -464,6 +486,18 @@ static void ipi_timer(struct pt_regs *regs)
...
@@ -464,6 +486,18 @@ static void ipi_timer(struct pt_regs *regs)
irq_exit
();
irq_exit
();
}
}
#ifdef CONFIG_LOCAL_TIMERS
asmlinkage
void
do_local_timer
(
struct
pt_regs
*
regs
)
{
int
cpu
=
smp_processor_id
();
if
(
local_timer_ack
())
{
irq_stat
[
cpu
].
local_timer_irqs
++
;
ipi_timer
(
regs
);
}
}
#endif
/*
/*
* ipi_call_function - handle IPI from smp_call_function()
* ipi_call_function - handle IPI from smp_call_function()
*
*
...
...
include/asm-arm/hardirq.h
View file @
72274c9e
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
typedef
struct
{
typedef
struct
{
unsigned
int
__softirq_pending
;
unsigned
int
__softirq_pending
;
unsigned
int
local_timer_irqs
;
}
____cacheline_aligned
irq_cpustat_t
;
}
____cacheline_aligned
irq_cpustat_t
;
#include <linux/irq_cpustat.h>
/* Standard mappings for irq_cpustat_t above */
#include <linux/irq_cpustat.h>
/* Standard mappings for irq_cpustat_t above */
...
...
include/asm-arm/smp.h
View file @
72274c9e
...
@@ -92,4 +92,42 @@ extern void platform_cpu_die(unsigned int cpu);
...
@@ -92,4 +92,42 @@ extern void platform_cpu_die(unsigned int cpu);
extern
int
platform_cpu_kill
(
unsigned
int
cpu
);
extern
int
platform_cpu_kill
(
unsigned
int
cpu
);
extern
void
platform_cpu_enable
(
unsigned
int
cpu
);
extern
void
platform_cpu_enable
(
unsigned
int
cpu
);
#ifdef CONFIG_LOCAL_TIMERS
/*
* Setup a local timer interrupt for a CPU.
*/
extern
void
local_timer_setup
(
unsigned
int
cpu
);
/*
* Stop a local timer interrupt.
*/
extern
void
local_timer_stop
(
unsigned
int
cpu
);
/*
* Platform provides this to acknowledge a local timer IRQ
*/
extern
int
local_timer_ack
(
void
);
#else
static
inline
void
local_timer_setup
(
unsigned
int
cpu
)
{
}
static
inline
void
local_timer_stop
(
unsigned
int
cpu
)
{
}
#endif
/*
* show local interrupt info
*/
extern
void
show_local_irqs
(
struct
seq_file
*
);
/*
* Called from assembly, this is the local timer IRQ handler
*/
asmlinkage
void
do_local_timer
(
struct
pt_regs
*
);
#endif
/* ifndef __ASM_ARM_SMP_H */
#endif
/* ifndef __ASM_ARM_SMP_H */
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