Skip to content

Commit a1baeb2

Browse files
committed
Merge remote-tracking branch 'stable/linux-3.10.y' into rpi-3.10.y
2 parents 439def4 + 6969595 commit a1baeb2

126 files changed

Lines changed: 1078 additions & 505 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 3
22
PATCHLEVEL = 10
3-
SUBLEVEL = 32
3+
SUBLEVEL = 33
44
EXTRAVERSION =
55
NAME = TOSSUG Baby Fish
66

‎arch/arm/include/asm/cacheflush.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ extern void copy_to_user_page(struct vm_area_struct *, struct page *,
212212
static inline void __flush_icache_all(void)
213213
{
214214
__flush_icache_preferred();
215+
dsb();
215216
}
216217

217218
/*

‎arch/arm/include/asm/spinlock.h‎

Lines changed: 48 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,22 @@ static inline void arch_spin_lock(arch_spinlock_t *lock)
9797

9898
static inline int arch_spin_trylock(arch_spinlock_t *lock)
9999
{
100-
unsigned long tmp;
100+
unsigned long contended, res;
101101
u32 slock;
102102

103-
__asm__ __volatile__(
104-
" ldrex %0, [%2]\n"
105-
" subs %1, %0, %0, ror #16\n"
106-
" addeq %0, %0, %3\n"
107-
" strexeq %1, %0, [%2]"
108-
: "=&r" (slock), "=&r" (tmp)
109-
: "r" (&lock->slock), "I" (1 << TICKET_SHIFT)
110-
: "cc");
111-
112-
if (tmp == 0) {
103+
do {
104+
__asm__ __volatile__(
105+
" ldrex %0, [%3]\n"
106+
" mov %2, #0\n"
107+
" subs %1, %0, %0, ror #16\n"
108+
" addeq %0, %0, %4\n"
109+
" strexeq %2, %0, [%3]"
110+
: "=&r" (slock), "=&r" (contended), "=r" (res)
111+
: "r" (&lock->slock), "I" (1 << TICKET_SHIFT)
112+
: "cc");
113+
} while (res);
114+
115+
if (!contended) {
113116
smp_mb();
114117
return 1;
115118
} else {
@@ -165,17 +168,20 @@ static inline void arch_write_lock(arch_rwlock_t *rw)
165168

166169
static inline int arch_write_trylock(arch_rwlock_t *rw)
167170
{
168-
unsigned long tmp;
169-
170-
__asm__ __volatile__(
171-
" ldrex %0, [%1]\n"
172-
" teq %0, #0\n"
173-
" strexeq %0, %2, [%1]"
174-
: "=&r" (tmp)
175-
: "r" (&rw->lock), "r" (0x80000000)
176-
: "cc");
177-
178-
if (tmp == 0) {
171+
unsigned long contended, res;
172+
173+
do {
174+
__asm__ __volatile__(
175+
" ldrex %0, [%2]\n"
176+
" mov %1, #0\n"
177+
" teq %0, #0\n"
178+
" strexeq %1, %3, [%2]"
179+
: "=&r" (contended), "=&r" (res)
180+
: "r" (&rw->lock), "r" (0x80000000)
181+
: "cc");
182+
} while (res);
183+
184+
if (!contended) {
179185
smp_mb();
180186
return 1;
181187
} else {
@@ -251,18 +257,26 @@ static inline void arch_read_unlock(arch_rwlock_t *rw)
251257

252258
static inline int arch_read_trylock(arch_rwlock_t *rw)
253259
{
254-
unsigned long tmp, tmp2 = 1;
255-
256-
__asm__ __volatile__(
257-
" ldrex %0, [%2]\n"
258-
" adds %0, %0, #1\n"
259-
" strexpl %1, %0, [%2]\n"
260-
: "=&r" (tmp), "+r" (tmp2)
261-
: "r" (&rw->lock)
262-
: "cc");
263-
264-
smp_mb();
265-
return tmp2 == 0;
260+
unsigned long contended, res;
261+
262+
do {
263+
__asm__ __volatile__(
264+
" ldrex %0, [%2]\n"
265+
" mov %1, #0\n"
266+
" adds %0, %0, #1\n"
267+
" strexpl %1, %0, [%2]"
268+
: "=&r" (contended), "=&r" (res)
269+
: "r" (&rw->lock)
270+
: "cc");
271+
} while (res);
272+
273+
/* If the lock is negative, then it is already held for write. */
274+
if (contended < 0x80000000) {
275+
smp_mb();
276+
return 1;
277+
} else {
278+
return 0;
279+
}
266280
}
267281

268282
/* read_can_lock - would read_trylock() succeed? */

‎arch/arm/mach-omap2/gpmc.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ static void __maybe_unused gpmc_read_timings_dt(struct device_node *np,
13351335
of_property_read_bool(np, "gpmc,time-para-granularity");
13361336
}
13371337

1338-
#ifdef CONFIG_MTD_NAND
1338+
#if IS_ENABLED(CONFIG_MTD_NAND)
13391339

