Skip to content

Commit

Permalink
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-…
Browse files Browse the repository at this point in the history
…linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [PATCH] make au1xxx-ide compile again
  [MIPS] Hack for SB1 cache issues
  • Loading branch information
Linus Torvalds committed Nov 23, 2006
2 parents 66c669b + ec7080d commit 490a6e2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
22 changes: 21 additions & 1 deletion arch/mips/mm/c-sb1.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <linux/init.h>
#include <linux/hardirq.h>

#include <asm/asm.h>
#include <asm/bootinfo.h>
Expand Down Expand Up @@ -242,6 +243,25 @@ void sb1_flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsign
__attribute__((alias("local_sb1_flush_cache_page")));
#endif

#ifdef CONFIG_SMP
static void sb1_flush_cache_data_page_ipi(void *info)
{
unsigned long start = (unsigned long)info;

__sb1_writeback_inv_dcache_range(start, start + PAGE_SIZE);
}

static void sb1_flush_cache_data_page(unsigned long addr)
{
if (in_atomic())
__sb1_writeback_inv_dcache_range(addr, addr + PAGE_SIZE);
else
on_each_cpu(sb1_flush_cache_data_page_ipi, (void *) addr, 1, 1);
}
#else
void sb1_flush_cache_data_page(unsigned long)
__attribute__((alias("local_sb1_flush_cache_data_page")));
#endif

/*
* Invalidate all caches on this CPU
Expand Down Expand Up @@ -481,7 +501,7 @@ void sb1_cache_init(void)

flush_cache_sigtramp = sb1_flush_cache_sigtramp;
local_flush_data_cache_page = (void *) sb1_nop;
flush_data_cache_page = (void *) sb1_nop;
flush_data_cache_page = sb1_flush_cache_data_page;

/* Full flush */
__flush_cache_all = sb1___flush_cache_all;
Expand Down
6 changes: 2 additions & 4 deletions include/asm-mips/mach-au1x00/au1xxx_ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,8 @@ int __init auide_probe(void);
static int auide_dma_host_on(ide_drive_t *drive);
static int auide_dma_lostirq(ide_drive_t *drive);
static int auide_dma_on(ide_drive_t *drive);
static void auide_ddma_tx_callback(int irq, void *param,
struct pt_regs *regs);
static void auide_ddma_rx_callback(int irq, void *param,
struct pt_regs *regs);
static void auide_ddma_tx_callback(int irq, void *param);
static void auide_ddma_rx_callback(int irq, void *param);
static int auide_dma_off_quietly(ide_drive_t *drive);
#endif /* end CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA */

Expand Down

0 comments on commit 490a6e2

Please sign in to comment.