Skip to content

Commit e818d5e

Browse files
committed
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King: "Another round of relatively small ARM fixes. Thomas spotted that the strex backoff delay bit was a disable bit, so it needed to be clear for this to work. Vladimir spotted that using a restart block for the cache flush operation would return -EINTR, which userspace was not expecting. Dmitry spotted that the auxiliary control register accesses for Xscale were not correct" * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: ARM: 8226/1: cacheflush: get rid of restarting block ARM: 8222/1: mvebu: enable strex backoff delay ARM: 8216/1: xscale: correct auxiliary register in suspend/resume
2 parents 98e8d2e + 3f4aa45 commit e818d5e

File tree

4 files changed

+4
-44
lines changed

4 files changed

+4
-44
lines changed

arch/arm/include/asm/thread_info.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,6 @@ struct cpu_context_save {
4444
__u32 extra[2]; /* Xscale 'acc' register, etc */
4545
};
4646

47-
struct arm_restart_block {
48-
union {
49-
/* For user cache flushing */
50-
struct {
51-
unsigned long start;
52-
unsigned long end;
53-
} cache;
54-
};
55-
};
56-
5747
/*
5848
* low level task data that entry.S needs immediate access to.
5949
* __switch_to() assumes cpu_context follows immediately after cpu_domain.
@@ -79,7 +69,6 @@ struct thread_info {
7969
unsigned long thumbee_state; /* ThumbEE Handler Base register */
8070
#endif
8171
struct restart_block restart_block;
82-
struct arm_restart_block arm_restart_block;
8372
};
8473

8574
#define INIT_THREAD_INFO(tsk) \

arch/arm/kernel/traps.c

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,6 @@ static int bad_syscall(int n, struct pt_regs *regs)
533533
return regs->ARM_r0;
534534
}
535535

536-
static long do_cache_op_restart(struct restart_block *);
537-
538536
static inline int
539537
__do_cache_op(unsigned long start, unsigned long end)
540538
{
@@ -543,24 +541,8 @@ __do_cache_op(unsigned long start, unsigned long end)
543541
do {
544542
unsigned long chunk = min(PAGE_SIZE, end - start);
545543

546-
if (signal_pending(current)) {
547-
struct thread_info *ti = current_thread_info();
548-
549-
ti->restart_block = (struct restart_block) {
550-
.fn = do_cache_op_restart,
551-
};
552-
553-
ti->arm_restart_block = (struct arm_restart_block) {
554-
{
555-
.cache = {
556-
.start = start,
557-
.end = end,
558-
},
559-
},
560-
};
561-
562-
return -ERESTART_RESTARTBLOCK;
563-
}
544+
if (fatal_signal_pending(current))
545+
return 0;
564546

565547
ret = flush_cache_user_range(start, start + chunk);
566548
if (ret)
@@ -573,15 +555,6 @@ __do_cache_op(unsigned long start, unsigned long end)
573555
return 0;
574556
}
575557

576-
static long do_cache_op_restart(struct restart_block *unused)
577-
{
578-
struct arm_restart_block *restart_block;
579-
580-
restart_block = &current_thread_info()->arm_restart_block;
581-
return __do_cache_op(restart_block->cache.start,
582-
restart_block->cache.end);
583-
}
584-
585558
static inline int
586559
do_cache_op(unsigned long start, unsigned long end, int flags)
587560
{

arch/arm/mm/proc-v7.S

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ __v7_pj4b_setup:
270270
/* Auxiliary Debug Modes Control 1 Register */
271271
#define PJ4B_STATIC_BP (1 << 2) /* Enable Static BP */
272272
#define PJ4B_INTER_PARITY (1 << 8) /* Disable Internal Parity Handling */
273-
#define PJ4B_BCK_OFF_STREX (1 << 5) /* Enable the back off of STREX instr */
274273
#define PJ4B_CLEAN_LINE (1 << 16) /* Disable data transfer for clean line */
275274

276275
/* Auxiliary Debug Modes Control 2 Register */
@@ -293,7 +292,6 @@ __v7_pj4b_setup:
293292
/* Auxiliary Debug Modes Control 1 Register */
294293
mrc p15, 1, r0, c15, c1, 1
295294
orr r0, r0, #PJ4B_CLEAN_LINE
296-
orr r0, r0, #PJ4B_BCK_OFF_STREX
297295
orr r0, r0, #PJ4B_INTER_PARITY
298296
bic r0, r0, #PJ4B_STATIC_BP
299297
mcr p15, 1, r0, c15, c1, 1

arch/arm/mm/proc-xscale.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ ENTRY(cpu_xscale_do_suspend)
535535
mrc p15, 0, r5, c15, c1, 0 @ CP access reg
536536
mrc p15, 0, r6, c13, c0, 0 @ PID
537537
mrc p15, 0, r7, c3, c0, 0 @ domain ID
538-
mrc p15, 0, r8, c1, c1, 0 @ auxiliary control reg
538+
mrc p15, 0, r8, c1, c0, 1 @ auxiliary control reg
539539
mrc p15, 0, r9, c1, c0, 0 @ control reg
540540
bic r4, r4, #2 @ clear frequency change bit
541541
stmia r0, {r4 - r9} @ store cp regs
@@ -552,7 +552,7 @@ ENTRY(cpu_xscale_do_resume)
552552
mcr p15, 0, r6, c13, c0, 0 @ PID
553553
mcr p15, 0, r7, c3, c0, 0 @ domain ID
554554
mcr p15, 0, r1, c2, c0, 0 @ translation table base addr
555-
mcr p15, 0, r8, c1, c1, 0 @ auxiliary control reg
555+
mcr p15, 0, r8, c1, c0, 1 @ auxiliary control reg
556556
mov r0, r9 @ control register
557557
b cpu_resume_mmu
558558
ENDPROC(cpu_xscale_do_resume)

0 commit comments

Comments
 (0)