Skip to content

Commit 4157368

Browse files
committed
Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
Pull arch/tile bug fixes from Chris Metcalf: "This includes Paul Gortmaker's change to fix the <asm/system.h> disintegration issues on tile, a fix to unbreak the tilepro ethernet driver, and a backlog of bugfix-only changes from internal Tilera development over the last few months. They have all been to LKML and on linux-next for the last few days. The EDAC change to MAINTAINERS is an oddity but discussion on the linux-edac list suggested I ask you to pull that change through my tree since they don't have a tree to pull edac changes from at the moment." * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: (39 commits) drivers/net/ethernet/tile: fix netdev_alloc_skb() bombing MAINTAINERS: update EDAC information tilepro ethernet driver: fix a few minor issues tile-srom.c driver: minor code cleanup edac: say "TILEGx" not "TILEPro" for the tilegx edac driver arch/tile: avoid accidentally unmasking NMI-type interrupt accidentally arch/tile: remove bogus performance optimization arch/tile: return SIGBUS for addresses that are unaligned AND invalid arch/tile: fix finv_buffer_remote() for tilegx arch/tile: use atomic exchange in arch_write_unlock() arch/tile: stop mentioning the "kvm" subdirectory arch/tile: export the page_home() function. arch/tile: fix pointer cast in cacheflush.c arch/tile: fix single-stepping over swint1 instructions on tilegx arch/tile: implement panic_smp_self_stop() arch/tile: add "nop" after "nap" to help GX idle power draw arch/tile: use proper memparse() for "maxmem" options arch/tile: fix up locking in pgtable.c slightly arch/tile: don't leak kernel memory when we unload modules arch/tile: fix bug in delay_backoff() ...
2 parents 9479f0f + 00a62d4 commit 4157368

33 files changed

+501
-300
lines changed

MAINTAINERS

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,53 +2450,53 @@ F: fs/ecryptfs/
24502450

24512451
EDAC-CORE
24522452
M: Doug Thompson <[email protected]>
2453-
L: [email protected] (moderated for non-subscribers)
2453+
24542454
W: bluesmoke.sourceforge.net
24552455
S: Supported
24562456
F: Documentation/edac.txt
2457-
F: drivers/edac/edac_*
2457+
F: drivers/edac/
24582458
F: include/linux/edac.h
24592459

24602460
EDAC-AMD64
24612461
M: Doug Thompson <[email protected]>
24622462
M: Borislav Petkov <[email protected]>
2463-
L: [email protected] (moderated for non-subscribers)
2463+
24642464
W: bluesmoke.sourceforge.net
24652465
S: Supported
24662466
F: drivers/edac/amd64_edac*
24672467

24682468
EDAC-E752X
24692469
M: Mark Gross <[email protected]>
24702470
M: Doug Thompson <[email protected]>
2471-
L: [email protected] (moderated for non-subscribers)
2471+
24722472
W: bluesmoke.sourceforge.net
24732473
S: Maintained
24742474
F: drivers/edac/e752x_edac.c
24752475

24762476
EDAC-E7XXX
24772477
M: Doug Thompson <[email protected]>
2478-
L: [email protected] (moderated for non-subscribers)
2478+
24792479
W: bluesmoke.sourceforge.net
24802480
S: Maintained
24812481
F: drivers/edac/e7xxx_edac.c
24822482

24832483
EDAC-I82443BXGX
24842484
M: Tim Small <[email protected]>
2485-
L: [email protected] (moderated for non-subscribers)
2485+
24862486
W: bluesmoke.sourceforge.net
24872487
S: Maintained
24882488
F: drivers/edac/i82443bxgx_edac.c
24892489

24902490
EDAC-I3000
24912491
M: Jason Uhlenkott <[email protected]>
2492-
L: [email protected] (moderated for non-subscribers)
2492+
24932493
W: bluesmoke.sourceforge.net
24942494
S: Maintained
24952495
F: drivers/edac/i3000_edac.c
24962496

24972497
EDAC-I5000
24982498
M: Doug Thompson <[email protected]>
2499-
L: [email protected] (moderated for non-subscribers)
2499+
25002500
W: bluesmoke.sourceforge.net
25012501
S: Maintained
25022502
F: drivers/edac/i5000_edac.c
@@ -2525,21 +2525,21 @@ F: drivers/edac/i7core_edac.c
25252525
EDAC-I82975X
25262526
M: Ranganathan Desikan <[email protected]>
25272527
M: "Arvind R." <[email protected]>
2528-
L: [email protected] (moderated for non-subscribers)
2528+
25292529
W: bluesmoke.sourceforge.net
25302530
S: Maintained
25312531
F: drivers/edac/i82975x_edac.c
25322532

