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
54105201
Commit
54105201
authored
Feb 21, 2004
by
Keith M. Wesolowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC32]: Remove stale SMP irq implementation.
parent
69914796
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
67 deletions
+8
-67
include/asm-sparc/hardirq.h
include/asm-sparc/hardirq.h
+5
-67
include/asm-sparc/thread_info.h
include/asm-sparc/thread_info.h
+3
-0
No files found.
include/asm-sparc/hardirq.h
View file @
54105201
...
@@ -15,15 +15,6 @@
...
@@ -15,15 +15,6 @@
/* entry.S is sensitive to the offsets of these fields */
/* XXX P3 Is it? */
/* entry.S is sensitive to the offsets of these fields */
/* XXX P3 Is it? */
typedef
struct
{
typedef
struct
{
unsigned
int
__softirq_pending
;
unsigned
int
__softirq_pending
;
unsigned
int
__unused_1
;
#ifndef CONFIG_SMP
unsigned
int
WAS__local_irq_count
;
#else
unsigned
int
__unused_on_SMP
;
/* DaveM says use brlock for SMP irq. KAO */
#endif
unsigned
int
WAS__local_bh_count
;
unsigned
int
__syscall_count
;
struct
task_struct
*
__ksoftirqd_task
;
}
____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 */
...
@@ -86,11 +77,11 @@ typedef struct {
...
@@ -86,11 +77,11 @@ typedef struct {
#define hardirq_trylock() (!in_interrupt())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define hardirq_endlock() do { } while (0)
#ifndef CONFIG_SMP
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
#ifdef CONFIG_PREEMPT
# define in_atomic() (preempt_count() != kernel_locked())
#include <linux/smp_lock.h>
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
#else
# define in_atomic() (preempt_count() != 0)
# define in_atomic() (preempt_count() != 0)
...
@@ -104,63 +95,10 @@ do { \
...
@@ -104,63 +95,10 @@ do { \
preempt_enable_no_resched(); \
preempt_enable_no_resched(); \
} while (0)
} while (0)
#else
/* Note that local_irq_count() is replaced by sparc64 specific version for SMP */
/* XXX This is likely to be broken by the above preempt-based IRQs */
#define irq_enter() br_read_lock(BR_GLOBALIRQ_LOCK)
#undef local_irq_count
#define local_irq_count(cpu) (__brlock_array[cpu][BR_GLOBALIRQ_LOCK])
#define irq_exit() br_read_unlock(BR_GLOBALIRQ_LOCK)
#endif
#ifdef CONFIG_PREEMPT
# define in_atomic() (preempt_count() != kernel_locked())
#else
# define in_atomic() (preempt_count() != 0)
#endif
#ifndef CONFIG_SMP
#ifndef CONFIG_SMP
# define synchronize_irq(irq) barrier()
#define synchronize_irq(irq) barrier()
#else
/* SMP */
#else
/* (CONFIG_SMP) */
static
__inline__
int
irqs_running
(
void
)
{
int
i
;
for
(
i
=
0
;
i
<
smp_num_cpus
;
i
++
)
if
(
local_irq_count
(
cpu_logical_map
(
i
)))
return
1
;
return
0
;
}
extern
unsigned
char
global_irq_holder
;
static
inline
void
release_irqlock
(
int
cpu
)
{
/* if we didn't own the irq lock, just ignore... */
if
(
global_irq_holder
==
(
unsigned
char
)
cpu
)
{
global_irq_holder
=
NO_PROC_ID
;
br_write_unlock
(
BR_GLOBALIRQ_LOCK
);
}
}
#if 0
static inline int hardirq_trylock(int cpu)
{
spinlock_t *lock = &__br_write_locks[BR_GLOBALIRQ_LOCK].lock;
return (!local_irq_count(cpu) && !spin_is_locked(lock));
}
#endif
extern
void
synchronize_irq
(
unsigned
int
irq
);
extern
void
synchronize_irq
(
unsigned
int
irq
);
#endif
/* SMP */
#endif
/* CONFIG_SMP */
// extern void show_stack(unsigned long * esp);
#endif
/* __SPARC_HARDIRQ_H */
#endif
/* __SPARC_HARDIRQ_H */
include/asm-sparc/thread_info.h
View file @
54105201
...
@@ -53,6 +53,8 @@ struct thread_info {
...
@@ -53,6 +53,8 @@ struct thread_info {
/*
/*
* macros/functions for gaining access to the thread information structure
* macros/functions for gaining access to the thread information structure
*
* preempt_count needs to be 1 initially, until the scheduler is functional.
*/
*/
#define INIT_THREAD_INFO(tsk) \
#define INIT_THREAD_INFO(tsk) \
{ \
{ \
...
@@ -61,6 +63,7 @@ struct thread_info {
...
@@ -61,6 +63,7 @@ struct thread_info {
.exec_domain = &default_exec_domain, \
.exec_domain = &default_exec_domain, \
.flags = 0, \
.flags = 0, \
.cpu = 0, \
.cpu = 0, \
.preempt_count = 1, \
.restart_block = { \
.restart_block = { \
.fn = do_no_restart_syscall, \
.fn = do_no_restart_syscall, \
}, \
}, \
...
...
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