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
2d6ef4c5
Commit
2d6ef4c5
authored
May 30, 2004
by
Alexander Viro
Committed by
Linus Torvalds
May 30, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sparse alpha: #if abuses
#if where #ifdef should've been
parent
d8ef67d9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
17 deletions
+17
-17
arch/alpha/kernel/machvec_impl.h
arch/alpha/kernel/machvec_impl.h
+2
-2
arch/alpha/kernel/semaphore.c
arch/alpha/kernel/semaphore.c
+4
-4
arch/alpha/kernel/smp.c
arch/alpha/kernel/smp.c
+2
-2
include/asm-alpha/core_mcpcia.h
include/asm-alpha/core_mcpcia.h
+5
-5
include/asm-alpha/semaphore.h
include/asm-alpha/semaphore.h
+4
-4
No files found.
arch/alpha/kernel/machvec_impl.h
View file @
2d6ef4c5
...
@@ -20,10 +20,10 @@
...
@@ -20,10 +20,10 @@
#define TITAN_HAE_ADDRESS (&alpha_mv.hae_cache)
#define TITAN_HAE_ADDRESS (&alpha_mv.hae_cache)
#define WILDFIRE_HAE_ADDRESS (&alpha_mv.hae_cache)
#define WILDFIRE_HAE_ADDRESS (&alpha_mv.hae_cache)
#if CIA_ONE_HAE_WINDOW
#if
def
CIA_ONE_HAE_WINDOW
#define CIA_HAE_ADDRESS (&alpha_mv.hae_cache)
#define CIA_HAE_ADDRESS (&alpha_mv.hae_cache)
#endif
#endif
#if MCPCIA_ONE_HAE_WINDOW
#if
def
MCPCIA_ONE_HAE_WINDOW
#define MCPCIA_HAE_ADDRESS (&alpha_mv.hae_cache)
#define MCPCIA_HAE_ADDRESS (&alpha_mv.hae_cache)
#endif
#endif
...
...
arch/alpha/kernel/semaphore.c
View file @
2d6ef4c5
...
@@ -163,7 +163,7 @@ __up_wakeup(struct semaphore *sem)
...
@@ -163,7 +163,7 @@ __up_wakeup(struct semaphore *sem)
void
__sched
void
__sched
down
(
struct
semaphore
*
sem
)
down
(
struct
semaphore
*
sem
)
{
{
#if WAITQUEUE_DEBUG
#if
def
WAITQUEUE_DEBUG
CHECK_MAGIC
(
sem
->
__magic
);
CHECK_MAGIC
(
sem
->
__magic
);
#endif
#endif
#ifdef CONFIG_DEBUG_SEMAPHORE
#ifdef CONFIG_DEBUG_SEMAPHORE
...
@@ -177,7 +177,7 @@ down(struct semaphore *sem)
...
@@ -177,7 +177,7 @@ down(struct semaphore *sem)
int
__sched
int
__sched
down_interruptible
(
struct
semaphore
*
sem
)
down_interruptible
(
struct
semaphore
*
sem
)
{
{
#if WAITQUEUE_DEBUG
#if
def
WAITQUEUE_DEBUG
CHECK_MAGIC
(
sem
->
__magic
);
CHECK_MAGIC
(
sem
->
__magic
);
#endif
#endif
#ifdef CONFIG_DEBUG_SEMAPHORE
#ifdef CONFIG_DEBUG_SEMAPHORE
...
@@ -193,7 +193,7 @@ down_trylock(struct semaphore *sem)
...
@@ -193,7 +193,7 @@ down_trylock(struct semaphore *sem)
{
{
int
ret
;
int
ret
;
#if WAITQUEUE_DEBUG
#if
def
WAITQUEUE_DEBUG
CHECK_MAGIC
(
sem
->
__magic
);
CHECK_MAGIC
(
sem
->
__magic
);
#endif
#endif
...
@@ -212,7 +212,7 @@ down_trylock(struct semaphore *sem)
...
@@ -212,7 +212,7 @@ down_trylock(struct semaphore *sem)
void
void
up
(
struct
semaphore
*
sem
)
up
(
struct
semaphore
*
sem
)
{
{
#if WAITQUEUE_DEBUG
#if
def
WAITQUEUE_DEBUG
CHECK_MAGIC
(
sem
->
__magic
);
CHECK_MAGIC
(
sem
->
__magic
);
#endif
#endif
#ifdef CONFIG_DEBUG_SEMAPHORE
#ifdef CONFIG_DEBUG_SEMAPHORE
...
...
arch/alpha/kernel/smp.c
View file @
2d6ef4c5
...
@@ -779,7 +779,7 @@ handle_ipi(struct pt_regs *regs)
...
@@ -779,7 +779,7 @@ handle_ipi(struct pt_regs *regs)
void
void
smp_send_reschedule
(
int
cpu
)
smp_send_reschedule
(
int
cpu
)
{
{
#if DEBUG_IPI_MSG
#if
def
DEBUG_IPI_MSG
if
(
cpu
==
hard_smp_processor_id
())
if
(
cpu
==
hard_smp_processor_id
())
printk
(
KERN_WARNING
printk
(
KERN_WARNING
"smp_send_reschedule: Sending IPI to self.
\n
"
);
"smp_send_reschedule: Sending IPI to self.
\n
"
);
...
@@ -791,7 +791,7 @@ void
...
@@ -791,7 +791,7 @@ void
smp_send_stop
(
void
)
smp_send_stop
(
void
)
{
{
unsigned
long
to_whom
=
cpu_present_mask
&
~
(
1UL
<<
smp_processor_id
());
unsigned
long
to_whom
=
cpu_present_mask
&
~
(
1UL
<<
smp_processor_id
());
#if DEBUG_IPI_MSG
#if
def
DEBUG_IPI_MSG
if
(
hard_smp_processor_id
()
!=
boot_cpu_id
)
if
(
hard_smp_processor_id
()
!=
boot_cpu_id
)
printk
(
KERN_WARNING
"smp_send_stop: Not on boot cpu.
\n
"
);
printk
(
KERN_WARNING
"smp_send_stop: Not on boot cpu.
\n
"
);
#endif
#endif
...
...
include/asm-alpha/core_mcpcia.h
View file @
2d6ef4c5
...
@@ -167,7 +167,7 @@
...
@@ -167,7 +167,7 @@
/* Hack! Only words for bus 0. */
/* Hack! Only words for bus 0. */
#if
!
MCPCIA_ONE_HAE_WINDOW
#if
ndef
MCPCIA_ONE_HAE_WINDOW
#define MCPCIA_HAE_ADDRESS MCPCIA_HAE_MEM(4)
#define MCPCIA_HAE_ADDRESS MCPCIA_HAE_MEM(4)
#endif
#endif
#define MCPCIA_IACK_SC _MCPCIA_IACK_SC(4)
#define MCPCIA_IACK_SC _MCPCIA_IACK_SC(4)
...
@@ -351,7 +351,7 @@ __EXTERN_INLINE u8 mcpcia_readb(unsigned long in_addr)
...
@@ -351,7 +351,7 @@ __EXTERN_INLINE u8 mcpcia_readb(unsigned long in_addr)
unsigned
long
hose
=
in_addr
&
~
0xffffffffUL
;
unsigned
long
hose
=
in_addr
&
~
0xffffffffUL
;
unsigned
long
result
,
work
;
unsigned
long
result
,
work
;
#if
!
MCPCIA_ONE_HAE_WINDOW
#if
ndef
MCPCIA_ONE_HAE_WINDOW
unsigned
long
msb
;
unsigned
long
msb
;
msb
=
addr
&
~
MCPCIA_MEM_MASK
;
msb
=
addr
&
~
MCPCIA_MEM_MASK
;
set_hae
(
msb
);
set_hae
(
msb
);
...
@@ -370,7 +370,7 @@ __EXTERN_INLINE u16 mcpcia_readw(unsigned long in_addr)
...
@@ -370,7 +370,7 @@ __EXTERN_INLINE u16 mcpcia_readw(unsigned long in_addr)
unsigned
long
hose
=
in_addr
&
~
0xffffffffUL
;
unsigned
long
hose
=
in_addr
&
~
0xffffffffUL
;
unsigned
long
result
,
work
;
unsigned
long
result
,
work
;
#if
!
MCPCIA_ONE_HAE_WINDOW
#if
ndef
MCPCIA_ONE_HAE_WINDOW
unsigned
long
msb
;
unsigned
long
msb
;
msb
=
addr
&
~
MCPCIA_MEM_MASK
;
msb
=
addr
&
~
MCPCIA_MEM_MASK
;
set_hae
(
msb
);
set_hae
(
msb
);
...
@@ -389,7 +389,7 @@ __EXTERN_INLINE void mcpcia_writeb(u8 b, unsigned long in_addr)
...
@@ -389,7 +389,7 @@ __EXTERN_INLINE void mcpcia_writeb(u8 b, unsigned long in_addr)
unsigned
long
hose
=
in_addr
&
~
0xffffffffUL
;
unsigned
long
hose
=
in_addr
&
~
0xffffffffUL
;
unsigned
long
w
;
unsigned
long
w
;
#if
!
MCPCIA_ONE_HAE_WINDOW
#if
ndef
MCPCIA_ONE_HAE_WINDOW
unsigned
long
msb
;
unsigned
long
msb
;
msb
=
addr
&
~
MCPCIA_MEM_MASK
;
msb
=
addr
&
~
MCPCIA_MEM_MASK
;
set_hae
(
msb
);
set_hae
(
msb
);
...
@@ -407,7 +407,7 @@ __EXTERN_INLINE void mcpcia_writew(u16 b, unsigned long in_addr)
...
@@ -407,7 +407,7 @@ __EXTERN_INLINE void mcpcia_writew(u16 b, unsigned long in_addr)
unsigned
long
hose
=
in_addr
&
~
0xffffffffUL
;
unsigned
long
hose
=
in_addr
&
~
0xffffffffUL
;
unsigned
long
w
;
unsigned
long
w
;
#if
!
MCPCIA_ONE_HAE_WINDOW
#if
ndef
MCPCIA_ONE_HAE_WINDOW
unsigned
long
msb
;
unsigned
long
msb
;
msb
=
addr
&
~
MCPCIA_MEM_MASK
;
msb
=
addr
&
~
MCPCIA_MEM_MASK
;
set_hae
(
msb
);
set_hae
(
msb
);
...
...
include/asm-alpha/semaphore.h
View file @
2d6ef4c5
...
@@ -18,12 +18,12 @@
...
@@ -18,12 +18,12 @@
struct
semaphore
{
struct
semaphore
{
atomic_t
count
;
atomic_t
count
;
wait_queue_head_t
wait
;
wait_queue_head_t
wait
;
#if WAITQUEUE_DEBUG
#if
def
WAITQUEUE_DEBUG
long
__magic
;
long
__magic
;
#endif
#endif
};
};
#if WAITQUEUE_DEBUG
#if
def
WAITQUEUE_DEBUG
# define __SEM_DEBUG_INIT(name) , (long)&(name).__magic
# define __SEM_DEBUG_INIT(name) , (long)&(name).__magic
#else
#else
# define __SEM_DEBUG_INIT(name)
# define __SEM_DEBUG_INIT(name)
...
@@ -53,7 +53,7 @@ static inline void sema_init(struct semaphore *sem, int val)
...
@@ -53,7 +53,7 @@ static inline void sema_init(struct semaphore *sem, int val)
atomic_set
(
&
sem
->
count
,
val
);
atomic_set
(
&
sem
->
count
,
val
);
init_waitqueue_head
(
&
sem
->
wait
);
init_waitqueue_head
(
&
sem
->
wait
);
#if WAITQUEUE_DEBUG
#if
def
WAITQUEUE_DEBUG
sem
->
__magic
=
(
long
)
&
sem
->
__magic
;
sem
->
__magic
=
(
long
)
&
sem
->
__magic
;
#endif
#endif
}
}
...
@@ -142,7 +142,7 @@ static inline void __up(struct semaphore *sem)
...
@@ -142,7 +142,7 @@ static inline void __up(struct semaphore *sem)
__up_wakeup
(
sem
);
__up_wakeup
(
sem
);
}
}
#if !
WAITQUEUE_DEBUG
&& !defined(CONFIG_DEBUG_SEMAPHORE)
#if !
defined(WAITQUEUE_DEBUG)
&& !defined(CONFIG_DEBUG_SEMAPHORE)
extern
inline
void
down
(
struct
semaphore
*
sem
)
extern
inline
void
down
(
struct
semaphore
*
sem
)
{
{
__down
(
sem
);
__down
(
sem
);
...
...
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