Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190888
b: refs/heads/master
c: d83c49f
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed May 15, 2010
1 parent ff8c01c commit 9fb5837
Show file tree
Hide file tree
Showing 39 changed files with 110 additions and 247 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: c28f3f8660697d03afbdb581781b94ff6222a585
refs/heads/master: d83c49f3e36cecd2e8823b6c48ffba083b8a5704
2 changes: 1 addition & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -5492,7 +5492,7 @@ S: Maintained
F: drivers/mmc/host/tmio_mmc.*

TMPFS (SHMEM FILESYSTEM)
M: Hugh Dickins <hughd@google.com>
M: Hugh Dickins <hugh.dickins@tiscali.co.uk>
L: linux-mm@kvack.org
S: Maintained
F: include/linux/shmem_fs.h
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/arm/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,6 @@ static inline void __flush_icache_all(void)
#ifdef CONFIG_ARM_ERRATA_411920
extern void v6_icache_inval_all(void);
v6_icache_inval_all();
#elif defined(CONFIG_SMP) && __LINUX_ARM_ARCH__ >= 7
asm("mcr p15, 0, %0, c7, c1, 0 @ invalidate I-cache inner shareable\n"
:
: "r" (0));
#else
asm("mcr p15, 0, %0, c7, c5, 0 @ invalidate I-cache\n"
:
Expand Down
17 changes: 0 additions & 17 deletions trunk/arch/arm/include/asm/smp_twd.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
#ifndef __ASMARM_SMP_TWD_H
#define __ASMARM_SMP_TWD_H

#define TWD_TIMER_LOAD 0x00
#define TWD_TIMER_COUNTER 0x04
#define TWD_TIMER_CONTROL 0x08
#define TWD_TIMER_INTSTAT 0x0C

#define TWD_WDOG_LOAD 0x20
#define TWD_WDOG_COUNTER 0x24
#define TWD_WDOG_CONTROL 0x28
#define TWD_WDOG_INTSTAT 0x2C
#define TWD_WDOG_RESETSTAT 0x30
#define TWD_WDOG_DISABLE 0x34

#define TWD_TIMER_CONTROL_ENABLE (1 << 0)
#define TWD_TIMER_CONTROL_ONESHOT (0 << 1)
#define TWD_TIMER_CONTROL_PERIODIC (1 << 1)
#define TWD_TIMER_CONTROL_IT_ENABLE (1 << 2)

struct clock_event_device;

extern void __iomem *twd_base;
Expand Down
29 changes: 1 addition & 28 deletions trunk/arch/arm/include/asm/tlbflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
#define TLB_V7_UIS_FULL (1 << 20)
#define TLB_V7_UIS_ASID (1 << 21)

/* Inner Shareable BTB operation (ARMv7 MP extensions) */
#define TLB_V7_IS_BTB (1 << 22)

#define TLB_L2CLEAN_FR (1 << 29) /* Feroceon */
#define TLB_DCLEAN (1 << 30)
#define TLB_WB (1 << 31)
Expand Down Expand Up @@ -186,7 +183,7 @@
#endif

#ifdef CONFIG_SMP
#define v7wbi_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_V7_IS_BTB | \
#define v7wbi_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_BTB | \
TLB_V7_UIS_FULL | TLB_V7_UIS_PAGE | TLB_V7_UIS_ASID)
#else
#define v7wbi_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_BTB | \
Expand Down Expand Up @@ -342,12 +339,6 @@ static inline void local_flush_tlb_all(void)
dsb();
isb();
}
if (tlb_flag(TLB_V7_IS_BTB)) {
/* flush the branch target cache */
asm("mcr p15, 0, %0, c7, c1, 6" : : "r" (zero) : "cc");
dsb();
isb();
}
}

static inline void local_flush_tlb_mm(struct mm_struct *mm)
Expand Down Expand Up @@ -385,12 +376,6 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm)
asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc");
dsb();
}
if (tlb_flag(TLB_V7_IS_BTB)) {
/* flush the branch target cache */
asm("mcr p15, 0, %0, c7, c1, 6" : : "r" (zero) : "cc");
dsb();
isb();
}
}

static inline void
Expand Down Expand Up @@ -431,12 +416,6 @@ local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc");
dsb();
}
if (tlb_flag(TLB_V7_IS_BTB)) {
/* flush the branch target cache */
asm("mcr p15, 0, %0, c7, c1, 6" : : "r" (zero) : "cc");
dsb();
isb();
}
}

static inline void local_flush_tlb_kernel_page(unsigned long kaddr)
Expand Down Expand Up @@ -475,12 +454,6 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr)
dsb();
isb();
}
if (tlb_flag(TLB_V7_IS_BTB)) {
/* flush the branch target cache */
asm("mcr p15, 0, %0, c7, c1, 6" : : "r" (zero) : "cc");
dsb();
isb();
}
}

