Skip to content

Commit 3916cb0

Browse files
committed
Merge remote-tracking branch 'stable/linux-3.10.y' into rpi-3.10.y
2 parents 4bbea92 + 095f493 commit 3916cb0

86 files changed

Lines changed: 649 additions & 308 deletions

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 = 24
3+
SUBLEVEL = 25
44
EXTRAVERSION =
55
NAME = TOSSUG Baby Fish
66

‎arch/arm/kernel/process.c‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ EXPORT_SYMBOL(dump_fpu);
408408
unsigned long get_wchan(struct task_struct *p)
409409
{
410410
struct stackframe frame;
411+
unsigned long stack_page;
411412
int count = 0;
412413
if (!p || p == current || p->state == TASK_RUNNING)
413414
return 0;
@@ -416,9 +417,11 @@ unsigned long get_wchan(struct task_struct *p)
416417
frame.sp = thread_saved_sp(p);
417418
frame.lr = 0; /* recovered from the stack */
418419
frame.pc = thread_saved_pc(p);
420+
stack_page = (unsigned long)task_stack_page(p);
419421
do {
420-
int ret = unwind_frame(&frame);
421-
if (ret < 0)
422+
if (frame.sp < stack_page ||
423+
frame.sp >= stack_page + THREAD_SIZE ||
424+
unwind_frame(&frame) < 0)
422425
return 0;
423426
if (!in_sched_functions(frame.pc))
424427
return frame.pc;

‎arch/arm/kernel/stacktrace.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ int notrace unwind_frame(struct stackframe *frame)
3131
high = ALIGN(low, THREAD_SIZE);
3232

3333
/* check current frame pointer is within bounds */
34-
if (fp < (low + 12) || fp + 4 >= high)
34+
if (fp < low + 12 || fp > high - 4)
3535
return -EINVAL;
3636

3737
/* restore the registers from the stack frame */

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

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ static int _set_clockactivity(struct omap_hwmod *oh, u8 clockact, u32 *v)
399399
}
400400

401401
/**
402-
* _set_softreset: set OCP_SYSCONFIG.CLOCKACTIVITY bits in @v
402+
* _set_softreset: set OCP_SYSCONFIG.SOFTRESET bit in @v
403403
* @oh: struct omap_hwmod *
404404
* @v: pointer to register contents to modify
405405
*
@@ -426,6 +426,36 @@ static int _set_softreset(struct omap_hwmod *oh, u32 *v)
426426
return 0;
427427
}
428428

429+
/**
430+
* _clear_softreset: clear OCP_SYSCONFIG.SOFTRESET bit in @v
431+
* @oh: struct omap_hwmod *
432+
* @v: pointer to register contents to modify
433+
*
434+
* Clear the SOFTRESET bit in @v for hwmod @oh. Returns -EINVAL upon
435+
* error or 0 upon success.
436+
*/
437+
static int _clear_softreset(struct omap_hwmod *oh, u32 *v)
438+
{
439+
u32 softrst_mask;
440+
441+
if (!oh->class->sysc ||
442+
!(oh->class->sysc->sysc_flags & SYSC_HAS_SOFTRESET))
443+
return -EINVAL;
444+
445+
if (!oh->class->sysc->sysc_fields) {
446+
WARN(1,
447+
"omap_hwmod: %s: sysc_fields absent for sysconfig class\n",
448+
oh->name);
449+
return -EINVAL;
450+
}
451+
452+
softrst_mask = (0x1 << oh->class->sysc->sysc_fields->srst_shift);
453+
454+
*v &= ~softrst_mask;
455+
456+
return 0;
457+
}
458+
429459
/**
430460
* _wait_softreset_complete - wait for an OCP softreset to complete
431461
* @oh: struct omap_hwmod * to wait on
@@ -1909,6 +1939,12 @@ static int _ocp_softreset(struct omap_hwmod *oh)
19091939
ret = _set_softreset(oh, &v);
19101940
if (ret)
19111941
goto dis_opt_clks;
1942+
1943+
_write_sysconfig(v, oh);
1944+
ret = _clear_softreset(oh, &v);
1945+
if (ret)
1946+
goto dis_opt_clks;
1947+
19121948
_write_sysconfig(v, oh);
19131949

19141950
if (oh->class->sysc->srst_udelay)
@@ -3148,6 +3184,11 @@ int omap_hwmod_softreset(struct omap_hwmod *oh)
31483184
goto error;
31493185
_write_sysconfig(v, oh);
31503186

3187+
ret = _clear_softreset(oh, &v);
3188+
if (ret)
3189+
goto error;
3190+
_write_sysconfig(v, oh);
3191+
31513192
error:
31523193
return ret;
31533194
}

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

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,7 +1930,8 @@ static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
19301930
.syss_offs = 0x0014,
19311931
.sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
19321932
SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1933-
SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1933+
SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1934+
SYSS_HAS_RESET_STATUS),
19341935
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
19351936
MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
19361937
.sysc_fields = &omap_hwmod_sysc_type1,
@@ -2008,15 +2009,7 @@ static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
20082009
* hence HWMOD_SWSUP_MSTANDBY
20092010
*/
20102011

2011-
/*
2012-
* During system boot; If the hwmod framework resets the module
2013-
* the module will have smart idle settings; which can lead to deadlock
2014-
* (above Errata Id:i660); so, dont reset the module during boot;
2015-
* Use HWMOD_INIT_NO_RESET.
2016-
*/
2017-
2018-
.flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
2019-
HWMOD_INIT_NO_RESET,
2012+
.flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
20202013
};
20212014