25332533
EDAC-PASEMI
25342534
M: Egor Martovetsky <[email protected]>
2535-
L: [email protected] (moderated for non-subscribers)
2535+
25362536
W: bluesmoke.sourceforge.net
25372537
S: Maintained
25382538
F: drivers/edac/pasemi_edac.c
25392539

25402540
EDAC-R82600
25412541
M: Tim Small <[email protected]>
2542-
L: [email protected] (moderated for non-subscribers)
2542+
25432543
W: bluesmoke.sourceforge.net
25442544
S: Maintained
25452545
F: drivers/edac/r82600_edac.c

arch/tile/Kconfig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ config TILE
1212
select GENERIC_PENDING_IRQ if SMP
1313
select GENERIC_IRQ_SHOW
1414
select SYS_HYPERVISOR
15-
select ARCH_HAVE_NMI_SAFE_CMPXCHG if !M386
15+
select ARCH_HAVE_NMI_SAFE_CMPXCHG
1616

1717
# FIXME: investigate whether we need/want these options.
1818
# select HAVE_IOREMAP_PROT
@@ -69,6 +69,9 @@ config ARCH_PHYS_ADDR_T_64BIT
6969
config ARCH_DMA_ADDR_T_64BIT
7070
def_bool y
7171

72+
config NEED_DMA_MAP_STATE
73+
def_bool y
74+
7275
config LOCKDEP_SUPPORT
7376
def_bool y
7477

@@ -118,7 +121,7 @@ config 64BIT
118121

119122
config ARCH_DEFCONFIG
120123
string
121-
default "arch/tile/configs/tile_defconfig" if !TILEGX
124+
default "arch/tile/configs/tilepro_defconfig" if !TILEGX
122125
default "arch/tile/configs/tilegx_defconfig" if TILEGX
123126

124127
source "init/Kconfig"
@@ -240,6 +243,7 @@ endchoice
240243

241244
config PAGE_OFFSET
242245
hex
246+
depends on !64BIT
243247
default 0xF0000000 if VMSPLIT_3_75G
244248
default 0xE0000000 if VMSPLIT_3_5G
245249
default 0xB0000000 if VMSPLIT_2_75G

arch/tile/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ ifneq ($(CONFIG_DEBUG_EXTRA_FLAGS),"")
3030
KBUILD_CFLAGS += $(CONFIG_DEBUG_EXTRA_FLAGS)
3131
endif
3232

33-
LIBGCC_PATH := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
33+
LIBGCC_PATH := \
34+
$(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name)
3435

3536
# Provide the path to use for "make defconfig".
3637
KBUILD_DEFCONFIG := $(ARCH)_defconfig
@@ -53,8 +54,6 @@ libs-y += $(LIBGCC_PATH)
5354
# See arch/tile/Kbuild for content of core part of the kernel
5455
core-y += arch/tile/
5556

56-
core-$(CONFIG_KVM) += arch/tile/kvm/
57-
5857
ifdef TILERA_ROOT
5958
INSTALL_PATH ?= $(TILERA_ROOT)/tile/boot
6059
endif

arch/tile/include/arch/spr_def.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
_concat4(SPR_IPI_EVENT_, CONFIG_KERNEL_PL,,)
6161
#define SPR_IPI_EVENT_RESET_K \
6262
_concat4(SPR_IPI_EVENT_RESET_, CONFIG_KERNEL_PL,,)
63-
#define SPR_IPI_MASK_SET_K \
64-
_concat4(SPR_IPI_MASK_SET_, CONFIG_KERNEL_PL,,)
63+
#define SPR_IPI_EVENT_SET_K \
64+
_concat4(SPR_IPI_EVENT_SET_, CONFIG_KERNEL_PL,,)
6565
#define INT_IPI_K \
6666
_concat4(INT_IPI_, CONFIG_KERNEL_PL,,)
6767

arch/tile/include/asm/atomic.h

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#ifndef _ASM_TILE_ATOMIC_H
1818
#define _ASM_TILE_ATOMIC_H
1919

20+
#include <asm/cmpxchg.h>
21+
2022
#ifndef __ASSEMBLY__
2123

2224
#include <linux/compiler.h>
@@ -121,54 +123,6 @@ static inline int atomic_read(const atomic_t *v)
121123
*/
122124
#define atomic_add_negative(i, v) (atomic_add_return((i), (v)) < 0)
123125

