summaryrefslogtreecommitdiff
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-08-01 00:37:25 (GMT)
committerPaul Mackerras <paulus@samba.org>2006-08-01 00:37:25 (GMT)
commit57cad8084e0837e0f2c97da789ec9b3f36809be9 (patch)
treee9c790afb4286f78cb08d9664f58baa7e876fe55 /include/asm-powerpc
parentcb18bd40030c879cd93fef02fd579f74dbab473d (diff)
parent49b1e3ea19b1c95c2f012b8331ffb3b169e4c042 (diff)
downloadlinux-57cad8084e0837e0f2c97da789ec9b3f36809be9.tar.xz
Merge branch 'merge'
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/atomic.h32
-rw-r--r--include/asm-powerpc/backlight.h16
-rw-r--r--include/asm-powerpc/bitops.h16
-rw-r--r--include/asm-powerpc/irq.h38
-rw-r--r--include/asm-powerpc/kprobes.h1
-rw-r--r--include/asm-powerpc/system.h17
6 files changed, 59 insertions, 61 deletions
diff --git a/include/asm-powerpc/atomic.h b/include/asm-powerpc/atomic.h
index bb3c0ab..53283e2 100644
--- a/include/asm-powerpc/atomic.h
+++ b/include/asm-powerpc/atomic.h
@@ -27,8 +27,8 @@ static __inline__ void atomic_add(int a, atomic_t *v)
PPC405_ERR77(0,%3)
" stwcx. %0,0,%3 \n\
bne- 1b"
- : "=&r" (t), "=m" (v->counter)
- : "r" (a), "r" (&v->counter), "m" (v->counter)
+ : "=&r" (t), "+m" (v->counter)
+ : "r" (a), "r" (&v->counter)
: "cc");
}
@@ -63,8 +63,8 @@ static __inline__ void atomic_sub(int a, atomic_t *v)
PPC405_ERR77(0,%3)
" stwcx. %0,0,%3 \n\
bne- 1b"
- : "=&r" (t), "=m" (v->counter)
- : "r" (a), "r" (&v->counter), "m" (v->counter)
+ : "=&r" (t), "+m" (v->counter)
+ : "r" (a), "r" (&v->counter)
: "cc");
}
@@ -97,8 +97,8 @@ static __inline__ void atomic_inc(atomic_t *v)
PPC405_ERR77(0,%2)
" stwcx. %0,0,%2 \n\
bne- 1b"
- : "=&r" (t), "=m" (v->counter)
- : "r" (&v->counter), "m" (v->counter)
+ : "=&r" (t), "+m" (v->counter)
+ : "r" (&v->counter)
: "cc");
}
@@ -141,8 +141,8 @@ static __inline__ void atomic_dec(atomic_t *v)
PPC405_ERR77(0,%2)\
" stwcx. %0,0,%2\n\
bne- 1b"
- : "=&r" (t), "=m" (v->counter)
- : "r" (&v->counter), "m" (v->counter)
+ : "=&r" (t), "+m" (v->counter)
+ : "r" (&v->counter)
: "cc");
}
@@ -253,8 +253,8 @@ static __inline__ void atomic64_add(long a, atomic64_t *v)
add %0,%2,%0\n\
stdcx. %0,0,%3 \n\
bne- 1b"
- : "=&r" (t), "=m" (v->counter)
- : "r" (a), "r" (&v->counter), "m" (v->counter)
+ : "=&r" (t), "+m" (v->counter)
+ : "r" (a), "r" (&v->counter)
: "cc");
}
@@ -287,8 +287,8 @@ static __inline__ void atomic64_sub(long a, atomic64_t *v)
subf %0,%2,%0\n\
stdcx. %0,0,%3 \n\
bne- 1b"
- : "=&r" (t), "=m" (v->counter)
- : "r" (a), "r" (&v->counter), "m" (v->counter)
+ : "=&r" (t), "+m" (v->counter)
+ : "r" (a), "r" (&v->counter)
: "cc");
}
@@ -319,8 +319,8 @@ static __inline__ void atomic64_inc(atomic64_t *v)
addic %0,%0,1\n\
stdcx. %0,0,%2 \n\
bne- 1b"
- : "=&r" (t), "=m" (v->counter)
- : "r" (&v->counter), "m" (v->counter)
+ : "=&r" (t), "+m" (v->counter)
+ : "r" (&v->counter)
: "cc");
}
@@ -361,8 +361,8 @@ static __inline__ void atomic64_dec(atomic64_t *v)
addic %0,%0,-1\n\
stdcx. %0,0,%2\n\
bne- 1b"
- : "=&r" (t), "=m" (v->counter)
- : "r" (&v->counter), "m" (v->counter)
+ : "=&r" (t), "+m" (v->counter)
+ : "r" (&v->counter)
: "cc");
}
diff --git a/include/asm-powerpc/backlight.h b/include/asm-powerpc/backlight.h
index a5e9e65..8cf5c37 100644
--- a/include/asm-powerpc/backlight.h
+++ b/include/asm-powerpc/backlight.h
@@ -16,16 +16,26 @@
extern struct backlight_device *pmac_backlight;
extern struct mutex pmac_backlight_mutex;
-extern void pmac_backlight_calc_curve(struct fb_info*);
extern int pmac_backlight_curve_lookup(struct fb_info *info, int value);
extern int pmac_has_backlight_type(const char *type);
-extern void pmac_backlight_key_up(void);
-extern void pmac_backlight_key_down(void);
+extern void pmac_backlight_key(int direction);
+static inline void pmac_backlight_key_up(void)
+{
+ pmac_backlight_key(0);
+}
+static inline void pmac_backlight_key_down(void)
+{
+ pmac_backlight_key(1);
+}
+extern void pmac_backlight_set_legacy_brightness_pmu(int brightness);
extern int pmac_backlight_set_legacy_brightness(int brightness);
extern int pmac_backlight_get_legacy_brightness(void);
+extern void pmac_backlight_enable(void);
+extern void pmac_backlight_disable(void);
+
#endif /* __KERNEL__ */
#endif
diff --git a/include/asm-powerpc/bitops.h b/include/asm-powerpc/bitops.h
index 76e2f08..c341063 100644
--- a/include/asm-powerpc/bitops.h
+++ b/include/asm-powerpc/bitops.h
@@ -65,8 +65,8 @@ static __inline__ void set_bit(int nr, volatile unsigned long *addr)
PPC405_ERR77(0,%3)
PPC_STLCX "%0,0,%3\n"
"bne- 1b"
- : "=&r"(old), "=m"(*p)
- : "r"(mask), "r"(p), "m"(*p)
+ : "=&r" (old), "+m" (*p)
+ : "r" (mask), "r" (p)
: "cc" );
}
@@ -82,8 +82,8 @@ static __inline__ void clear_bit(int nr, volatile unsigned long *addr)
PPC405_ERR77(0,%3)
PPC_STLCX "%0,0,%3\n"
"bne- 1b"
- : "=&r"(old), "=m"(*p)
- : "r"(mask), "r"(p), "m"(*p)
+ : "=&r" (old), "+m" (*p)
+ : "r" (mask), "r" (p)
: "cc" );
}
@@ -99,8 +99,8 @@ static __inline__ void change_bit(int nr, volatile unsigned long *addr)
PPC405_ERR77(0,%3)
PPC_STLCX "%0,0,%3\n"
"bne- 1b"
- : "=&r"(old), "=m"(*p)
- : "r"(mask), "r"(p), "m"(*p)
+ : "=&r" (old), "+m" (*p)
+ : "r" (mask), "r" (p)
: "cc" );
}
@@ -179,8 +179,8 @@ static __inline__ void set_bits(unsigned long mask, unsigned long *addr)
"or %0,%0,%2\n"
PPC_STLCX "%0,0,%3\n"
"bne- 1b"
- : "=&r" (old), "=m" (*addr)
- : "r" (mask), "r" (addr), "m" (*addr)
+ : "=&r" (old), "+m" (*addr)
+ : "r" (mask), "r" (addr)
: "cc");
}
diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h
index e057547..d903a62 100644
--- a/include/asm-powerpc/irq.h
+++ b/include/asm-powerpc/irq.h
@@ -83,25 +83,24 @@ struct irq_host_ops {
int (*match)(struct irq_host *h, struct device_node *node);
/* Create or update a mapping between a virtual irq number and a hw
- * irq number. This can be called several times for the same mapping
- * but with different flags, though unmap shall always be called
- * before the virq->hw mapping is changed.
+ * irq number. This is called only once for a given mapping.
*/
- int (*map)(struct irq_host *h, unsigned int virq,
- irq_hw_number_t hw, unsigned int flags);
+ int (*map)(struct irq_host *h, unsigned int virq, irq_hw_number_t hw);
/* Dispose of such a mapping */
void (*unmap)(struct irq_host *h, unsigned int virq);
/* Translate device-tree interrupt specifier from raw format coming
* from the firmware to a irq_hw_number_t (interrupt line number) and
- * trigger flags that can be passed to irq_create_mapping().
- * If no translation is provided, raw format is assumed to be one cell
- * for interrupt line and default sense.
+ * type (sense) that can be passed to set_irq_type(). In the absence
+ * of this callback, irq_create_of_mapping() and irq_of_parse_and_map()
+ * will return the hw number in the first cell and IRQ_TYPE_NONE for
+ * the type (which amount to keeping whatever default value the
+ * interrupt controller has for that line)
*/
int (*xlate)(struct irq_host *h, struct device_node *ctrler,
u32 *intspec, unsigned int intsize,
- irq_hw_number_t *out_hwirq, unsigned int *out_flags);
+ irq_hw_number_t *out_hwirq, unsigned int *out_type);
};
struct irq_host {
@@ -193,25 +192,14 @@ extern void irq_set_virq_count(unsigned int count);
* irq_create_mapping - Map a hardware interrupt into linux virq space
* @host: host owning this hardware interrupt or NULL for default host
* @hwirq: hardware irq number in that host space
- * @flags: flags passed to the controller. contains the trigger type among
- * others. Use IRQ_TYPE_* defined in include/linux/irq.h
*
* Only one mapping per hardware interrupt is permitted. Returns a linux
- * virq number. The flags can be used to provide sense information to the
- * controller (typically extracted from the device-tree). If no information
- * is passed, the controller defaults will apply (for example, xics can only
- * do edge so flags are irrelevant for some pseries specific irqs).
- *
- * The device-tree generally contains the trigger info in an encoding that is
- * specific to a given type of controller. In that case, you can directly use
- * host->ops->trigger_xlate() to translate that.
- *
- * It is recommended that new PICs that don't have existing OF bindings chose
- * to use a representation of triggers identical to linux.
+ * virq number.
+ * If the sense/trigger is to be specified, set_irq_type() should be called
+ * on the number returned from that call.
*/
extern unsigned int irq_create_mapping(struct irq_host *host,
- irq_hw_number_t hwirq,
- unsigned int flags);
+ irq_hw_number_t hwirq);
/***
@@ -295,7 +283,7 @@ extern void irq_free_virt(unsigned int virq, unsigned int count);
*
* This function is identical to irq_create_mapping except that it takes
* as input informations straight from the device-tree (typically the results
- * of the of_irq_map_*() functions
+ * of the of_irq_map_*() functions.
*/
extern unsigned int irq_create_of_mapping(struct device_node *controller,
u32 *intspec, unsigned int intsize);
diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h
index 2d0af52..34e1f89 100644
--- a/include/asm-powerpc/kprobes.h
+++ b/include/asm-powerpc/kprobes.h
@@ -51,6 +51,7 @@ typedef unsigned int kprobe_opcode_t;
#define ARCH_SUPPORTS_KRETPROBES
#define ARCH_INACTIVE_KPROBE_COUNT 1
+#define flush_insn_slot(p) do { } while (0)
void kretprobe_trampoline(void);
extern void arch_remove_kprobe(struct kprobe *p);
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h
index 5deb7bc..b6d330f 100644
--- a/include/asm-powerpc/system.h
+++ b/include/asm-powerpc/system.h
@@ -39,7 +39,6 @@
#define read_barrier_depends() do { } while(0)
#define set_mb(var, value) do { var = value; mb(); } while (0)
-#define set_wmb(var, value) do { var = value; wmb(); } while (0)
#ifdef __KERNEL__
#ifdef CONFIG_SMP
@@ -215,8 +214,8 @@ __xchg_u32(volatile void *p, unsigned long val)
" stwcx. %3,0,%2 \n\
bne- 1b"
ISYNC_ON_SMP
- : "=&r" (prev), "=m" (*(volatile unsigned int *)p)
- : "r" (p), "r" (val), "m" (*(volatile unsigned int *)p)
+ : "=&r" (prev), "+m" (*(volatile unsigned int *)p)
+ : "r" (p), "r" (val)
: "cc", "memory");
return prev;
@@ -235,8 +234,8 @@ __xchg_u64(volatile void *p, unsigned long val)
" stdcx. %3,0,%2 \n\
bne- 1b"
ISYNC_ON_SMP
- : "=&r" (prev), "=m" (*(volatile unsigned long *)p)
- : "r" (p), "r" (val), "m" (*(volatile unsigned long *)p)
+ : "=&r" (prev), "+m" (*(volatile unsigned long *)p)
+ : "r" (p), "r" (val)
: "cc", "memory");
return prev;
@@ -294,8 +293,8 @@ __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new)
ISYNC_ON_SMP
"\n\
2:"
- : "=&r" (prev), "=m" (*p)
- : "r" (p), "r" (old), "r" (new), "m" (*p)
+ : "=&r" (prev), "+m" (*p)
+ : "r" (p), "r" (old), "r" (new)
: "cc", "memory");
return prev;
@@ -317,8 +316,8 @@ __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new)
ISYNC_ON_SMP
"\n\
2:"
- : "=&r" (prev), "=m" (*p)
- : "r" (p), "r" (old), "r" (new), "m" (*p)
+ : "=&r" (prev), "+m" (*p)
+ : "r" (p), "r" (old), "r" (new)
: "cc", "memory");
return prev;