13401340
static const char * const nand_ecc_opts[] = {
13411341
[OMAP_ECC_HAMMING_CODE_DEFAULT] = "sw",
@@ -1391,7 +1391,7 @@ static int gpmc_probe_nand_child(struct platform_device *pdev,
13911391
}
13921392
#endif
13931393

1394-
#ifdef CONFIG_MTD_ONENAND
1394+
#if IS_ENABLED(CONFIG_MTD_ONENAND)
13951395
static int gpmc_probe_onenand_child(struct platform_device *pdev,
13961396
struct device_node *child)
13971397
{

‎arch/arm/mach-tegra/common.c‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <linux/io.h>
2323
#include <linux/clk.h>
2424
#include <linux/delay.h>
25+
#include <linux/of.h>
2526
#include <linux/irqchip.h>
2627
#include <linux/clk/tegra.h>
2728

@@ -80,10 +81,20 @@ void tegra_assert_system_reset(char mode, const char *cmd)
8081
static void __init tegra_init_cache(void)
8182
{
8283
#ifdef CONFIG_CACHE_L2X0
84+
static const struct of_device_id pl310_ids[] __initconst = {
85+
{ .compatible = "arm,pl310-cache", },
86+
{}
87+
};
88+
89+
struct device_node *np;
8390
int ret;
8491
void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000;
8592
u32 aux_ctrl, cache_type;
8693

94+
np = of_find_matching_node(NULL, pl310_ids);
95+
if (!np)
96+
return;
97+
8798
cache_type = readl(p + L2X0_CACHE_TYPE);
8899
aux_ctrl = (cache_type & 0x700) << (17-8);
89100
aux_ctrl |= 0x7C400001;

‎arch/arm/mm/dma-mapping.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,7 @@ static void *arm_iommu_alloc_attrs(struct device *dev, size_t size,
13111311
*handle = DMA_ERROR_CODE;
13121312
size = PAGE_ALIGN(size);
13131313

1314-
if (gfp & GFP_ATOMIC)
1314+
if (!(gfp & __GFP_WAIT))
13151315
return __iommu_alloc_atomic(dev, size, handle);
13161316

13171317
pages = __iommu_alloc_buffer(dev, size, gfp, attrs);

‎arch/arm/mm/proc-v6.S‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ __v6_setup:
215215
mcr p15, 0, r0, c7, c14, 0 @ clean+invalidate D cache
216216
mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache
217217
mcr p15, 0, r0, c7, c15, 0 @ clean+invalidate cache
218-
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
219218
#ifdef CONFIG_MMU
220219
mcr p15, 0, r0, c8, c7, 0 @ invalidate I + D TLBs
221220
mcr p15, 0, r0, c2, c0, 2 @ TTB control register
@@ -225,6 +224,8 @@ __v6_setup:
225224
ALT_UP(orr r8, r8, #TTB_FLAGS_UP)
226225
mcr p15, 0, r8, c2, c0, 1 @ load TTB1
227226
#endif /* CONFIG_MMU */
227+
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer and
228+
@ complete invalidations
228229
adr r5, v6_crval
229230
ldmia r5, {r5, r6}
230231
#ifdef CONFIG_CPU_ENDIAN_BE8

‎arch/arm/mm/proc-v7.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@ __v7_setup:
329329

330330
3: mov r10, #0
331331
mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate
332-
dsb
333332
#ifdef CONFIG_MMU
334333
mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs
335334
v7_ttb_setup r10, r4, r8, r5 @ TTBCR, TTBRx setup
@@ -338,6 +337,7 @@ __v7_setup:
338337
mcr p15, 0, r5, c10, c2, 0 @ write PRRR
339338
mcr p15, 0, r6, c10, c2, 1 @ write NMRR
340339
#endif
340+
dsb @ Complete invalidations
341341
#ifndef CONFIG_ARM_THUMBEE
342342
mrc p15, 0, r0, c0, c1, 0 @ read ID_PFR0 for ThumbEE
343343
and r0, r0, #(0xf << 12) @ ThumbEE enabled field

‎arch/arm64/kernel/stacktrace.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ int unwind_frame(struct stackframe *frame)
4848

4949
frame->sp = fp + 0x10;
5050
frame->fp = *(unsigned long *)(fp);
51-
frame->pc = *(unsigned long *)(fp + 8);
51+
/*
52+
* -4 here because we care about the PC at time of bl,
53+
* not where the return will go.
54+
*/
55+
frame->pc = *(unsigned long *)(fp + 8) - 4;
5256

5357
return 0;
5458
}

‎arch/avr32/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ all: uImage vmlinux.elf
1111

1212
KBUILD_DEFCONFIG := atstk1002_defconfig
1313

14-
KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic
14+
KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic -D__linux__
1515
KBUILD_AFLAGS += -mrelax -mno-pic
1616
KBUILD_CFLAGS_MODULE += -mno-relax
1717
LDFLAGS_vmlinux += --relax

0 commit comments

Comments
 (0)