124-
/* Nonexistent functions intended to cause link errors. */
125-
extern unsigned long __xchg_called_with_bad_pointer(void);
126-
extern unsigned long __cmpxchg_called_with_bad_pointer(void);
127-
128-
#define xchg(ptr, x) \
129-
({ \
130-
typeof(*(ptr)) __x; \
131-
switch (sizeof(*(ptr))) { \
132-
case 4: \
133-
__x = (typeof(__x))(typeof(__x-__x))atomic_xchg( \
134-
(atomic_t *)(ptr), \
135-
(u32)(typeof((x)-(x)))(x)); \
136-
break; \
137-
case 8: \
138-
__x = (typeof(__x))(typeof(__x-__x))atomic64_xchg( \
139-
(atomic64_t *)(ptr), \
140-
(u64)(typeof((x)-(x)))(x)); \
141-
break; \
142-
default: \
143-
__xchg_called_with_bad_pointer(); \
144-
} \
145-
__x; \
146-
})
147-
148-
#define cmpxchg(ptr, o, n) \
149-
({ \
150-
typeof(*(ptr)) __x; \
151-
switch (sizeof(*(ptr))) { \
152-
case 4: \
153-
__x = (typeof(__x))(typeof(__x-__x))atomic_cmpxchg( \
154-
(atomic_t *)(ptr), \
155-
(u32)(typeof((o)-(o)))(o), \
156-
(u32)(typeof((n)-(n)))(n)); \
157-
break; \
158-
case 8: \
159-
__x = (typeof(__x))(typeof(__x-__x))atomic64_cmpxchg( \
160-
(atomic64_t *)(ptr), \
161-
(u64)(typeof((o)-(o)))(o), \
162-
(u64)(typeof((n)-(n)))(n)); \
163-
break; \
164-
default: \
165-
__cmpxchg_called_with_bad_pointer(); \
166-
} \
167-
__x; \
168-
})
169-
170-
#define tas(ptr) (xchg((ptr), 1))
171-
172126
#endif /* __ASSEMBLY__ */
173127

174128
#ifndef __tilegx__