/*
Expand Down
17 changes: 17 additions & 0 deletions trunk/arch/arm/kernel/smp_twd.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,23 @@
#include <asm/smp_twd.h>
#include <asm/hardware/gic.h>

#define TWD_TIMER_LOAD 0x00
#define TWD_TIMER_COUNTER 0x04
#define TWD_TIMER_CONTROL 0x08
#define TWD_TIMER_INTSTAT 0x0C

#define TWD_WDOG_LOAD 0x20
#define TWD_WDOG_COUNTER 0x24
#define TWD_WDOG_CONTROL 0x28
#define TWD_WDOG_INTSTAT 0x2C
#define TWD_WDOG_RESETSTAT 0x30
#define TWD_WDOG_DISABLE 0x34

#define TWD_TIMER_CONTROL_ENABLE (1 << 0)
#define TWD_TIMER_CONTROL_ONESHOT (0 << 1)
#define TWD_TIMER_CONTROL_PERIODIC (1 << 1)
#define TWD_TIMER_CONTROL_IT_ENABLE (1 << 2)

/* set up by the platform code */
void __iomem *twd_base;

Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arm/lib/clear_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ USER( strnebt r2, [r0])
mov r0, #0
ldmfd sp!, {r1, pc}
ENDPROC(__clear_user)
ENDPROC(__clear_user_std)

.pushsection .fixup,"ax"
.align 0
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arm/lib/copy_to_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ WEAK(__copy_to_user)
#include "copy_template.S"

ENDPROC(__copy_to_user)
ENDPROC(__copy_to_user_std)

.pushsection .fixup,"ax"
.align 0
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-davinci/da830.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ static struct clk_lookup da830_clks[] = {
CLK("davinci-mcasp.0", NULL, &mcasp0_clk),
CLK("davinci-mcasp.1", NULL, &mcasp1_clk),
CLK("davinci-mcasp.2", NULL, &mcasp2_clk),
CLK(NULL, "usb20", &usb20_clk),
CLK("musb_hdrc", NULL, &usb20_clk),
CLK(NULL, "aemif", &aemif_clk),
CLK(NULL, "aintc", &aintc_clk),
CLK(NULL, "secu_mgr", &secu_mgr_clk),
Expand Down
17 changes: 4 additions & 13 deletions trunk/arch/arm/mm/cache-v6.S
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,6 @@ v6_dma_inv_range:
mcrne p15, 0, r1, c7, c15, 1 @ clean & invalidate unified line
#endif
1:
#ifdef CONFIG_SMP
str r0, [r0] @ write for ownership
#endif
#ifdef HARVARD_CACHE
mcr p15, 0, r0, c7, c6, 1 @ invalidate D line
#else
Expand All @@ -234,9 +231,6 @@ v6_dma_inv_range:
v6_dma_clean_range:
bic r0, r0, #D_CACHE_LINE_SIZE - 1
1:
#ifdef CONFIG_SMP
ldr r2, [r0] @ read for ownership
#endif
#ifdef HARVARD_CACHE
mcr p15, 0, r0, c7, c10, 1 @ clean D line
#else
Expand All @@ -257,10 +251,6 @@ v6_dma_clean_range:
ENTRY(v6_dma_flush_range)
bic r0, r0, #D_CACHE_LINE_SIZE - 1
1:
#ifdef CONFIG_SMP
ldr r2, [r0] @ read for ownership
str r2, [r0] @ write for ownership
#endif
#ifdef HARVARD_CACHE
mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line
#else
Expand All @@ -283,9 +273,7 @@ ENTRY(v6_dma_map_area)
add r1, r1, r0
teq r2, #DMA_FROM_DEVICE
beq v6_dma_inv_range
teq r2, #DMA_TO_DEVICE
beq v6_dma_clean_range
b v6_dma_flush_range
b v6_dma_clean_range
ENDPROC(v6_dma_map_area)

/*
Expand All @@ -295,6 +283,9 @@ ENDPROC(v6_dma_map_area)
* - dir - DMA direction
*/
ENTRY(v6_dma_unmap_area)
add r1, r1, r0
teq r2, #DMA_TO_DEVICE
bne v6_dma_inv_range
mov pc, lr
ENDPROC(v6_dma_unmap_area)

Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/arm/mm/cache-v7.S
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,7 @@ ENTRY(v7_coherent_user_range)
cmp r0, r1
blo 1b
mov r0, #0
#ifdef CONFIG_SMP
mcr p15, 0, r0, c7, c1, 6 @ invalidate BTB Inner Shareable
#else
mcr p15, 0, r0, c7, c5, 6 @ invalidate BTB
#endif
dsb
isb
mov pc, lr
Expand Down
13 changes: 2 additions & 11 deletions trunk/arch/arm/mm/nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,6 @@ void flush_dcache_page(struct page *page)
}
EXPORT_SYMBOL(flush_dcache_page);

void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
unsigned long uaddr, void *dst, const void *src,
unsigned long len)
{
memcpy(dst, src, len);
if (vma->vm_flags & VM_EXEC)
__cpuc_coherent_user_range(uaddr, uaddr + len);
}

