summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@penguin.transmeta.com>2003-05-13 21:00:19 -0700
committerLinus Torvalds <torvalds@penguin.transmeta.com>2003-05-13 21:00:19 -0700
commit84725bf0c94d4d9a94c3f5db25e8d4efc47aeacd (patch)
tree0989786b75d363bcb417021c67bdbf3dfe3583be /include
parent08aa4ea8c7ecde67af266537761a2dbb95743f7a (diff)
parenta0eb8972073990dc4aeff6f808aa22d91a811fb7 (diff)
Merge bk://bk.arm.linux.org.uk/linux-2.5-rmk
into penguin.transmeta.com:/home/torvalds/v2.5/linux
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-anakin/time.h3
-rw-r--r--include/asm-arm/arch-arc/time.h4
-rw-r--r--include/asm-arm/arch-cl7500/time.h4
-rw-r--r--include/asm-arm/arch-clps711x/time.h4
-rw-r--r--include/asm-arm/arch-ebsa110/time.h5
-rw-r--r--include/asm-arm/arch-ebsa285/time.h10
-rw-r--r--include/asm-arm/arch-epxa10db/time.h5
-rw-r--r--include/asm-arm/arch-integrator/time.h5
-rw-r--r--include/asm-arm/arch-l7200/time.h5
-rw-r--r--include/asm-arm/arch-nexuspci/time.h7
-rw-r--r--include/asm-arm/arch-pxa/irqs.h5
-rw-r--r--include/asm-arm/arch-pxa/time.h5
-rw-r--r--include/asm-arm/arch-rpc/time.h5
-rw-r--r--include/asm-arm/arch-sa1100/time.h5
-rw-r--r--include/asm-arm/arch-shark/time.h5
-rw-r--r--include/asm-arm/arch-tbox/time.h5
-rw-r--r--include/asm-arm/bitops.h21
-rw-r--r--include/asm-arm/bugs.h2
-rw-r--r--include/asm-arm/mach/arch.h28
-rw-r--r--include/asm-arm/processor.h23
-rw-r--r--include/asm-arm/traps.h18
21 files changed, 138 insertions, 36 deletions
diff --git a/include/asm-arm/arch-anakin/time.h b/include/asm-arm/arch-anakin/time.h
index a00557a7210c..bbee11b55fd8 100644
--- a/include/asm-arm/arch-anakin/time.h
+++ b/include/asm-arm/arch-anakin/time.h
@@ -14,10 +14,11 @@
#ifndef __ASM_ARCH_TIME_H
#define __ASM_ARCH_TIME_H
-static void
+static irqreturn_t
anakin_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
do_timer(regs);
+ return IRQ_HANDLED;
}
void __init time_init(void)
diff --git a/include/asm-arm/arch-arc/time.h b/include/asm-arm/arch-arc/time.h
index 6d980227fc6c..d382dad68ece 100644
--- a/include/asm-arm/arch-arc/time.h
+++ b/include/asm-arm/arch-arc/time.h
@@ -14,11 +14,13 @@
*/
extern void ioctime_init(void);
-static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
do_timer(regs);
do_set_rtc();
do_profile(regs);
+ return IRQ_HANDLED;
}
/*
diff --git a/include/asm-arm/arch-cl7500/time.h b/include/asm-arm/arch-cl7500/time.h
index adf3096e85da..e5e5be510265 100644
--- a/include/asm-arm/arch-cl7500/time.h
+++ b/include/asm-arm/arch-cl7500/time.h
@@ -11,7 +11,8 @@
extern void ioctime_init(void);
-static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
do_timer(regs);
do_set_rtc();
@@ -26,6 +27,7 @@ static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
*((volatile unsigned int *)LED_ADDRESS) = state;
}
}
+ return IRQ_HANDLED;
}
/*
diff --git a/include/asm-arm/arch-clps711x/time.h b/include/asm-arm/arch-clps711x/time.h
index 635356dd62b0..10d1038f3cfd 100644
--- a/include/asm-arm/arch-clps711x/time.h
+++ b/include/asm-arm/arch-clps711x/time.h
@@ -25,11 +25,13 @@ extern void clps711x_setup_timer(void);
/*
* IRQ handler for the timer
*/
-static void p720t_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+p720t_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
do_leds();
do_timer(regs);
do_profile(regs);
+ return IRQ_HANDLED;
}
/*
diff --git a/include/asm-arm/arch-ebsa110/time.h b/include/asm-arm/arch-ebsa110/time.h
index 30c90e607546..c482e372b012 100644
--- a/include/asm-arm/arch-ebsa110/time.h
+++ b/include/asm-arm/arch-ebsa110/time.h
@@ -74,7 +74,8 @@ static unsigned long ebsa110_gettimeoffset(void)
return offset;
}
-static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
u32 count;
@@ -91,6 +92,8 @@ static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
do_leds();
do_timer(regs);
do_profile(regs);
+
+ return IRQ_HANDLED;
}
/*
diff --git a/include/asm-arm/arch-ebsa285/time.h b/include/asm-arm/arch-ebsa285/time.h
index feb175ee806b..5aedeb859b35 100644
--- a/include/asm-arm/arch-ebsa285/time.h
+++ b/include/asm-arm/arch-ebsa285/time.h
@@ -69,7 +69,8 @@ static unsigned long isa_gettimeoffset(void)
return count;
}
-static void isa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+isa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
if (machine_is_netwinder())
do_leds();
@@ -77,6 +78,8 @@ static void isa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
do_timer(regs);
do_set_rtc();
do_profile(regs);
+
+ return IRQ_HANDLED;
}
static unsigned long __init get_isa_cmos_time(void)
@@ -186,7 +189,8 @@ static unsigned long timer1_gettimeoffset (void)
return ((tick_nsec / 1000) * value) / LATCH;
}
-static void timer1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
*CSR_TIMER1_CLR = 0;
@@ -195,6 +199,8 @@ static void timer1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
do_timer(regs);
do_set_rtc();
do_profile(regs);
+
+ return IRQ_HANDLED;
}
/*
diff --git a/include/asm-arm/arch-epxa10db/time.h b/include/asm-arm/arch-epxa10db/time.h
index a025bbe65626..749770b83e9a 100644
--- a/include/asm-arm/arch-epxa10db/time.h
+++ b/include/asm-arm/arch-epxa10db/time.h
@@ -27,7 +27,8 @@
/*
* IRQ handler for the timer
*/
-static void excalibur_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+excalibur_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
// ...clear the interrupt
@@ -36,6 +37,8 @@ static void excalibur_timer_interrupt(int irq, void *dev_id, struct pt_regs *reg
do_leds();
do_timer(regs);
do_profile(regs);
+
+ return IRQ_HANDLED;
}
/*
diff --git a/include/asm-arm/arch-integrator/time.h b/include/asm-arm/arch-integrator/time.h
index cb6f749f2db8..40f4e40fec25 100644
--- a/include/asm-arm/arch-integrator/time.h
+++ b/include/asm-arm/arch-integrator/time.h
@@ -98,7 +98,8 @@ static unsigned long integrator_gettimeoffset(void)
/*
* IRQ handler for the timer
*/
-static void integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
volatile TimerStruct_t *timer1 = (volatile TimerStruct_t *)TIMER1_VA_BASE;
@@ -108,6 +109,8 @@ static void integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *re
do_leds();
do_timer(regs);
do_profile(regs);
+
+ return IRQ_HANDLED;
}
/*
diff --git a/include/asm-arm/arch-l7200/time.h b/include/asm-arm/arch-l7200/time.h
index 727c32a96a89..31d791ac1d8c 100644
--- a/include/asm-arm/arch-l7200/time.h
+++ b/include/asm-arm/arch-l7200/time.h
@@ -42,11 +42,14 @@
/*
* Handler for RTC timer interrupt
*/
-static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
do_timer(regs);
do_profile(regs);
RTC_RTCC = 0; /* Clear interrupt */
+
+ return IRQ_HANDLED;
}
/*
diff --git a/include/asm-arm/arch-nexuspci/time.h b/include/asm-arm/arch-nexuspci/time.h
index ba09e7bb3ee9..c0fd0cdc9cb0 100644
--- a/include/asm-arm/arch-nexuspci/time.h
+++ b/include/asm-arm/arch-nexuspci/time.h
@@ -14,7 +14,8 @@
* 2 of the License, or (at your option) any later version.
*/
-static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
static int count = 25;
unsigned char stat = __raw_readb(DUART_BASE + 0x14);
@@ -40,7 +41,9 @@ static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
__raw_readb(DUART_BASE + 0x14);
__raw_readb(DUART_BASE + 0x14);
- do_timer(regs);
+ do_timer(regs);
+
+ return IRQ_HANDLED;
}
void __init time_init(void)
diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h
index 54d78076afd4..6d452434eabc 100644
--- a/include/asm-arm/arch-pxa/irqs.h
+++ b/include/asm-arm/arch-pxa/irqs.h
@@ -10,9 +10,10 @@
* published by the Free Software Foundation.
*/
-#define PXA_IRQ_SKIP 8 /* The first 8 IRQs are reserved */
+#define PXA_IRQ_SKIP 7 /* The first 7 IRQs are not yet used */
#define PXA_IRQ(x) ((x) - PXA_IRQ_SKIP)
+#define IRQ_HWUART PXA_IRQ(7) /* HWUART Transmit/Receive/Error */
#define IRQ_GPIO0 PXA_IRQ(8) /* GPIO0 Edge Detect */
#define IRQ_GPIO1 PXA_IRQ(9) /* GPIO1 Edge Detect */
#define IRQ_GPIO_2_80 PXA_IRQ(10) /* GPIO[2-80] Edge Detect */
@@ -20,6 +21,8 @@
#define IRQ_PMU PXA_IRQ(12) /* Performance Monitoring Unit */
#define IRQ_I2S PXA_IRQ(13) /* I2S Interrupt */
#define IRQ_AC97 PXA_IRQ(14) /* AC97 Interrupt */
+#define IRQ_ASSP PXA_IRQ(15) /* Audio SSP Service Request */
+#define IRQ_NSSP PXA_IRQ(16) /* Network SSP Service Request */
#define IRQ_LCD PXA_IRQ(17) /* LCD Controller Service Request */
#define IRQ_I2C PXA_IRQ(18) /* I2C Service Request */
#define IRQ_ICP PXA_IRQ(19) /* ICP Transmit/Receive/Error */
diff --git a/include/asm-arm/arch-pxa/time.h b/include/asm-arm/arch-pxa/time.h
index 303d30dc8116..91865bd8fce8 100644
--- a/include/asm-arm/arch-pxa/time.h
+++ b/include/asm-arm/arch-pxa/time.h
@@ -47,7 +47,8 @@ static unsigned long pxa_gettimeoffset (void)
return usec;
}
-static void pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
int next_match;
@@ -66,6 +67,8 @@ static void pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
OSSR = OSSR_M0; /* Clear match on timer 0 */
next_match = (OSMR0 += LATCH);
} while( (signed long)(next_match - OSCR) <= 0 );
+
+ return IRQ_HANDLED;
}
void __init time_init(void)
diff --git a/include/asm-arm/arch-rpc/time.h b/include/asm-arm/arch-rpc/time.h
index 189595c68fce..1df6a12cd0e3 100644
--- a/include/asm-arm/arch-rpc/time.h
+++ b/include/asm-arm/arch-rpc/time.h
@@ -14,11 +14,14 @@
*/
extern void ioctime_init(void);
-static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
do_timer(regs);
do_set_rtc();
do_profile(regs);
+
+ return IRQ_HANDLED;
}
/*
diff --git a/include/asm-arm/arch-sa1100/time.h b/include/asm-arm/arch-sa1100/time.h
index 31fd3647c791..a7c984968819 100644
--- a/include/asm-arm/arch-sa1100/time.h
+++ b/include/asm-arm/arch-sa1100/time.h
@@ -72,7 +72,8 @@ static unsigned long sa1100_gettimeoffset (void)
* lost_ticks (updated in do_timer()) and the match reg value, so we
* can use do_gettimeofday() from interrupt handlers.
*/
-static void sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
unsigned int next_match;
@@ -85,6 +86,8 @@ static void sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
} while ((signed long)(next_match - OSCR) <= 0);
do_profile(regs);
+
+ return IRQ_HANDLED;
}
void __init time_init(void)
diff --git a/include/asm-arm/arch-shark/time.h b/include/asm-arm/arch-shark/time.h
index bea20835697a..86a9bdebae23 100644
--- a/include/asm-arm/arch-shark/time.h
+++ b/include/asm-arm/arch-shark/time.h
@@ -13,11 +13,14 @@
#define IRQ_TIMER 0
#define HZ_TIME ((1193180 + HZ/2) / HZ)
-static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
do_leds();
do_timer(regs);
do_profile(regs);
+
+ return IRQ_HANDLED;
}
/*
diff --git a/include/asm-arm/arch-tbox/time.h b/include/asm-arm/arch-tbox/time.h
index e50e1bdb9af8..461787189e1e 100644
--- a/include/asm-arm/arch-tbox/time.h
+++ b/include/asm-arm/arch-tbox/time.h
@@ -20,13 +20,16 @@
#define update_rtc()
-static void timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
{
/* Clear irq */
__raw_writel(1, FPGA1CONT + 0xc);
__raw_writel(0, FPGA1CONT + 0xc);
do_timer(regs);
+
+ return IRQ_HANDLED;
}
void __init time_init(void)
diff --git a/include/asm-arm/bitops.h b/include/asm-arm/bitops.h
index 819c89592d62..917adde845ba 100644
--- a/include/asm-arm/bitops.h
+++ b/include/asm-arm/bitops.h
@@ -173,7 +173,7 @@ static inline int __test_and_change_bit(int nr, volatile unsigned long *p)
*/
static inline int __test_bit(int nr, const unsigned long * p)
{
- return p[nr >> 5] & (1UL << (nr & 31));
+ return (p[nr >> 5] >> (nr & 31)) & 1UL;
}
/*
@@ -277,6 +277,8 @@ extern int _find_next_zero_bit_be(void * p, int size, int offset);
#endif
+#if __LINUX_ARM_ARCH__ < 5
+
/*
* ffz = Find First Zero in word. Undefined if no zero exists,
* so code should check against ~0UL first..
@@ -326,6 +328,23 @@ static inline unsigned long __ffs(unsigned long word)
#define ffs(x) generic_ffs(x)
+#else
+
+/*
+ * On ARMv5 and above those functions can be implemented around
+ * the clz instruction for much better code efficiency.
+ */
+
+extern __inline__ int generic_fls(int x);
+#define fls(x) \
+ ( __builtin_constant_p(x) ? generic_fls(x) : \
+ ({ int __r; asm("clz%?\t%0, %1" : "=r"(__r) : "r"(x)); 32-__r; }) )
+#define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); })
+#define __ffs(x) (ffs(x) - 1)
+#define ffz(x) __ffs( ~(x) )
+
+#endif
+
/*
* Find first bit set in a 168-bit bitmap, where the first
* 128 bits are unlikely to be set.
diff --git a/include/asm-arm/bugs.h b/include/asm-arm/bugs.h
index 14a4e05eee8c..adae0482000d 100644
--- a/include/asm-arm/bugs.h
+++ b/include/asm-arm/bugs.h
@@ -10,8 +10,6 @@
#ifndef __ASM_BUGS_H
#define __ASM_BUGS_H
-#include <asm/proc-fns.h>
-
#define check_bugs() do { } while (0)
#endif
diff --git a/include/asm-arm/mach/arch.h b/include/asm-arm/mach/arch.h
index 4b62abb9a1ef..5ddc14f683c2 100644
--- a/include/asm-arm/mach/arch.h
+++ b/include/asm-arm/mach/arch.h
@@ -54,39 +54,37 @@ struct machine_desc {
#define MACHINE_START(_type,_name) \
const struct machine_desc __mach_desc_##_type \
__attribute__((__section__(".arch.info"))) = { \
- nr: MACH_TYPE_##_type, \
- name: _name,
+ .nr = MACH_TYPE_##_type, \
+ .name = _name,
#define MAINTAINER(n)
#define BOOT_MEM(_pram,_pio,_vio) \
- phys_ram: _pram, \
- phys_io: _pio, \
- io_pg_offst: ((_vio)>>18)&0xfffc,
+ .phys_ram = _pram, \
+ .phys_io = _pio, \
+ .io_pg_offst = ((_vio)>>18)&0xfffc,
#define BOOT_PARAMS(_params) \
- param_offset: _params,
+ .param_offset = _params,
#define VIDEO(_start,_end) \
- video_start: _start, \
- video_end: _end,
+ .video_start = _start, \
+ .video_end = _end,
#define DISABLE_PARPORT(_n) \
- reserve_lp##_n: 1,
-
-#define BROKEN_HLT /* unused */
+ .reserve_lp##_n = 1,
#define SOFT_REBOOT \
- soft_reboot: 1,
+ .soft_reboot = 1,
#define FIXUP(_func) \
- fixup: _func,
+ .fixup = _func,
#define MAPIO(_func) \
- map_io: _func,
+ .map_io = _func,
#define INITIRQ(_func) \
- init_irq: _func,
+ .init_irq = _func,
#define MACHINE_END \
};
diff --git a/include/asm-arm/processor.h b/include/asm-arm/processor.h
index 7fa77f0c4248..181223a7329b 100644
--- a/include/asm-arm/processor.h
+++ b/include/asm-arm/processor.h
@@ -74,6 +74,29 @@ unsigned long get_wchan(struct task_struct *p);
*/
extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
+/*
+ * Prefetching support - only ARMv5.
+ */
+#if __LINUX_ARM_ARCH__ >= 5
+
+#define ARCH_HAS_PREFETCH
+#define prefetch(ptr) \
+ ({ \
+ __asm__ __volatile__( \
+ "pld\t%0" \
+ : \
+ : "o" (*(char *)(ptr)) \
+ : "cc"); \
+ })
+
+#define ARCH_HAS_PREFETCHW
+#define prefetchw(ptr) prefetch(ptr)
+
+#define ARCH_HAS_SPINLOCK_PREFETCH
+#define spin_lock_prefetch(x) do { } while (0)
+
+#endif
+
#endif
#endif /* __ASM_ARM_PROCESSOR_H */
diff --git a/include/asm-arm/traps.h b/include/asm-arm/traps.h
new file mode 100644
index 000000000000..d4f34dc83eb0
--- /dev/null
+++ b/include/asm-arm/traps.h
@@ -0,0 +1,18 @@
+#ifndef _ASMARM_TRAP_H
+#define _ASMARM_TRAP_H
+
+#include <linux/list.h>
+
+struct undef_hook {
+ struct list_head node;
+ u32 instr_mask;
+ u32 instr_val;
+ u32 cpsr_mask;
+ u32 cpsr_val;
+ int (*fn)(struct pt_regs *regs, unsigned int instr);
+};
+
+void register_undef_hook(struct undef_hook *hook);
+void unregister_undef_hook(struct undef_hook *hook);
+
+#endif