20222015
/*

‎arch/arm/mach-pxa/reset.c‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#include <mach/regs-ost.h>
1515
#include <mach/reset.h>
16+
#include <mach/smemc.h>
1617

1718
unsigned int reset_status;
1819
EXPORT_SYMBOL(reset_status);
@@ -81,6 +82,12 @@ static void do_hw_reset(void)
8182
writel_relaxed(OSSR_M3, OSSR);
8283
/* ... in 100 ms */
8384
writel_relaxed(readl_relaxed(OSCR) + 368640, OSMR3);
85+
/*
86+
* SDRAM hangs on watchdog reset on Marvell PXA270 (erratum 71)
87+
* we put SDRAM into self-refresh to prevent that
88+
*/
89+
while (1)
90+
writel_relaxed(MDREFR_SLFRSH, MDREFR);
8491
}
8592

8693
void pxa_restart(char mode, const char *cmd)
@@ -104,4 +111,3 @@ void pxa_restart(char mode, const char *cmd)
104111
break;
105112
}
106113
}
107-

‎arch/arm/mach-pxa/tosa.c‎

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -424,57 +424,57 @@ static struct platform_device tosa_power_device = {
424424
* Tosa Keyboard
425425
*/
426426
static const uint32_t tosakbd_keymap[] = {
427-
KEY(0, 2, KEY_W),
428-
KEY(0, 6, KEY_K),
429-
KEY(0, 7, KEY_BACKSPACE),
430-
KEY(0, 8, KEY_P),
431-
KEY(1, 1, KEY_Q),
432-
KEY(1, 2, KEY_E),
433-
KEY(1, 3, KEY_T),
434-
KEY(1, 4, KEY_Y),
435-
KEY(1, 6, KEY_O),
436-
KEY(1, 7, KEY_I),
437-
KEY(1, 8, KEY_COMMA),
438-
KEY(2, 1, KEY_A),
439-
KEY(2, 2, KEY_D),
440-
KEY(2, 3, KEY_G),
441-
KEY(2, 4, KEY_U),
442-
KEY(2, 6, KEY_L),
443-
KEY(2, 7, KEY_ENTER),
444-
KEY(2, 8, KEY_DOT),
445-
KEY(3, 1, KEY_Z),
446-
KEY(3, 2, KEY_C),
447-
KEY(3, 3, KEY_V),
448-
KEY(3, 4, KEY_J),
449-
KEY(3, 5, TOSA_KEY_ADDRESSBOOK),
450-
KEY(3, 6, TOSA_KEY_CANCEL),
451-
KEY(3, 7, TOSA_KEY_CENTER),
452-
KEY(3, 8, TOSA_KEY_OK),
453-
KEY(3, 9, KEY_LEFTSHIFT),
454-
KEY(4, 1, KEY_S),
455-
KEY(4, 2, KEY_R),
456-
KEY(4, 3, KEY_B),
457-
KEY(4, 4, KEY_N),
458-
KEY(4, 5, TOSA_KEY_CALENDAR),
459-
KEY(4, 6, TOSA_KEY_HOMEPAGE),
460-
KEY(4, 7, KEY_LEFTCTRL),
461-
KEY(4, 8, TOSA_KEY_LIGHT),
462-
KEY(4, 10, KEY_RIGHTSHIFT),
463-
KEY(5, 1, KEY_TAB),
464-
KEY(5, 2, KEY_SLASH),
465-
KEY(5, 3, KEY_H),
466-
KEY(5, 4, KEY_M),
467-
KEY(5, 5, TOSA_KEY_MENU),
468-
KEY(5, 7, KEY_UP),
469-
KEY(5, 11, TOSA_KEY_FN),
470-
KEY(6, 1, KEY_X),
471-
KEY(6, 2, KEY_F),
472-
KEY(6, 3, KEY_SPACE),
473-
KEY(6, 4, KEY_APOSTROPHE),
474-
KEY(6, 5, TOSA_KEY_MAIL),
475-
KEY(6, 6, KEY_LEFT),
476-
KEY(6, 7, KEY_DOWN),
477-
KEY(6, 8, KEY_RIGHT),
427+
KEY(0, 1, KEY_W),
428+
KEY(0, 5, KEY_K),
429+
KEY(0, 6, KEY_BACKSPACE),
430+
KEY(0, 7, KEY_P),
431+
KEY(1, 0, KEY_Q),
432+
KEY(1, 1, KEY_E),
433+
KEY(1, 2, KEY_T),
434+
KEY(1, 3, KEY_Y),
435+
KEY(1, 5, KEY_O),
436+
KEY(1, 6, KEY_I),
437+
KEY(1, 7, KEY_COMMA),
438+
KEY(2, 0, KEY_A),
439+
KEY(2, 1, KEY_D),
440+
KEY(2, 2, KEY_G),
441+
KEY(2, 3, KEY_U),
442+
KEY(2, 5, KEY_L),
443+
KEY(2, 6, KEY_ENTER),
444+
KEY(2, 7, KEY_DOT),
445+
KEY(3, 0, KEY_Z),
446+
KEY(3, 1, KEY_C),
447+
KEY(3, 2, KEY_V),
448+
KEY(3, 3, KEY_J),
449+
KEY(3, 4, TOSA_KEY_ADDRESSBOOK),
450+
KEY(3, 5, TOSA_KEY_CANCEL),
451+
KEY(3, 6, TOSA_KEY_CENTER),
452+
KEY(3, 7, TOSA_KEY_OK),
453+
KEY(3, 8, KEY_LEFTSHIFT),
454+
KEY(4, 0, KEY_S),
455+
KEY(4, 1, KEY_R),
456+
KEY(4, 2, KEY_B),
457+
KEY(4, 3, KEY_N),
458+
KEY(4, 4, TOSA_KEY_CALENDAR),
459+
KEY(4, 5, TOSA_KEY_HOMEPAGE),
460+
KEY(4, 6, KEY_LEFTCTRL),
461+
KEY(4, 7, TOSA_KEY_LIGHT),
462+
KEY(4, 9, KEY_RIGHTSHIFT),
463+
KEY(5, 0, KEY_TAB),
464+
KEY(5, 1, KEY_SLASH),
465+
KEY(5, 2, KEY_H),
466+
KEY(5, 3, KEY_M),
467+
KEY(5, 4, TOSA_KEY_MENU),
468+
KEY(5, 6, KEY_UP),
469+
KEY(5, 10, TOSA_KEY_FN),
470+
KEY(6, 0, KEY_X),
471+
KEY(6, 1, KEY_F),
472+
KEY(6, 2, KEY_SPACE),
473+
KEY(6, 3, KEY_APOSTROPHE),
474+
KEY(6, 4, TOSA_KEY_MAIL),
475+
KEY(6, 5, KEY_LEFT),
476+
KEY(6, 6, KEY_DOWN),
477+
KEY(6, 7, KEY_RIGHT),
478478
};
479479

480480
static struct matrix_keymap_data tosakbd_keymap_data = {

‎arch/mips/mm/dma-default.c‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,20 @@ static inline struct page *dma_addr_to_page(struct device *dev,
5050
}
5151

5252
/*
53+
* The affected CPUs below in 'cpu_needs_post_dma_flush()' can
54+
* speculatively fill random cachelines with stale data at any time,
55+
* requiring an extra flush post-DMA.
56+
*
5357
* Warning on the terminology - Linux calls an uncached area coherent;
5458
* MIPS terminology calls memory areas with hardware maintained coherency
5559
* coherent.
5660
*/
57-
58-
static inline int cpu_is_noncoherent_r10000(struct device *dev)
61+
static inline int cpu_needs_post_dma_flush(struct device *dev)
5962
{
6063
return !plat_device_is_coherent(dev) &&
6164
(current_cpu_type() == CPU_R10000 ||
62-
current_cpu_type() == CPU_R12000);
65+
current_cpu_type() == CPU_R12000 ||
66+
current_cpu_type() == CPU_BMIPS5000);
6367
}
6468

6569
static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp)
@@ -230,7 +234,7 @@ static inline void __dma_sync(struct page *page,
230234
static void mips_dma_unmap_page(struct device *dev, dma_addr_t dma_addr,
231235
size_t size, enum dma_data_direction direction, struct dma_attrs *attrs)
232236
{
233-
if (cpu_is_noncoherent_r10000(dev))
237+
if (cpu_needs_post_dma_flush(dev))
234238
__dma_sync(dma_addr_to_page(dev, dma_addr),
235239
dma_addr & ~PAGE_MASK, size, direction);
236240

@@ -281,7 +285,7 @@ static void mips_dma_unmap_sg(struct device *dev, struct scatterlist *sg,
281285
static void mips_dma_sync_single_for_cpu(struct device *dev,
282286
dma_addr_t dma_handle, size_t size, enum dma_data_direction direction)
283287
{
284-
if (cpu_is_noncoherent_r10000(dev))
288+
if (cpu_needs_post_dma_flush(dev))
285289
__dma_sync(dma_addr_to_page(dev, dma_handle),
286290
dma_handle & ~PAGE_MASK, size, direction);
287291
}
@@ -302,7 +306,7 @@ static void mips_dma_sync_sg_for_cpu(struct device *dev,
302306

303307
/* Make sure that gcc doesn't leave the empty loop body. */
304308
for (i = 0; i < nelems; i++, sg++) {
305-
if (cpu_is_noncoherent_r10000(dev))
309+
if (cpu_needs_post_dma_flush(dev))
306310
__dma_sync(sg_page(sg), sg->offset, sg->length,
307311
direction);
308312
}

‎arch/powerpc/include/asm/pgalloc-32.h‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,8 @@ static inline void pgtable_free_tlb(struct mmu_gather *tlb,
8484
static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table,
8585
unsigned long address)
8686
{
87-
struct page *page = page_address(table);
88-
8987
tlb_flush_pgtable(tlb, address);
90-
pgtable_page_dtor(page);
91-
pgtable_free_tlb(tlb, page, 0);
88+
pgtable_page_dtor(table);
89+
pgtable_free_tlb(tlb, page_address(table), 0);
9290
}
9391
#endif /* _ASM_POWERPC_PGALLOC_32_H */

‎arch/powerpc/include/asm/pgalloc-64.h‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,9 @@ static inline void pgtable_free_tlb(struct mmu_gather *tlb,
144144
static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table,
145145
unsigned long address)
146146
{
147-
struct page *page = page_address(table);
148-
149147
tlb_flush_pgtable(tlb, address);
150-
pgtable_page_dtor(page);
151-
pgtable_free_tlb(tlb, page, 0);
148+
pgtable_page_dtor(table);
149+
pgtable_free_tlb(tlb, page_address(table), 0);
152150
}
153151

154152
#else /* if CONFIG_PPC_64K_PAGES */

0 commit comments

Comments
 (0)