void __iomem *__arm_ioremap_pfn(unsigned long pfn, unsigned long offset,
size_t size, unsigned int mtype)
{
Expand All @@ -96,8 +87,8 @@ void __iomem *__arm_ioremap(unsigned long phys_addr, size_t size,
}
EXPORT_SYMBOL(__arm_ioremap);

void __iomem *__arm_ioremap_caller(unsigned long phys_addr, size_t size,
unsigned int mtype, void *caller)
void __iomem *__arm_ioremap(unsigned long phys_addr, size_t size,
unsigned int mtype, void *caller)
{
return __arm_ioremap(phys_addr, size, mtype);
}
Expand Down
8 changes: 0 additions & 8 deletions trunk/arch/arm/mm/tlb-v7.S
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ ENTRY(v7wbi_flush_user_tlb_range)
cmp r0, r1
blo 1b
mov ip, #0
#ifdef CONFIG_SMP
mcr p15, 0, ip, c7, c1, 6 @ flush BTAC/BTB Inner Shareable
#else
mcr p15, 0, ip, c7, c5, 6 @ flush BTAC/BTB
#endif
dsb
mov pc, lr
ENDPROC(v7wbi_flush_user_tlb_range)
Expand Down Expand Up @@ -83,11 +79,7 @@ ENTRY(v7wbi_flush_kern_tlb_range)
cmp r0, r1
blo 1b
mov r2, #0
#ifdef CONFIG_SMP
mcr p15, 0, r2, c7, c1, 6 @ flush BTAC/BTB Inner Shareable
#else
mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB
#endif
dsb
isb
mov pc, lr
Expand Down
87 changes: 18 additions & 69 deletions trunk/arch/microblaze/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,39 +182,6 @@ extern long __user_bad(void);
* Returns zero on success, or -EFAULT on error.
* On error, the variable @x is set to zero.
*/
#define get_user(x, ptr) \
__get_user_check((x), (ptr), sizeof(*(ptr)))

#define __get_user_check(x, ptr, size) \
({ \
unsigned long __gu_val = 0; \
const typeof(*(ptr)) __user *__gu_addr = (ptr); \
int __gu_err = 0; \
\
if (access_ok(VERIFY_READ, __gu_addr, size)) { \
switch (size) { \
case 1: \
__get_user_asm("lbu", __gu_addr, __gu_val, \
__gu_err); \
break; \
case 2: \
__get_user_asm("lhu", __gu_addr, __gu_val, \
__gu_err); \
break; \
case 4: \
__get_user_asm("lw", __gu_addr, __gu_val, \
__gu_err); \
break; \
default: \
__gu_err = __user_bad(); \
break; \
} \
} else { \
__gu_err = -EFAULT; \
} \
x = (typeof(*(ptr)))__gu_val; \
__gu_err; \
})

#define __get_user(x, ptr) \
({ \
Expand All @@ -239,6 +206,12 @@ extern long __user_bad(void);
})


#define get_user(x, ptr) \
({ \
access_ok(VERIFY_READ, (ptr), sizeof(*(ptr))) \
? __get_user((x), (ptr)) : -EFAULT; \
})

#define __put_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \
({ \
__asm__ __volatile__ ( \
Expand Down Expand Up @@ -293,42 +266,6 @@ extern long __user_bad(void);
*
* Returns zero on success, or -EFAULT on error.
*/
#define put_user(x, ptr) \
__put_user_check((x), (ptr), sizeof(*(ptr)))

#define __put_user_check(x, ptr, size) \
({ \
typeof(*(ptr)) __pu_val; \
typeof(*(ptr)) __user *__pu_addr = (ptr); \
int __pu_err = 0; \
\
__pu_val = (x); \
if (access_ok(VERIFY_WRITE, __pu_addr, size)) { \
switch (size) { \
case 1: \
__put_user_asm("sb", __pu_addr, __pu_val, \
__pu_err); \
break; \
case 2: \
__put_user_asm("sh", __pu_addr, __pu_val, \
__pu_err); \
break; \
case 4: \
__put_user_asm("sw", __pu_addr, __pu_val, \
__pu_err); \
break; \
case 8: \
__put_user_asm_8(__pu_addr, __pu_val, __pu_err);\
break; \
default: \
__pu_err = __user_bad(); \
break; \
} \
} else { \
__pu_err = -EFAULT; \
} \
__pu_err; \
})

#define __put_user(x, ptr) \
({ \
Expand All @@ -353,6 +290,18 @@ extern long __user_bad(void);
__gu_err; \
})

#ifndef CONFIG_MMU

#define put_user(x, ptr) __put_user((x), (ptr))

#else /* CONFIG_MMU */

#define put_user(x, ptr) \
({ \
access_ok(VERIFY_WRITE, (ptr), sizeof(*(ptr))) \
? __put_user((x), (ptr)) : -EFAULT; \
})
#endif /* CONFIG_MMU */

/* copy_to_from_user */
#define __copy_from_user(to, from, n) \
Expand Down
Loading

0 comments on commit 9fb5837

Please sign in to comment.