Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18265
b: refs/heads/master
c: f542ff6
h: refs/heads/master
i:
  18263: 8ca0116
v: v3
  • Loading branch information
Dominik Brodowski committed Jan 12, 2006
1 parent 4305a0a commit 6b7cb5e
Show file tree
Hide file tree
Showing 180 changed files with 3,217 additions and 9,291 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37ef4399a6bb265d3035e6d6e45f7677b132a3ba
refs/heads/master: f542ff6dd1a444c85cc245ac40aef5f703e48674
46 changes: 21 additions & 25 deletions trunk/arch/arm/boot/compressed/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
kputc #'\n'
kphex r5, 8 /* decompressed kernel start */
kputc #'-'
kphex r9, 8 /* decompressed kernel end */
kphex r8, 8 /* decompressed kernel end */
kputc #'>'
kphex r4, 8 /* kernel execution address */
kputc #'\n'
Expand Down Expand Up @@ -116,7 +116,7 @@ start:
.word start @ absolute load/run zImage address
.word _edata @ zImage end address
1: mov r7, r1 @ save architecture ID
mov r8, r2 @ save atags pointer
mov r8, #0 @ save r0

#ifndef __ARM_ARCH_2__
/*
Expand Down Expand Up @@ -144,7 +144,7 @@ not_angel:

/*
* some architecture specific code can be inserted
* by the linker here, but it should preserve r7, r8, and r9.
* by the linker here, but it should preserve r7 and r8.
*/

.text
Expand Down Expand Up @@ -249,17 +249,16 @@ not_relocated: mov r0, #0
* r5 = decompressed kernel start
* r6 = processor ID
* r7 = architecture ID
* r8 = atags pointer
* r9-r14 = corrupted
* r8-r14 = unused
*/
add r1, r5, r0 @ end of decompressed kernel
adr r2, reloc_start
ldr r3, LC1
add r3, r2, r3
1: ldmia r2!, {r9 - r14} @ copy relocation code
stmia r1!, {r9 - r14}
ldmia r2!, {r9 - r14}
stmia r1!, {r9 - r14}
1: ldmia r2!, {r8 - r13} @ copy relocation code
stmia r1!, {r8 - r13}
ldmia r2!, {r8 - r13}
stmia r1!, {r8 - r13}
cmp r2, r3
blo 1b

Expand Down Expand Up @@ -309,12 +308,11 @@ params: ldr r0, =params_phys
* r4 = kernel execution address
* r6 = processor ID
* r7 = architecture number
* r8 = atags pointer
* r9 = run-time address of "start" (???)
* r8 = run-time address of "start"
* On exit,
* r1, r2, r3, r9, r10, r12 corrupted
* r1, r2, r3, r8, r9, r12 corrupted
* This routine must preserve:
* r4, r5, r6, r7, r8
* r4, r5, r6, r7
*/
.align 5
cache_on: mov r3, #8 @ cache_on function
Expand All @@ -328,15 +326,15 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size
* bits for the RAM area only.
*/
mov r0, r3
mov r9, r0, lsr #18
mov r9, r9, lsl #18 @ start of RAM
add r10, r9, #0x10000000 @ a reasonable RAM size
mov r8, r0, lsr #18
mov r8, r8, lsl #18 @ start of RAM
add r9, r8, #0x10000000 @ a reasonable RAM size
mov r1, #0x12
orr r1, r1, #3 << 10
add r2, r3, #16384
1: cmp r1, r8 @ if virt > start of RAM
orrhs r1, r1, #0x0c @ set cacheable, bufferable
cmp r1, r10 @ if virt > end of RAM
cmp r1, r9 @ if virt > end of RAM
bichs r1, r1, #0x0c @ clear cacheable, bufferable
str r1, [r0], #4 @ 1:1 mapping
add r1, r1, #1048576
Expand Down Expand Up @@ -405,28 +403,26 @@ __common_cache_on:
* r5 = decompressed kernel start
* r6 = processor ID
* r7 = architecture ID
* r8 = atags pointer
* r9-r14 = corrupted
* r8-r14 = unused
*/
.align 5
reloc_start: add r9, r5, r0
reloc_start: add r8, r5, r0
debug_reloc_start
mov r1, r4
1:
.rept 4
ldmia r5!, {r0, r2, r3, r10 - r14} @ relocate kernel
stmia r1!, {r0, r2, r3, r10 - r14}
ldmia r5!, {r0, r2, r3, r9 - r13} @ relocate kernel
stmia r1!, {r0, r2, r3, r9 - r13}
.endr

cmp r5, r9
cmp r5, r8
blo 1b
debug_reloc_end

call_kernel: bl cache_clean_flush
bl cache_off
mov r0, #0 @ must be zero
mov r0, #0
mov r1, r7 @ restore architecture number
mov r2, r8 @ restore atags pointer
mov pc, r4 @ call kernel

/*
Expand Down
15 changes: 7 additions & 8 deletions trunk/arch/arm/common/rtctime.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <linux/spinlock.h>
#include <linux/capability.h>
#include <linux/device.h>
#include <linux/mutex.h>

#include <asm/rtc.h>
#include <asm/semaphore.h>
Expand All @@ -36,7 +35,7 @@ static unsigned long rtc_irq_data;
/*
* rtc_sem protects rtc_inuse and rtc_ops
*/
static DEFINE_MUTEX(rtc_mutex);
static DECLARE_MUTEX(rtc_sem);
static unsigned long rtc_inuse;
static struct rtc_ops *rtc_ops;

Expand Down Expand Up @@ -357,7 +356,7 @@ static int rtc_open(struct inode *inode, struct file *file)
{
int ret;

mutex_lock(&rtc_mutex);
down(&rtc_sem);

if (rtc_inuse) {
ret = -EBUSY;
Expand All @@ -375,7 +374,7 @@ static int rtc_open(struct inode *inode, struct file *file)
rtc_inuse = 1;
}
}
mutex_unlock(&rtc_mutex);
up(&rtc_sem);

return ret;
}
Expand Down Expand Up @@ -481,7 +480,7 @@ int register_rtc(struct rtc_ops *ops)
{
int ret = -EBUSY;

mutex_lock(&rtc_mutex);
down(&rtc_sem);
if (rtc_ops == NULL) {
rtc_ops = ops;

Expand All @@ -490,20 +489,20 @@ int register_rtc(struct rtc_ops *ops)
create_proc_read_entry("driver/rtc", 0, NULL,
rtc_read_proc, ops);
}
mutex_unlock(&rtc_mutex);
up(&rtc_sem);

return ret;
}
EXPORT_SYMBOL(register_rtc);

void unregister_rtc(struct rtc_ops *rtc)
{
mutex_lock(&rtc_mutex);
down(&rtc_sem);
if (rtc == rtc_ops) {
remove_proc_entry("driver/rtc", NULL);
misc_deregister(&rtc_miscdev);
rtc_ops = NULL;
}
mutex_unlock(&rtc_mutex);
up(&rtc_sem);
}
EXPORT_SYMBOL(unregister_rtc);
Loading

0 comments on commit 6b7cb5e

Please sign in to comment.