arch/tile/include/asm/atomic_32.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ static inline u64 atomic64_add_return(u64 i, atomic64_t *v)
200200
* @u: ...unless v is equal to u.
201201
*
202202
* Atomically adds @a to @v, so long as @v was not already @u.
203-
* Returns the old value of @v.
203+
* Returns non-zero if @v was not @u, and zero otherwise.
204204
*/
205205
static inline u64 atomic64_add_unless(atomic64_t *v, u64 a, u64 u)
206206
{

arch/tile/include/asm/bitops_64.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ static inline void clear_bit(unsigned nr, volatile unsigned long *addr)
3838

3939
static inline void change_bit(unsigned nr, volatile unsigned long *addr)
4040
{
41-
unsigned long old, mask = (1UL << (nr % BITS_PER_LONG));
42-
long guess, oldval;
41+
unsigned long mask = (1UL << (nr % BITS_PER_LONG));
42+
unsigned long guess, oldval;
4343
addr += nr / BITS_PER_LONG;
44-
old = *addr;
44+
oldval = *addr;
4545
do {
4646
guess = oldval;
4747
oldval = atomic64_cmpxchg((atomic64_t *)addr,
@@ -85,7 +85,7 @@ static inline int test_and_change_bit(unsigned nr,
8585
volatile unsigned long *addr)
8686
{
8787
unsigned long mask = (1UL << (nr % BITS_PER_LONG));
88-
long guess, oldval = *addr;
88+
unsigned long guess, oldval;
8989
addr += nr / BITS_PER_LONG;
9090
oldval = *addr;
9191
do {

arch/tile/include/asm/cmpxchg.h

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/*
2+
* cmpxchg.h -- forked from asm/atomic.h with this copyright:
3+
*
4+
* Copyright 2010 Tilera Corporation. All Rights Reserved.
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU General Public License
8+
* as published by the Free Software Foundation, version 2.
9+
*
10+
* This program is distributed in the hope that it will be useful, but
11+
* WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
13+
* NON INFRINGEMENT. See the GNU General Public License for
14+
* more details.
15+
*
16+
*/
17+
18+
#ifndef _ASM_TILE_CMPXCHG_H
19+
#define _ASM_TILE_CMPXCHG_H
20+
21+
#ifndef __ASSEMBLY__
22+
23+
/* Nonexistent functions intended to cause link errors. */
24+
extern unsigned long __xchg_called_with_bad_pointer(void);
25+
extern unsigned long __cmpxchg_called_with_bad_pointer(void);
26+
27+
#define xchg(ptr, x) \
28+
({ \
29+
typeof(*(ptr)) __x; \
30+
switch (sizeof(*(ptr))) { \
31+
case 4: \
32+
__x = (typeof(__x))(typeof(__x-__x))atomic_xchg( \
33+
(atomic_t *)(ptr), \
34+
(u32)(typeof((x)-(x)))(x)); \
35+
break; \
36+
case 8: \
37+
__x = (typeof(__x))(typeof(__x-__x))atomic64_xchg( \
38+
(atomic64_t *)(ptr), \
39+
(u64)(typeof((x)-(x)))(x)); \
40+
break; \
41+
default: \
42+
__xchg_called_with_bad_pointer(); \
43+
} \
44+
__x; \
45+
})
46+
47+
#define cmpxchg(ptr, o, n) \
48+
({ \
49+
typeof(*(ptr)) __x; \
50+
switch (sizeof(*(ptr))) { \
51+
case 4: \
52+
__x = (typeof(__x))(typeof(__x-__x))atomic_cmpxchg( \
53+
(atomic_t *)(ptr), \
54+
(u32)(typeof((o)-(o)))(o), \
55+
(u32)(typeof((n)-(n)))(n)); \
56+
break; \
57+
case 8: \
58+
__x = (typeof(__x))(typeof(__x-__x))atomic64_cmpxchg( \
59+
(atomic64_t *)(ptr), \
60+
(u64)(typeof((o)-(o)))(o), \
61+
(u64)(typeof((n)-(n)))(n)); \
62+
break; \
63+
default: \
64+
__cmpxchg_called_with_bad_pointer(); \
65+
} \
66+
__x; \
67+
})
68+
69+
#define tas(ptr) (xchg((ptr), 1))
70+
71+
#endif /* __ASSEMBLY__ */
72+
73+
#endif /* _ASM_TILE_CMPXCHG_H */

arch/tile/include/asm/irq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#define NR_IRQS 32
2222

2323
/* IRQ numbers used for linux IPIs. */
24-
#define IRQ_RESCHEDULE 1
24+
#define IRQ_RESCHEDULE 0
2525

2626
#define irq_canonicalize(irq) (irq)
2727

arch/tile/include/asm/spinlock_64.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ static inline void arch_read_unlock(arch_rwlock_t *rw)
137137
static inline void arch_write_unlock(arch_rwlock_t *rw)
138138
{
139139
__insn_mf();
140-
rw->lock = 0;
140+
__insn_exch4(&rw->lock, 0); /* Avoid waiting in the write buffer. */
141141
}
142142

143143
static inline int arch_read_trylock(arch_rwlock_t *rw)

arch/tile/include/asm/stack.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
struct KBacktraceIterator {
2626
BacktraceIterator it;
2727
struct task_struct *task; /* task we are backtracing */
28-
pte_t *pgtable; /* page table for user space access */
2928
int end; /* iteration complete. */
3029
int new_context; /* new context is starting */
3130
int profile; /* profiling, so stop on async intrpt */

arch/tile/include/asm/traps.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ void do_breakpoint(struct pt_regs *, int fault_num);
6464

6565

6666
#ifdef __tilegx__
67+
/* kernel/single_step.c */
6768
void gx_singlestep_handle(struct pt_regs *, int fault_num);
69+
70+
/* kernel/intvec_64.S */
71+
void fill_ra_stack(void);
6872
#endif
6973

70-
#endif /* _ASM_TILE_SYSCALLS_H */
74+
#endif /* _ASM_TILE_TRAPS_H */

arch/tile/kernel/entry.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ STD_ENTRY(cpu_idle_on_new_stack)
8585
/* Loop forever on a nap during SMP boot. */
8686
STD_ENTRY(smp_nap)
8787
nap
88+
nop /* avoid provoking the icache prefetch with a jump */
8889
j smp_nap /* we are not architecturally guaranteed not to exit nap */
8990
jrp lr /* clue in the backtracer */
9091
STD_ENDPROC(smp_nap)
@@ -105,5 +106,6 @@ STD_ENTRY(_cpu_idle)
105106
.global _cpu_idle_nap
106107
_cpu_idle_nap:
107108
nap
109+
nop /* avoid provoking the icache prefetch with a jump */
108110
jrp lr
109111
STD_ENDPROC(_cpu_idle)

0 commit comments

Comments
 (0)