diff options
| author | Russell King <rmk@flint.arm.linux.org.uk> | 2002-05-23 02:43:51 +0100 |
|---|---|---|
| committer | Russell King <rmk@flint.arm.linux.org.uk> | 2002-05-23 02:43:51 +0100 |
| commit | df242954643a5483019b9a4d17fc9efd4c1ec019 (patch) | |
| tree | 9b15fa0c4efa8c1531f0e531d5dddf3ebab966f1 | |
| parent | 8e206637c86fec3e38480aa5bad4e8c8295365ca (diff) | |
[ARM] Miscellaneous
- Use definitions where possible.
- Fix various errors in comments.
- Fix missing max_pfn initialisation.
- Add missing device.h and errno.h include files.
- Ensure thread->flags is unsigned long for bitops.
| -rw-r--r-- | arch/arm/boot/compressed/head-l7200.S | 3 | ||||
| -rw-r--r-- | arch/arm/mm/abort-lv4t.S | 4 | ||||
| -rw-r--r-- | arch/arm/mm/fault-common.c | 11 | ||||
| -rw-r--r-- | arch/arm/mm/init.c | 1 | ||||
| -rw-r--r-- | arch/arm/tools/mach-types | 16 | ||||
| -rw-r--r-- | drivers/acorn/char/mouse_rpc.c | 1 | ||||
| -rw-r--r-- | drivers/pcmcia/sa1100_assabet.c | 1 | ||||
| -rw-r--r-- | drivers/pcmcia/sa1100_generic.c | 31 | ||||
| -rw-r--r-- | drivers/pcmcia/sa1100_generic.h | 4 | ||||
| -rw-r--r-- | drivers/pcmcia/sa1100_neponset.c | 4 | ||||
| -rw-r--r-- | drivers/pcmcia/sa1111_generic.c | 1 | ||||
| -rw-r--r-- | include/asm-arm/thread_info.h | 2 |
12 files changed, 49 insertions, 30 deletions
diff --git a/arch/arm/boot/compressed/head-l7200.S b/arch/arm/boot/compressed/head-l7200.S index 1eb2246c3077..b08bd23f8d16 100644 --- a/arch/arm/boot/compressed/head-l7200.S +++ b/arch/arm/boot/compressed/head-l7200.S @@ -8,6 +8,7 @@ */ #include <linux/config.h> +#include <asm/mach-types.h> #ifndef CONFIG_ARCH_L7200 #error What am I doing here... @@ -26,4 +27,4 @@ __L7200_start: ble 1b mov r8, #0 @ Zero it out - mov r7, #19 @ Set architecture ID + mov r7, #MACH_TYPE_L7200 @ Set architecture ID diff --git a/arch/arm/mm/abort-lv4t.S b/arch/arm/mm/abort-lv4t.S index 6b768df8fab2..1742f586de85 100644 --- a/arch/arm/mm/abort-lv4t.S +++ b/arch/arm/mm/abort-lv4t.S @@ -66,8 +66,8 @@ ENTRY(v4t_late_abort) add r6, r6, r2, lsr #3 add r6, r6, r6, lsr #8 add r6, r6, r6, lsr #4 - and r6, r6, #15 @ r7 = no. of registers to transfer. - and r5, r8, #15 << 16 @ Extract 'n' form instruction + and r6, r6, #15 @ r6 = no. of registers to transfer. + and r5, r8, #15 << 16 @ Extract 'n' from instruction ldr r7, [sp, r5, lsr #14] @ Get register 'Rn' tst r8, #1 << 23 @ Check U bit subne r7, r7, r6, lsl #2 @ Undo increment diff --git a/arch/arm/mm/fault-common.c b/arch/arm/mm/fault-common.c index b39fd67963f7..37770f82b356 100644 --- a/arch/arm/mm/fault-common.c +++ b/arch/arm/mm/fault-common.c @@ -339,8 +339,7 @@ no_context: int do_translation_fault(unsigned long addr, int error_code, struct pt_regs *regs) { struct task_struct *tsk; - struct mm_struct *mm; - int offset; + unsigned int offset; pgd_t *pgd, *pgd_k; pmd_t *pmd, *pmd_k; @@ -349,16 +348,17 @@ int do_translation_fault(unsigned long addr, int error_code, struct pt_regs *reg offset = __pgd_offset(addr); + /* + * FIXME: CP15 C1 is write only on ARMv3 architectures. + */ pgd = cpu_get_pgd() + offset; pgd_k = init_mm.pgd + offset; if (pgd_none(*pgd_k)) goto bad_area; -#if 0 /* note that we are two-level */ if (!pgd_present(*pgd)) set_pgd(pgd, *pgd_k); -#endif pmd_k = pmd_offset(pgd_k, addr); pmd = pmd_offset(pgd, addr); @@ -371,8 +371,7 @@ int do_translation_fault(unsigned long addr, int error_code, struct pt_regs *reg bad_area: tsk = current; - mm = tsk->active_mm; - do_bad_area(tsk, mm, addr, error_code, regs); + do_bad_area(tsk, tsk->active_mm, addr, error_code, regs); return 0; } diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 2a36b155a813..d4eace179b84 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -244,6 +244,7 @@ find_memend_and_nodes(struct meminfo *mi, struct node_info *np) * also get rid of some of the stuff above as well. */ max_low_pfn = memend_pfn - O_PFN_DOWN(PHYS_OFFSET); + max_pfn = memend_pfn - O_PFN_DOWN(PHYS_OFFSET); mi->end = memend_pfn << PAGE_SHIFT; return bootmem_pages; diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 76ca193d0112..82dd2c7cf55f 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: Fri Mar 29 15:51:20 2002 +# Last update: Tue May 21 14:19:05 2002 # # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number # @@ -149,7 +149,7 @@ h3800 SA1100_H3800 H3800 137 blue_v1 ARCH_BLUE_V1 BLUE_V1 138 pxa_cerf ARCH_PXA_CERF PXA_CERF 139 arm7tevb ARCH_ARM7TEVB ARM7TEVB 140 -d7400 ARCH_D7400 D7400 141 +d7400 SA1100_D7400 D7400 141 piranha ARCH_PIRANHA PIRANHA 142 sbcamelot SA1100_SBCAMELOT SBCAMELOT 143 kings SA1100_KINGS KINGS 144 @@ -180,3 +180,15 @@ active SA1100_ACTIVE ACTIVE 168 iq80321 ARCH_IQ80321 IQ80321 169 wid SA1100_WID WID 170 sabinal ARCH_SABINAL SABINAL 171 +ixp425_matacumbe ARCH_IXP425_MATACUMBE IXP425_MATACUMBE 172 +miniprint SA1100_MINIPRINT MINIPRINT 173 +adm510x ARCH_ADM510X ADM510X 174 +svs200 SA1100_SVS200 SVS200 175 +atg_tcu ARCH_ATG_TCU ATG_TCU 176 +jornada820 SA1100_JORNADA820 JORNADA820 177 +s3c44b0 ARCH_S3C44B0 S3C44B0 178 +margis2 ARCH_MARGIS2 MARGIS2 179 +ks8695 ARCH_KS8695 KS8695 180 +brh ARCH_BRH BRH 181 +s3c2410 ARCH_S3C2410 S3C2410 182 +possio_px30 ARCH_POSSIO_PX30 POSSIO_PX30 183 diff --git a/drivers/acorn/char/mouse_rpc.c b/drivers/acorn/char/mouse_rpc.c index dbfea910b078..feafc25a7451 100644 --- a/drivers/acorn/char/mouse_rpc.c +++ b/drivers/acorn/char/mouse_rpc.c @@ -17,6 +17,7 @@ #include <linux/ptrace.h> #include <linux/interrupt.h> #include <linux/init.h> +#include <linux/errno.h> #include <asm/hardware.h> #include <asm/irq.h> diff --git a/drivers/pcmcia/sa1100_assabet.c b/drivers/pcmcia/sa1100_assabet.c index 1a7cc433cf85..eb883f64e239 100644 --- a/drivers/pcmcia/sa1100_assabet.c +++ b/drivers/pcmcia/sa1100_assabet.c @@ -7,6 +7,7 @@ #include <linux/config.h> #include <linux/kernel.h> #include <linux/sched.h> +#include <linux/errno.h> #include <linux/init.h> #include <asm/hardware.h> diff --git a/drivers/pcmcia/sa1100_generic.c b/drivers/pcmcia/sa1100_generic.c index 62a607d605a2..38697b2ee19d 100644 --- a/drivers/pcmcia/sa1100_generic.c +++ b/drivers/pcmcia/sa1100_generic.c @@ -95,10 +95,11 @@ static struct tq_struct sa1100_pcmcia_task; * "Expansion Memory (PCMCIA) Configuration Register (MECR)" * that's section 10.2.5 in _my_ version of the manuial ;) */ -static int sa1100_pcmcia_default_mecr_timing(unsigned int sock, unsigned int cpu_speed, - unsigned int cmd_time ) +static unsigned int +sa1100_pcmcia_default_mecr_timing(unsigned int sock, unsigned int cpu_speed, + unsigned int cmd_time) { - return sa1100_pcmcia_mecr_bs( cmd_time, cpu_speed ); + return sa1100_pcmcia_mecr_bs(cmd_time, cpu_speed); } /* sa1100_pcmcia_set_mecr() @@ -109,7 +110,7 @@ static int sa1100_pcmcia_default_mecr_timing(unsigned int sock, unsigned int cpu * Call board specific BS value calculation to allow boards * to tweak the BS values. */ -static int sa1100_pcmcia_set_mecr( int sock ) +static int sa1100_pcmcia_set_mecr(int sock) { struct sa1100_pcmcia_socket *skt; u32 mecr; @@ -117,15 +118,15 @@ static int sa1100_pcmcia_set_mecr( int sock ) long flags; unsigned int bs; - if ( sock<0 || sock>SA1100_PCMCIA_MAX_SOCK ) + if (sock < 0 || sock > SA1100_PCMCIA_MAX_SOCK) return -1; - skt = PCMCIA_SOCKET( sock ); + skt = PCMCIA_SOCKET(sock); local_irq_save(flags); clock = cpufreq_get(0); - bs = pcmcia_low_level->socket_get_timing( sock, clock, skt->speed_io); + bs = pcmcia_low_level->socket_get_timing(sock, clock, skt->speed_io); mecr = MECR; MECR_FAST_SET(mecr, sock, 0); @@ -136,10 +137,10 @@ static int sa1100_pcmcia_set_mecr( int sock ) local_irq_restore(flags); - DEBUG(4, "%s(): FAST%u %lx BSM%u %lx BSA%u %lx BSIO%u %lx\n", - __FUNCTION__, sock, MECR_FAST_GET(mecr, sock), sock, - MECR_BSM_GET(mecr, sock), sock, MECR_BSA_GET(mecr, sock), - sock, MECR_BSIO_GET(mecr, sock)); + DEBUG(4, "%s(): FAST%u %lx BSM%u %lx BSA%u %lx BSIO%u %lx\n", + __FUNCTION__, sock, MECR_FAST_GET(mecr, sock), sock, + MECR_BSM_GET(mecr, sock), sock, MECR_BSA_GET(mecr, sock), + sock, MECR_BSIO_GET(mecr, sock)); return 0; } @@ -882,11 +883,11 @@ static struct pccard_operations sa1100_pcmcia_operations = { */ static void sa1100_pcmcia_update_mecr(unsigned int clock) { - unsigned int sock; + unsigned int sock; - for (sock = 0; sock < SA1100_PCMCIA_MAX_SOCK; ++sock) { - sa1100_pcmcia_set_mecr( sock ); - } + for (sock = 0; sock < SA1100_PCMCIA_MAX_SOCK; ++sock) { + sa1100_pcmcia_set_mecr(sock); + } } /* sa1100_pcmcia_notifier() diff --git a/drivers/pcmcia/sa1100_generic.h b/drivers/pcmcia/sa1100_generic.h index 3b77e715af9d..daa043b1b523 100644 --- a/drivers/pcmcia/sa1100_generic.h +++ b/drivers/pcmcia/sa1100_generic.h @@ -73,8 +73,8 @@ struct pcmcia_low_level { /* * Calculate MECR timing clock wait states */ - int (*socket_get_timing)(unsigned int sock, unsigned int cpu_speed, - unsigned int cmd_time ); + unsigned int (*socket_get_timing)(unsigned int sock, + unsigned int cpu_speed, unsigned int cmd_time); }; extern int sa1100_register_pcmcia(struct pcmcia_low_level *); diff --git a/drivers/pcmcia/sa1100_neponset.c b/drivers/pcmcia/sa1100_neponset.c index 12408343d653..d8e09192bacc 100644 --- a/drivers/pcmcia/sa1100_neponset.c +++ b/drivers/pcmcia/sa1100_neponset.c @@ -5,6 +5,8 @@ */ #include <linux/kernel.h> #include <linux/sched.h> +#include <linux/device.h> +#include <linux/errno.h> #include <linux/init.h> #include <asm/hardware.h> @@ -133,7 +135,7 @@ int __init pcmcia_neponset_init(void) { int ret = -ENODEV; - if (machine_is_assabet() && machine_has_neponset()) + if (machine_is_assabet() && sa1111) ret = sa1100_register_pcmcia(&neponset_pcmcia_ops); return ret; diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c index bd2b7fb28afd..ef5a8b0bf153 100644 --- a/drivers/pcmcia/sa1111_generic.c +++ b/drivers/pcmcia/sa1111_generic.c @@ -8,6 +8,7 @@ #include <linux/kernel.h> #include <linux/sched.h> #include <linux/ioport.h> +#include <linux/device.h> #include <asm/hardware.h> #include <asm/hardware/sa1111.h> diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h index ede2ac4359b1..154a688c170f 100644 --- a/include/asm-arm/thread_info.h +++ b/include/asm-arm/thread_info.h @@ -28,7 +28,7 @@ typedef unsigned long mm_segment_t; /* domain register */ * low level task data that entry.S needs immediate access to. */ struct thread_info { - __u32 flags; /* low level flags */ + unsigned long flags; /* low level flags */ __s32 preempt_count; /* 0 => preemptable, <0 => bug */ mm_segment_t addr_limit; /* address limit */ __u32 cpu; /* cpu */ |
