Commit 36f5a420 authored by Anton Blanchard's avatar Anton Blanchard

ppc64: fix some -Wundef warnings

parent fec67508
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/eeh.h> #include <asm/eeh.h>
#include <asm/tlb.h> #include <asm/tlb.h>
#include <asm/cacheflush.h>
/* /*
* Note: pte --> Linux PTE * Note: pte --> Linux PTE
......
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#include <asm/unistd.h> #include <asm/unistd.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#define DEBUG_SIG 0
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
/* /*
* These are the flags in the MSR that the user is allowed to change * These are the flags in the MSR that the user is allowed to change
......
...@@ -82,7 +82,7 @@ typedef struct { ...@@ -82,7 +82,7 @@ typedef struct {
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#if CONFIG_PREEMPT #ifdef CONFIG_PREEMPT
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked()) # 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
......
...@@ -23,12 +23,12 @@ struct semaphore { ...@@ -23,12 +23,12 @@ struct semaphore {
*/ */
atomic_t count; atomic_t count;
wait_queue_head_t wait; wait_queue_head_t wait;
#if WAITQUEUE_DEBUG #ifdef WAITQUEUE_DEBUG
long __magic; long __magic;
#endif #endif
}; };
#if WAITQUEUE_DEBUG #ifdef WAITQUEUE_DEBUG
# define __SEM_DEBUG_INIT(name) \ # define __SEM_DEBUG_INIT(name) \
, (long)&(name).__magic , (long)&(name).__magic
#else #else
...@@ -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 #ifdef WAITQUEUE_DEBUG
sem->__magic = (long)&sem->__magic; sem->__magic = (long)&sem->__magic;
#endif #endif
} }
...@@ -74,7 +74,7 @@ extern void __up(struct semaphore * sem); ...@@ -74,7 +74,7 @@ extern void __up(struct semaphore * sem);
static inline void down(struct semaphore * sem) static inline void down(struct semaphore * sem)
{ {
#if WAITQUEUE_DEBUG #ifdef WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic); CHECK_MAGIC(sem->__magic);
#endif #endif
might_sleep(); might_sleep();
...@@ -91,7 +91,7 @@ static inline int down_interruptible(struct semaphore * sem) ...@@ -91,7 +91,7 @@ static inline int down_interruptible(struct semaphore * sem)
{ {
int ret = 0; int ret = 0;
#if WAITQUEUE_DEBUG #ifdef WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic); CHECK_MAGIC(sem->__magic);
#endif #endif
might_sleep(); might_sleep();
...@@ -106,7 +106,7 @@ static inline int down_trylock(struct semaphore * sem) ...@@ -106,7 +106,7 @@ static inline int down_trylock(struct semaphore * sem)
{ {
int ret; int ret;
#if WAITQUEUE_DEBUG #ifdef WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic); CHECK_MAGIC(sem->__magic);
#endif #endif
...@@ -117,7 +117,7 @@ static inline int down_trylock(struct semaphore * sem) ...@@ -117,7 +117,7 @@ static inline int down_trylock(struct semaphore * sem)
static inline void up(struct semaphore * sem) static inline void up(struct semaphore * sem)
{ {
#if WAITQUEUE_DEBUG #ifdef WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic); CHECK_MAGIC(sem->__magic);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment