Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 375542
b: refs/heads/master
c: dbbffe6
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed May 13, 2013
1 parent ee904eb commit b2eb683
Show file tree
Hide file tree
Showing 484 changed files with 29,867 additions and 5,703 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: ba21fc696dd28ea7a5880345faf0168619a478d2
refs/heads/master: dbbffe6898fd0d7bac66ded5d3c58835b13ddefc
17 changes: 17 additions & 0 deletions trunk/Documentation/devicetree/bindings/mips/ralink.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Ralink MIPS SoC device tree bindings

1. SoCs

Each device tree must specify a compatible value for the Ralink SoC
it uses in the compatible property of the root node. The compatible
value must be one of the following values:

ralink,rt2880-soc
ralink,rt3050-soc
ralink,rt3052-soc
ralink,rt3350-soc
ralink,rt3352-soc
ralink,rt3883-soc
ralink,rt5350-soc
ralink,mt7620a-soc
ralink,mt7620n-soc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ onnn ON Semiconductor Corp.
picochip Picochip Ltd
powervr PowerVR (deprecated, use img)
qcom Qualcomm, Inc.
ralink Mediatek/Ralink Technology Corp.
ramtron Ramtron International
realtek Realtek Semiconductor Corp.
renesas Renesas Electronics Corporation
Expand Down
4 changes: 2 additions & 2 deletions trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 3
PATCHLEVEL = 9
PATCHLEVEL = 10
SUBLEVEL = 0
EXTRAVERSION =
EXTRAVERSION = -rc1
NAME = Unicycling Gorilla

# *DOCUMENTATION*
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/arc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ config ARC_CACHE_PAGES
Note that Global I/D ENABLE + Per Page DISABLE works but corollary
Global DISABLE + Per Page ENABLE won't work

config ARC_CACHE_VIPT_ALIASING
bool "Support VIPT Aliasing D$"
default n

endif #ARC_CACHE

config ARC_HAS_ICCM
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arc/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ generic-y += resource.h
generic-y += scatterlist.h
generic-y += sembuf.h
generic-y += shmbuf.h
generic-y += shmparam.h
generic-y += siginfo.h
generic-y += socket.h
generic-y += sockios.h
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/arc/include/asm/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@
: "r"(data), "r"(ptr)); \
})

/* used to give SHMLBA a value to avoid Cache Aliasing */
extern unsigned int ARC_shmlba;

#define ARCH_DMA_MINALIGN L1_CACHE_BYTES

/*
Expand Down
58 changes: 49 additions & 9 deletions trunk/arch/arc/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define _ASM_CACHEFLUSH_H

#include <linux/mm.h>
#include <asm/shmparam.h>

/*
* Semantically we need this because icache doesn't snoop dcache/dma.
Expand All @@ -33,7 +34,9 @@ void flush_cache_all(void);
void flush_icache_range(unsigned long start, unsigned long end);
void __sync_icache_dcache(unsigned long paddr, unsigned long vaddr, int len);
void __inv_icache_page(unsigned long paddr, unsigned long vaddr);
void __flush_dcache_page(unsigned long paddr);
void ___flush_dcache_page(unsigned long paddr, unsigned long vaddr);
#define __flush_dcache_page(p, v) \
___flush_dcache_page((unsigned long)p, (unsigned long)v)

#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1

Expand All @@ -50,18 +53,55 @@ void dma_cache_wback(unsigned long start, unsigned long sz);
#define flush_cache_vmap(start, end) flush_cache_all()
#define flush_cache_vunmap(start, end) flush_cache_all()

/*
* VM callbacks when entire/range of user-space V-P mappings are
* torn-down/get-invalidated
*
* Currently we don't support D$ aliasing configs for our VIPT caches
* NOPS for VIPT Cache with non-aliasing D$ configurations only
*/
#define flush_cache_dup_mm(mm) /* called on fork */
#define flush_cache_dup_mm(mm) /* called on fork (VIVT only) */

#ifndef CONFIG_ARC_CACHE_VIPT_ALIASING

#define flush_cache_mm(mm) /* called on munmap/exit */
#define flush_cache_range(mm, u_vstart, u_vend)
#define flush_cache_page(vma, u_vaddr, pfn) /* PF handling/COW-break */

#else /* VIPT aliasing dcache */

/* To clear out stale userspace mappings */
void flush_cache_mm(struct mm_struct *mm);
void flush_cache_range(struct vm_area_struct *vma,
unsigned long start,unsigned long end);
void flush_cache_page(struct vm_area_struct *vma,
unsigned long user_addr, unsigned long page);

