summaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-11-23 02:00:47 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-11-23 02:00:47 +0000
commit06615f62b17d7de6e12d2f5ec6b88cf30af08413 (patch)
tree8766f208847d4876a6db619aebbf54d53b76eb44 /arch/sh
parentfa9bdb574f4febb751848a685d9a9017e04e1d53 (diff)
Merge with Linux 2.4.0-test10.
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/kernel/entry.S55
-rw-r--r--arch/sh/kernel/semaphore.c2
-rw-r--r--arch/sh/kernel/setup.c20
-rw-r--r--arch/sh/kernel/time.c2
-rw-r--r--arch/sh/mm/fault.c26
-rw-r--r--arch/sh/mm/init.c4
-rw-r--r--arch/sh/mm/ioremap.c13
7 files changed, 53 insertions, 69 deletions
diff --git a/arch/sh/kernel/entry.S b/arch/sh/kernel/entry.S
index 3b74e2d8e..37d29a6c4 100644
--- a/arch/sh/kernel/entry.S
+++ b/arch/sh/kernel/entry.S
@@ -149,52 +149,55 @@ SYSCALL_NR = (16*4+6*4)
.align 2
tlb_miss_load:
- mov.l 2f, $r0
- mov.l @$r0, $r6
- mov $r15, $r4
- mov.l 1f, $r0
- jmp @$r0
+ bra call_dpf
mov #0, $r5
.align 2
tlb_miss_store:
- mov.l 2f, $r0
- mov.l @$r0, $r6
- mov $r15, $r4
- mov.l 1f, $r0
- jmp @$r0
+ bra call_dpf
mov #1, $r5
.align 2
initial_page_write:
- mov.l 2f, $r0
- mov.l @$r0, $r6
- mov $r15, $r4
- mov.l 1f, $r0
- jmp @$r0
+ bra call_dpf
mov #1, $r5
.align 2
tlb_protection_violation_load:
- mov.l 2f, $r0
- mov.l @$r0, $r6
- mov $r15, $r4
- mov.l 1f, $r0
- jmp @$r0
+ bra call_dpf
mov #0, $r5
.align 2
tlb_protection_violation_store:
- mov.l 2f, $r0
- mov.l @$r0, $r6
- mov $r15, $r4
+ bra call_dpf
+ mov #1, $r5
+
+call_dpf:
mov.l 1f, $r0
+ mov $r5, $r8
+ mov.l @$r0, $r6
+ mov $r6, $r9
+ mov.l 2f, $r0
+ sts $pr, $r10
+ jsr @$r0
+ mov $r15, $r4
+ !
+ tst #0xff, $r0
+ bf/s 0f
+ lds $r10, $pr
+ rts
+ nop
+0: STI()
+ mov.l 3f, $r0
+ mov $r9, $r6
+ mov $r8, $r5
jmp @$r0
- mov #1, $r5
+ mov $r15, $r4
.align 2
-1: .long SYMBOL_NAME(__do_page_fault)
-2: .long MMU_TEA
+1: .long MMU_TEA
+2: .long SYMBOL_NAME(__do_page_fault)
+3: .long SYMBOL_NAME(do_page_fault)
#if defined(CONFIG_DEBUG_KERNEL_WITH_GDB_STUB) || defined(CONFIG_SH_STANDARD_BIOS)
.align 2
diff --git a/arch/sh/kernel/semaphore.c b/arch/sh/kernel/semaphore.c
index f733501c1..990960aa8 100644
--- a/arch/sh/kernel/semaphore.c
+++ b/arch/sh/kernel/semaphore.c
@@ -253,7 +253,7 @@ struct rw_semaphore *down_write_failed(struct rw_semaphore *sem)
while (atomic_read(&sem->count) < 0) {
set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
if (atomic_read(&sem->count) >= 0)
- break; /* we must attempt to aquire or bias the lock */
+ break; /* we must attempt to acquire or bias the lock */
schedule();
}
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index aaea2e6df..2f9e722fe 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -166,17 +166,13 @@ static int __init sh_console_setup(struct console *co, char *options)
}
static struct console sh_console = {
- "bios",
- sh_console_write,
- NULL,
- sh_console_device,
- sh_console_wait_key,
- NULL,
- sh_console_setup,
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "bios",
+ write: sh_console_write,
+ device: sh_console_device,
+ wait_key: sh_console_wait_key,
+ setup: sh_console_setup,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
void sh_console_init(void)
@@ -371,7 +367,7 @@ void __init setup_arch(char **cmdline_p)
* bootstrap step all allocations (until the page allocator
* is intact) must be done via bootmem_alloc().
*/
- bootmap_size = init_bootmem_node(0, start_pfn,
+ bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn,
__MEMORY_START>>PAGE_SHIFT,
max_low_pfn);
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c
index 5af1e6de8..552cbb3d3 100644
--- a/arch/sh/kernel/time.c
+++ b/arch/sh/kernel/time.c
@@ -213,7 +213,7 @@ static int set_rtc_time(unsigned long nowtime)
}
/* last time the RTC clock got updated */
-static long last_rtc_update = 0;
+static long last_rtc_update;
/*
* timer_interrupt() needs to keep up the real-time clock,
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c
index 9c06626da..b9c8c991b 100644
--- a/arch/sh/mm/fault.c
+++ b/arch/sh/mm/fault.c
@@ -231,8 +231,11 @@ do_sigbus:
goto no_context;
}
-static int __do_page_fault1(struct pt_regs *regs, unsigned long writeaccess,
- unsigned long address)
+/*
+ * Called with interrupt disabled.
+ */
+asmlinkage int __do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
+ unsigned long address)
{
pgd_t *dir;
pmd_t *pmd;
@@ -240,8 +243,6 @@ static int __do_page_fault1(struct pt_regs *regs, unsigned long writeaccess,
pte_t entry;
if (address >= VMALLOC_START && address < VMALLOC_END)
- /* We can change the implementation of P3 area pte entries.
- set_pgdir and such. */
dir = pgd_offset_k(address);
else
dir = pgd_offset(current->mm, address);
@@ -275,23 +276,6 @@ static int __do_page_fault1(struct pt_regs *regs, unsigned long writeaccess,
return 0;
}
-/*
- * Called with interrupt disabled.
- */
-asmlinkage void __do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
- unsigned long address)
-{
- /*
- * XXX: Could you please implement this (calling __do_page_fault1)
- * in assembler language in entry.S?
- */
- if (__do_page_fault1(regs, writeaccess, address) == 0)
- /* Done. */
- return;
- sti();
- do_page_fault(regs, writeaccess, address);
-}
-
void update_mmu_cache(struct vm_area_struct * vma,
unsigned long address, pte_t pte)
{
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 8568afb31..5a0ac1f10 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -40,8 +40,8 @@
*/
unsigned long mmu_context_cache;
-static unsigned long totalram_pages = 0;
-static unsigned long totalhigh_pages = 0;
+static unsigned long totalram_pages;
+static unsigned long totalhigh_pages;
extern unsigned long init_smp_mappings(unsigned long);
diff --git a/arch/sh/mm/ioremap.c b/arch/sh/mm/ioremap.c
index 2dd1e6ec2..d859f3440 100644
--- a/arch/sh/mm/ioremap.c
+++ b/arch/sh/mm/ioremap.c
@@ -17,6 +17,9 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l
unsigned long phys_addr, unsigned long flags)
{
unsigned long end;
+ pgprot_t pgprot = __pgprot(_PAGE_PRESENT | _PAGE_RW |
+ _PAGE_DIRTY | _PAGE_ACCESSED |
+ _PAGE_HW_SHARED | _PAGE_FLAGS_HARD | flags);
address &= ~PMD_MASK;
end = address + size;
@@ -25,8 +28,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l
do {
if (!pte_none(*pte))
printk("remap_area_pte: page already exists\n");
- set_pte(pte, mk_pte_phys(phys_addr, __pgprot(_PAGE_PRESENT | _PAGE_RW |
- _PAGE_DIRTY | _PAGE_ACCESSED | flags)));
+ set_pte(pte, mk_pte_phys(phys_addr, pgprot));
address += PAGE_SIZE;
phys_addr += PAGE_SIZE;
pte++;
@@ -55,22 +57,21 @@ static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned lo
}
static int remap_area_pages(unsigned long address, unsigned long phys_addr,
- unsigned long size, unsigned long flags)
+ unsigned long size, unsigned long flags)
{
pgd_t * dir;
unsigned long end = address + size;
phys_addr -= address;
- dir = pgd_offset(&init_mm, address);
+ dir = pgd_offset_k(address);
flush_cache_all();
while (address < end) {
pmd_t *pmd = pmd_alloc_kernel(dir, address);
if (!pmd)
return -ENOMEM;
if (remap_area_pmd(pmd, address, end - address,
- phys_addr + address, flags))
+ phys_addr + address, flags))
return -ENOMEM;
- set_pgdir(address, *dir);
address = (address + PGDIR_SIZE) & PGDIR_MASK;
dir++;
}