Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88195
b: refs/heads/master
c: 9c5a3d7
h: refs/heads/master
i:
  88193: f895781
  88191: 4dc3125
v: v3
  • Loading branch information
Ralf Baechle committed Apr 7, 2008
1 parent 11ae914 commit 8149e5b
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 8 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: ad3c7e42e33a842cf3b518e21a7f69e167649d8a
refs/heads/master: 9c5a3d729cf430609d091ff610a7db363aafcd47
14 changes: 14 additions & 0 deletions trunk/arch/mips/mm/c-r4k.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,16 @@ static inline int has_valid_asid(const struct mm_struct *mm)
#endif
}

static void r4k__flush_cache_vmap(void)
{
r4k_blast_dcache();
}

static void r4k__flush_cache_vunmap(void)
{
r4k_blast_dcache();
}

static inline void local_r4k_flush_cache_range(void * args)
{
struct vm_area_struct *vma = args;
Expand Down Expand Up @@ -1281,6 +1291,10 @@ void __cpuinit r4k_cache_init(void)
PAGE_SIZE - 1);
else
shm_align_mask = PAGE_SIZE-1;

__flush_cache_vmap = r4k__flush_cache_vmap;
__flush_cache_vunmap = r4k__flush_cache_vunmap;

flush_cache_all = cache_noop;
__flush_cache_all = r4k___flush_cache_all;
flush_cache_mm = r4k_flush_cache_mm;
Expand Down
15 changes: 15 additions & 0 deletions trunk/arch/mips/mm/c-tx39.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ static inline void tx39_blast_icache(void)
local_irq_restore(flags);
}

static void tx39__flush_cache_vmap(void)
{
tx39_blast_dcache();
}

static void tx39__flush_cache_vunmap(void)
{
tx39_blast_dcache();
}

static inline void tx39_flush_cache_all(void)
{
if (!cpu_has_dc_aliases)
Expand Down Expand Up @@ -344,6 +354,8 @@ void __cpuinit tx39_cache_init(void)
switch (current_cpu_type()) {
case CPU_TX3912:
/* TX39/H core (writethru direct-map cache) */
__flush_cache_vmap = tx39__flush_cache_vmap;
__flush_cache_vunmap = tx39__flush_cache_vunmap;
flush_cache_all = tx39h_flush_icache_all;
__flush_cache_all = tx39h_flush_icache_all;
flush_cache_mm = (void *) tx39h_flush_icache_all;
Expand All @@ -369,6 +381,9 @@ void __cpuinit tx39_cache_init(void)
write_c0_wired(0); /* set 8 on reset... */
/* board-dependent init code may set WBON */

__flush_cache_vmap = tx39__flush_cache_vmap;
__flush_cache_vunmap = tx39__flush_cache_vunmap;

flush_cache_all = tx39_flush_cache_all;
__flush_cache_all = tx39___flush_cache_all;
flush_cache_mm = tx39_flush_cache_mm;
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/mips/mm/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page,
unsigned long pfn);
void (*flush_icache_range)(unsigned long start, unsigned long end);

void (*__flush_cache_vmap)(void);
void (*__flush_cache_vunmap)(void);

/* MIPS specific cache operations */
void (*flush_cache_sigtramp)(unsigned long addr);
void (*local_flush_data_cache_page)(void * addr);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ide/pci/siimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ static void proc_reports_siimage (struct pci_dev *dev, u8 clocking, const char *

static unsigned int setup_mmio_siimage (struct pci_dev *dev, const char *name)
{
resource_size_t bar5 = pci_resource_start(dev, 5);
unsigned long bar5 = pci_resource_start(dev, 5);
unsigned long barsize = pci_resource_len(dev, 5);
u8 tmpbyte = 0;
void __iomem *ioaddr;
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/smc91x.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@
#define SMC_insw(a, r, p, l) insw ((unsigned long *)((a) + (r)), p, l)
# endif
/* check if the mac in reg is valid */
#define SMC_GET_MAC_ADDR(addr) \
#define SMC_GET_MAC_ADDR(lp, addr) \
do { \
unsigned int __v; \
__v = SMC_inw(ioaddr, ADDR0_REG); \
__v = SMC_inw(ioaddr, ADDR0_REG(lp)); \
addr[0] = __v; addr[1] = __v >> 8; \
__v = SMC_inw(ioaddr, ADDR1_REG); \
__v = SMC_inw(ioaddr, ADDR1_REG(lp)); \
addr[2] = __v; addr[3] = __v >> 8; \
__v = SMC_inw(ioaddr, ADDR2_REG); \
__v = SMC_inw(ioaddr, ADDR2_REG(lp)); \
addr[4] = __v; addr[5] = __v >> 8; \
if (*(u32 *)(&addr[0]) == 0xFFFFFFFF) { \
random_ether_addr(addr); \
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ static int start_xmit(struct sk_buff *skb, struct net_device *dev)
/* Activate callback for using skbs: if this returns false it
* means some were used in the meantime. */
if (unlikely(!vi->svq->vq_ops->enable_cb(vi->svq))) {
printk("Unlikely: restart svq race\n");
vi->svq->vq_ops->disable_cb(vi->svq);
netif_start_queue(dev);
goto again;
Expand Down
18 changes: 16 additions & 2 deletions trunk/include/asm-mips/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,22 @@ static inline void flush_icache_page(struct vm_area_struct *vma,
}

extern void (*flush_icache_range)(unsigned long start, unsigned long end);
#define flush_cache_vmap(start, end) flush_cache_all()
#define flush_cache_vunmap(start, end) flush_cache_all()

extern void (*__flush_cache_vmap)(void);

static inline void flush_cache_vmap(unsigned long start, unsigned long end)
{
if (cpu_has_dc_aliases)
__flush_cache_vmap();
}

extern void (*__flush_cache_vunmap)(void);

static inline void flush_cache_vunmap(unsigned long start, unsigned long end)
{
if (cpu_has_dc_aliases)
__flush_cache_vunmap();
}

extern void copy_to_user_page(struct vm_area_struct *vma,
struct page *page, unsigned long vaddr, void *dst, const void *src,
Expand Down

0 comments on commit 8149e5b

Please sign in to comment.