summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk@flint.arm.linux.org.uk>2002-03-28 20:41:33 +0000
committerRussell King <rmk@flint.arm.linux.org.uk>2002-03-28 20:41:33 +0000
commit3f4d4f4e46865cb01d2e2717c6906e2ae079c042 (patch)
tree4f57f0b4269afbb0a80966a2bce9154062e6427a
parent4dfff8c160e1cb2f64b50a86211204395d00a0dd (diff)
Miscellaneous build/bug fixes.
-rw-r--r--arch/arm/kernel/ptrace.c12
-rw-r--r--arch/arm/lib/memchr.S10
-rw-r--r--arch/arm/mach-sa1100/generic.c44
-rw-r--r--arch/arm/mach-sa1100/generic.h2
-rw-r--r--arch/arm/mach-sa1100/sa1111.c44
-rw-r--r--arch/arm/mach-sa1100/sa1111.h10
-rw-r--r--arch/arm/tools/mach-types3
-rw-r--r--drivers/ide/icside.c2
-rw-r--r--drivers/video/cyber2000fb.c8
-rw-r--r--include/asm-arm/pgalloc.h2
10 files changed, 62 insertions, 75 deletions
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index 1d380fc2d692..9150d1c41d3e 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -620,15 +620,9 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
ret = ptrace_attach(child);
goto out_tsk;
}
- ret = -ESRCH;
- if (!(child->ptrace & PT_PTRACED))
- goto out_tsk;
- if (child->state != TASK_STOPPED && request != PTRACE_KILL)
- goto out_tsk;
- if (child->p_pptr != current)
- goto out_tsk;
-
- ret = do_ptrace(request, child, addr, data);
+ ret = ptrace_check_attach(child, request == PTRACE_KILL);
+ if (ret == 0)
+ ret = do_ptrace(request, child, addr, data);
out_tsk:
put_task_struct(child);
diff --git a/arch/arm/lib/memchr.S b/arch/arm/lib/memchr.S
index 4eed74a7ee6f..ac34fe55d21a 100644
--- a/arch/arm/lib/memchr.S
+++ b/arch/arm/lib/memchr.S
@@ -15,11 +15,11 @@
.text
.align 5
ENTRY(memchr)
-1: ldrb r3, [r0], #1
+1: subs r2, r2, #1
+ bmi 2f
+ ldrb r3, [r0], #1
teq r3, r1
- beq 2f
- subs r2, r2, #1
- bpl 1b
+ bne 1b
+ sub r0, r0, #1
2: movne r0, #0
- subeq r0, r0, #1
RETINSTR(mov,pc,lr)
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index a0cf741be380..d661d3b19309 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -162,3 +162,47 @@ void __init sa1100_map_io(void)
{
iotable_init(standard_io_desc);
}
+
+/*
+ * Disable the memory bus request/grant signals on the SA1110 to
+ * ensure that we don't receive spurious memory requests. We set
+ * the MBGNT signal false to ensure the SA1111 doesn't own the
+ * SDRAM bus.
+ */
+void __init sa1110_mb_disable(void)
+{
+ unsigned long flags;
+
+ local_irq_save(flags);
+
+ PGSR &= ~GPIO_MBGNT;
+ GPCR = GPIO_MBGNT;
+ GPDR = (GPDR & ~GPIO_MBREQ) | GPIO_MBGNT;
+
+ GAFR &= ~(GPIO_MBGNT | GPIO_MBREQ);
+
+ local_irq_restore(flags);
+}
+
+/*
+ * If the system is going to use the SA-1111 DMA engines, set up
+ * the memory bus request/grant pins.
+ */
+void __init sa1110_mb_enable(void)
+{
+ unsigned long flags;
+
+ local_irq_save(flags);
+
+ PGSR &= ~GPIO_MBGNT;
+ GPCR = GPIO_MBGNT;
+ GPDR = (GPDR & ~GPIO_MBREQ) | GPIO_MBGNT;
+
+ GAFR |= (GPIO_MBGNT | GPIO_MBREQ);
+ TUCR |= TUCR_MR;
+
+ local_irq_restore(flags);
+}
+
+EXPORT_SYMBOL(sa1111_wake);
+EXPORT_SYMBOL(sa1111_doze);
diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h
index 2af306ab0194..abb28817b275 100644
--- a/arch/arm/mach-sa1100/generic.h
+++ b/arch/arm/mach-sa1100/generic.h
@@ -15,3 +15,5 @@ extern void __init sa1100_init_irq(void);
extern void (*sa1100fb_backlight_power)(int on);
extern void (*sa1100fb_lcd_power)(int on);
+extern void sa1110_mb_enable(void);
+extern void sa1110_mb_disable(void);
diff --git a/arch/arm/mach-sa1100/sa1111.c b/arch/arm/mach-sa1100/sa1111.c
index dab4cfbcf258..0baa410ac0f2 100644
--- a/arch/arm/mach-sa1100/sa1111.c
+++ b/arch/arm/mach-sa1100/sa1111.c
@@ -367,50 +367,6 @@ void sa1111_configure_smc(int sdram, unsigned int drac, unsigned int cas_latency
SBI_SMCR = smcr;
}
-/*
- * Disable the memory bus request/grant signals on the SA1110 to
- * ensure that we don't receive spurious memory requests. We set
- * the MBGNT signal false to ensure the SA1111 doesn't own the
- * SDRAM bus.
- */
-void __init sa1110_mb_disable(void)
-{
- unsigned long flags;
-
- local_irq_save(flags);
-
- PGSR &= ~GPIO_MBGNT;
- GPCR = GPIO_MBGNT;
- GPDR = (GPDR & ~GPIO_MBREQ) | GPIO_MBGNT;
-
- GAFR &= ~(GPIO_MBGNT | GPIO_MBREQ);
-
- local_irq_restore(flags);
-}
-
-/*
- * If the system is going to use the SA-1111 DMA engines, set up
- * the memory bus request/grant pins.
- */
-void __init sa1110_mb_enable(void)
-{
- unsigned long flags;
-
- local_irq_save(flags);
-
- PGSR &= ~GPIO_MBGNT;
- GPCR = GPIO_MBGNT;
- GPDR = (GPDR & ~GPIO_MBREQ) | GPIO_MBGNT;
-
- GAFR |= (GPIO_MBGNT | GPIO_MBREQ);
- TUCR |= TUCR_MR;
-
- local_irq_restore(flags);
-}
-
-EXPORT_SYMBOL(sa1111_wake);
-EXPORT_SYMBOL(sa1111_doze);
-
/* According to the "Intel StrongARM SA-1111 Microprocessor Companion
* Chip Specification Update" (June 2000), erratum #7, there is a
* significant bug in Serial Audio Controller DMA. If the SAC is
diff --git a/arch/arm/mach-sa1100/sa1111.h b/arch/arm/mach-sa1100/sa1111.h
index 52a44f9283b2..fa38f1089566 100644
--- a/arch/arm/mach-sa1100/sa1111.h
+++ b/arch/arm/mach-sa1100/sa1111.h
@@ -3,12 +3,6 @@
*/
/*
- * These two don't really belong in here.
- */
-extern void sa1110_mb_enable(void);
-extern void sa1110_mb_disable(void);
-
-/*
* Probe for a SA1111 chip.
*/
extern int sa1111_probe(unsigned long phys);
@@ -27,8 +21,4 @@ extern void sa1111_doze(void);
* Configure the SA1111 shared memory controller.
*/
extern void sa1111_configure_smc(int sdram, unsigned int drac, unsigned int cas_latency);
-
-
extern void sa1111_init_irq(int irq_nr);
-extern void sa1111_IRQ_demux(int irq, void *dev_id, struct pt_regs *regs);
-
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index dddd170b4a44..9c3add32c4b2 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -6,7 +6,7 @@
# To add an entry into this database, please see Documentation/arm/README,
# or contact rmk@arm.linux.org.uk
#
-# Last update: Sat Mar 16 10:55:44 2002
+# Last update: Sun Mar 24 11:48:10 2002
#
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
#
@@ -178,3 +178,4 @@ sam2400 ARCH_SAM2400 SAM2400 166
jornada56x ARCH_JORNADA56X JORNADA56X 167
active SA1100_ACTIVE ACTIVE 168
iq80321 ARCH_IQ80321 IQ80321 169
+wid SA1100_WID WID 170
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c
index 70cb1be2bf71..598cb6c98d88 100644
--- a/drivers/ide/icside.c
+++ b/drivers/ide/icside.c
@@ -441,7 +441,7 @@ icside_dmaproc(ide_dma_action_t func, ide_drive_t *drive)
: DMA_MODE_WRITE);
drive->waiting_for_dma = 1;
- if (drive->media != ide_disk)
+ if (drive->type != ATA_DISK)
return 0;
ide_set_handler(drive, &icside_dmaintr, WAIT_CMD, NULL);
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c
index 9df1427fc7c7..887072a50216 100644
--- a/drivers/video/cyber2000fb.c
+++ b/drivers/video/cyber2000fb.c
@@ -1402,6 +1402,7 @@ cyberpro_alloc_fb_info(unsigned int id, char *name)
cfb->fb.updatevar = cyber2000fb_updatevar;
cfb->fb.blank = cyber2000fb_blank;
cfb->fb.flags = FBINFO_FLAG_DEFAULT;
+ cfb->fb.node = NODEV;
cfb->fb.disp = (struct display *)(cfb + 1);
cfb->fb.pseudo_palette = (void *)(cfb->fb.disp + 1);
@@ -1819,7 +1820,7 @@ static struct pci_driver cyberpro_driver = {
*/
int __init cyber2000fb_init(void)
{
- int ret = -1, err = 0;
+ int ret = -1, err = -ENODEV;
#ifdef CONFIG_ARCH_SHARK
err = cyberpro_vl_probe();
if (!err) {
@@ -1827,19 +1828,16 @@ int __init cyber2000fb_init(void)
MOD_INC_USE_COUNT;
}
#endif
-#ifdef CONFIG_PCI
err = pci_module_init(&cyberpro_driver);
if (!err)
ret = err;
-#endif
+
return ret ? err : 0;
}
static void __exit cyberpro_exit(void)
{
-#ifdef CONFIG_PCI
pci_unregister_driver(&cyberpro_driver);
-#endif
}
#ifdef MODULE
diff --git a/include/asm-arm/pgalloc.h b/include/asm-arm/pgalloc.h
index 0945e2e4d280..18c0c5354f9c 100644
--- a/include/asm-arm/pgalloc.h
+++ b/include/asm-arm/pgalloc.h
@@ -30,4 +30,6 @@ extern void free_pgd_slow(pgd_t *pgd);
#define pgd_alloc(mm) get_pgd_slow(mm)
#define pgd_free(pgd) free_pgd_slow(pgd)
+#define check_pgt_cache() do { } while (0)
+
#endif