Skip to content

Commit

Permalink
[PARISC] Clean up sti_flush
Browse files Browse the repository at this point in the history
sti_flush is supposed to flush the caches so we can execute the STI rom
we copied to memory. Anything more than flush_icache_range is overkill.

Fixes a missing symbol when built as a module.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
  • Loading branch information
Kyle McMartin authored and Kyle McMartin committed Aug 27, 2007
1 parent fabb8ff commit 03b18f1
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions drivers/video/console/sticore.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,14 @@ sti_bmove(struct sti_struct *sti, int src_y, int src_x,
}


/* FIXME: Do we have another solution for this ? */
static void sti_flush(unsigned long from, unsigned long len)
static void sti_flush(unsigned long start, unsigned long end)
{
flush_data_cache();
flush_kernel_dcache_range(from, len);
flush_icache_range(from, from+len);
flush_icache_range(start, end);
}

void __devinit
sti_rom_copy(unsigned long base, unsigned long count, void *dest)
{
unsigned long dest_len = count;
unsigned long dest_start = (unsigned long) dest;

/* this still needs to be revisited (see arch/parisc/mm/init.c:246) ! */
Expand All @@ -260,7 +256,7 @@ sti_rom_copy(unsigned long base, unsigned long count, void *dest)
dest++;
}

sti_flush(dest_start, dest_len);
sti_flush(dest_start, (unsigned long)dest);
}


Expand Down Expand Up @@ -663,7 +659,6 @@ sti_bmode_font_raw(struct sti_cooked_font *f)
static void __devinit
sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest)
{
unsigned long dest_len = count;
unsigned long dest_start = (unsigned long) dest;

while (count) {
Expand All @@ -672,7 +667,8 @@ sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest)
base += 4;
dest++;
}
sti_flush(dest_start, dest_len);

sti_flush(dest_start, (unsigned long)dest);
}

static struct sti_rom * __devinit
Expand Down

0 comments on commit 03b18f1

Please sign in to comment.