/*
* To make sure that userspace mapping is flushed to memory before
* get_user_pages() uses a kernel mapping to access the page
*/
#define ARCH_HAS_FLUSH_ANON_PAGE
void flush_anon_page(struct vm_area_struct *vma,
struct page *page, unsigned long u_vaddr);

#endif /* CONFIG_ARC_CACHE_VIPT_ALIASING */

/*
* Simple wrapper over config option
* Bootup code ensures that hardware matches kernel configuration
*/
static inline int cache_is_vipt_aliasing(void)
{
#ifdef CONFIG_ARC_CACHE_VIPT_ALIASING
return 1;
#else
return 0;
#endif
}

#define CACHE_COLOR(addr) (((unsigned long)(addr) >> (PAGE_SHIFT)) & 3)

/*
* checks if two addresses (after page aligning) index into same cache set
*/
#define addr_not_cache_congruent(addr1, addr2) \
cache_is_vipt_aliasing() ? \
(CACHE_COLOR(addr1) != CACHE_COLOR(addr2)) : 0 \

#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
do { \
memcpy(dst, src, len); \
Expand Down
16 changes: 15 additions & 1 deletion trunk/arch/arc/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,27 @@
#define get_user_page(vaddr) __get_free_page(GFP_KERNEL)
#define free_user_page(page, addr) free_page(addr)

/* TBD: for now don't worry about VIPT D$ aliasing */
#define clear_page(paddr) memset((paddr), 0, PAGE_SIZE)
#define copy_page(to, from) memcpy((to), (from), PAGE_SIZE)

#ifndef CONFIG_ARC_CACHE_VIPT_ALIASING

#define clear_user_page(addr, vaddr, pg) clear_page(addr)
#define copy_user_page(vto, vfrom, vaddr, pg) copy_page(vto, vfrom)

#else /* VIPT aliasing dcache */

struct vm_area_struct;
struct page;

#define __HAVE_ARCH_COPY_USER_HIGHPAGE

void copy_user_highpage(struct page *to, struct page *from,
unsigned long u_vaddr, struct vm_area_struct *vma);
void clear_user_page(void *to, unsigned long u_vaddr, struct page *page);

#endif /* CONFIG_ARC_CACHE_VIPT_ALIASING */

#undef STRICT_MM_TYPECHECKS

#ifdef STRICT_MM_TYPECHECKS
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/arc/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,9 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,

#include <asm-generic/pgtable.h>

/* to cope with aliasing VIPT cache */
#define HAVE_ARCH_UNMAPPED_AREA

/*
* No page table caches to initialise
*/
Expand Down
18 changes: 18 additions & 0 deletions trunk/arch/arc/include/asm/shmparam.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef __ARC_ASM_SHMPARAM_H
#define __ARC_ASM_SHMPARAM_H

/* Handle upto 2 cache bins */
#define SHMLBA (2 * PAGE_SIZE)

/* Enforce SHMLBA in shmat */
#define __ARCH_FORCE_SHMLBA

#endif
11 changes: 9 additions & 2 deletions trunk/arch/arc/include/asm/tlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,20 @@ do { \
/*
* This pair is called at time of munmap/exit to flush cache and TLB entries
* for mappings being torn down.
* 1) cache-flush part -implemented via tlb_start_vma( ) can be NOP (for now)
* as we don't support aliasing configs in our VIPT D$.
* 1) cache-flush part -implemented via tlb_start_vma( ) for VIPT aliasing D$
* 2) tlb-flush part - implemted via tlb_end_vma( ) flushes the TLB range
*
* Note, read http://lkml.org/lkml/2004/1/15/6
*/
#ifndef CONFIG_ARC_CACHE_VIPT_ALIASING
#define tlb_start_vma(tlb, vma)
#else
#define tlb_start_vma(tlb, vma) \
do { \
if (!tlb->fullmm) \
flush_cache_range(vma, vma->vm_start, vma->vm_end); \
} while(0)
#endif

#define tlb_end_vma(tlb, vma) \
do { \
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arc/mm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
#

obj-y := extable.o ioremap.o dma.o fault.o init.o
obj-y += tlb.o tlbex.o cache_arc700.o
obj-y += tlb.o tlbex.o cache_arc700.o mmap.o
Loading

0 comments on commit b2eb683

Please sign in to comment.