Skip to content

Commit 9de44aa

Browse files
author
Russell King
committed
Merge branches 'arnd-fixes', 'clk', 'misc', 'v7' and 'fixes' into for-next
5 parents 6fb18ac + 079ed36 + ec3bd0e + c76f238 + 0bbe6b5 commit 9de44aa

74 files changed

Lines changed: 1102 additions & 531 deletions

Some content is hidden

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

‎Documentation/devicetree/bindings/arm/l2cc.txt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ Optional properties:
6767
disable if zero.
6868
- arm,prefetch-offset : Override prefetch offset value. Valid values are
6969
0-7, 15, 23, and 31.
70+
- prefetch-data : Data prefetch. Value: <0> (forcibly disable), <1>
71+
(forcibly enable), property absent (retain settings set by firmware)
72+
- prefetch-instr : Instruction prefetch. Value: <0> (forcibly disable),
73+
<1> (forcibly enable), property absent (retain settings set by
74+
firmware)
7075

7176
Example:
7277

‎Documentation/devicetree/booting-without-of.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,10 @@ address which can extend beyond that limit.
856856
name may clash with standard defined ones, you prefix them with your
857857
vendor name and a comma.
858858

859+
Additional properties for the root node:
860+
861+
- serial-number : a string representing the device's serial number
862+
859863
b) The /cpus node
860864

861865
This node is the parent of all individual CPU nodes. It doesn't

‎arch/arm/Kconfig‎

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ config ARM
6060
select HAVE_KPROBES if !XIP_KERNEL && !CPU_ENDIAN_BE32 && !CPU_V7M
6161
select HAVE_KRETPROBES if (HAVE_KPROBES)
6262
select HAVE_MEMBLOCK
63-
select HAVE_MOD_ARCH_SPECIFIC if ARM_UNWIND
63+
select HAVE_MOD_ARCH_SPECIFIC
6464
select HAVE_OPROFILE if (HAVE_PERF_EVENTS)
6565
select HAVE_OPTPROBES if !THUMB2_KERNEL
6666
select HAVE_PERF_EVENTS
@@ -975,11 +975,6 @@ config PLAT_PXA
975975
config PLAT_VERSATILE
976976
bool
977977

978-
config ARM_TIMER_SP804
979-
bool
980-
select CLKSRC_MMIO
981-
select CLKSRC_OF if OF
982-
983978
source "arch/arm/firmware/Kconfig"
984979

985980
source arch/arm/mm/Kconfig
@@ -1682,6 +1677,21 @@ config HAVE_ARCH_TRANSPARENT_HUGEPAGE
16821677
config ARCH_WANT_GENERAL_HUGETLB
16831678
def_bool y
16841679

1680+
config ARM_MODULE_PLTS
1681+
bool "Use PLTs to allow module memory to spill over into vmalloc area"
1682+
depends on MODULES
1683+
help
1684+
Allocate PLTs when loading modules so that jumps and calls whose
1685+
targets are too far away for their relative offsets to be encoded
1686+
in the instructions themselves can be bounced via veneers in the
1687+
module's PLT. This allows modules to be allocated in the generic
1688+
vmalloc area after the dedicated module memory area has been
1689+
exhausted. The modules will use slightly more memory, but after
1690+
rounding up to page size, the actual memory footprint is usually
1691+
the same.
1692+
1693+
Say y if you are getting out of memory errors while loading modules
1694+
16851695
source "mm/Kconfig"
16861696

16871697
config FORCE_MAX_ZONEORDER

‎arch/arm/Makefile‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ LDFLAGS_vmlinux += --be8
1919
LDFLAGS_MODULE += --be8
2020
endif
2121

22+
ifeq ($(CONFIG_ARM_MODULE_PLTS),y)
23+
LDFLAGS_MODULE += -T $(srctree)/arch/arm/kernel/module.lds
24+
endif
25+
2226
OBJCOPYFLAGS :=-O binary -R .comment -S
2327
GZFLAGS :=-9
2428
#KBUILD_CFLAGS +=-pipe

‎arch/arm/common/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ obj-$(CONFIG_SHARP_LOCOMO) += locomo.o
1111
obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o
1212
obj-$(CONFIG_SHARP_SCOOP) += scoop.o
1313
obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o
14-
obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o
1514
obj-$(CONFIG_MCPM) += mcpm_head.o mcpm_entry.o mcpm_platsmp.o vlock.o
1615
CFLAGS_REMOVE_mcpm_entry.o = -pg
1716
AFLAGS_mcpm_head.o := -march=armv7-a

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

Lines changed: 38 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
9494
break;
9595
#endif
9696
default:
97+
/* Cause a link-time error, the xchg() size is not supported */
9798
__bad_xchg(ptr, size), ret = 0;
9899
break;
99100
}
@@ -102,8 +103,10 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
102103
return ret;
103104
}
104105

105-
#define xchg(ptr,x) \
106-
((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
106+
#define xchg(ptr, x) ({ \
107+
(__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), \
108+
sizeof(*(ptr))); \
109+
})
107110

108111
#include <asm-generic/cmpxchg-local.h>
109112

@@ -118,14 +121,16 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
118121
* cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
119122
* them available.
120123
*/
121-
#define cmpxchg_local(ptr, o, n) \
122-
((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
123-
(unsigned long)(n), sizeof(*(ptr))))
124+
#define cmpxchg_local(ptr, o, n) ({ \
125+
(__typeof(*ptr))__cmpxchg_local_generic((ptr), \
126+
(unsigned long)(o), \
127+
(unsigned long)(n), \
128+
sizeof(*(ptr))); \
129+
})
130+
124131
#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
125132

126-
#ifndef CONFIG_SMP
127133
#include <asm-generic/cmpxchg.h>
128-
#endif
129134

130135
#else /* min ARCH >= ARMv6 */
131136

@@ -201,11 +206,12 @@ static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
201206
return ret;
202207
}
203208

204-
#define cmpxchg(ptr,o,n) \
205-
((__typeof__(*(ptr)))__cmpxchg_mb((ptr), \
206-
(unsigned long)(o), \
207-
(unsigned long)(n), \
208-
sizeof(*(ptr))))
209+
#define cmpxchg(ptr,o,n) ({ \
210+
(__typeof__(*(ptr)))__cmpxchg_mb((ptr), \
211+
(unsigned long)(o), \
212+
(unsigned long)(n), \
213+
sizeof(*(ptr))); \
214+
})
209215

210216
static inline unsigned long __cmpxchg_local(volatile void *ptr,
211217
unsigned long old,
@@ -227,6 +233,13 @@ static inline unsigned long __cmpxchg_local(volatile void *ptr,
227233
return ret;
228234
}
229235

236+
#define cmpxchg_local(ptr, o, n) ({ \
237+
(__typeof(*ptr))__cmpxchg_local((ptr), \
238+
(unsigned long)(o), \
239+
(unsigned long)(n), \
240+
sizeof(*(ptr))); \
241+
})
242+
230243
static inline unsigned long long __cmpxchg64(unsigned long long *ptr,
231244
unsigned long long old,
232245
unsigned long long new)
@@ -252,6 +265,14 @@ static inline unsigned long long __cmpxchg64(unsigned long long *ptr,
252265
return oldval;
253266
}
254267

268+
#define cmpxchg64_relaxed(ptr, o, n) ({ \
269+
(__typeof__(*(ptr)))__cmpxchg64((ptr), \
270+
(unsigned long long)(o), \
271+
(unsigned long long)(n)); \
272+
})
273+
274+
#define cmpxchg64_local(ptr, o, n) cmpxchg64_relaxed((ptr), (o), (n))
275+
255276
static inline unsigned long long __cmpxchg64_mb(unsigned long long *ptr,
256277
unsigned long long old,
257278
unsigned long long new)
@@ -265,23 +286,11 @@ static inline unsigned long long __cmpxchg64_mb(unsigned long long *ptr,
265286
return ret;
266287
}
267288

268-
#define cmpxchg_local(ptr,o,n) \
269-
((__typeof__(*(ptr)))__cmpxchg_local((ptr), \
270-
(unsigned long)(o), \
271-
(unsigned long)(n), \
272-
sizeof(*(ptr))))
273-
274-
#define cmpxchg64(ptr, o, n) \
275-
((__typeof__(*(ptr)))__cmpxchg64_mb((ptr), \
276-
(unsigned long long)(o), \
277-
(unsigned long long)(n)))
278-
279-
#define cmpxchg64_relaxed(ptr, o, n) \
280-
((__typeof__(*(ptr)))__cmpxchg64((ptr), \
281-
(unsigned long long)(o), \
282-
(unsigned long long)(n)))
283-
284-
#define cmpxchg64_local(ptr, o, n) cmpxchg64_relaxed((ptr), (o), (n))
289+
#define cmpxchg64(ptr, o, n) ({ \
290+
(__typeof__(*(ptr)))__cmpxchg64_mb((ptr), \
291+
(unsigned long long)(o), \
292+
(unsigned long long)(n)); \
293+
})
285294

286295
#endif /* __LINUX_ARM_ARCH__ >= 6 */
287296

‎arch/arm/include/asm/dma-iommu.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct dma_iommu_mapping {
2525
};
2626

2727
struct dma_iommu_mapping *
28-
arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, size_t size);
28+
arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, u64 size);
2929

3030
void arm_iommu_release_mapping(struct dma_iommu_mapping *mapping);
3131

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

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#ifdef __KERNEL__
2525

26+
#include <linux/string.h>
2627
#include <linux/types.h>
2728
#include <linux/blk_types.h>
2829
#include <asm/byteorder.h>
@@ -73,17 +74,16 @@ void __raw_readsl(const volatile void __iomem *addr, void *data, int longlen);
7374
static inline void __raw_writew(u16 val, volatile void __iomem *addr)
7475
{
7576
asm volatile("strh %1, %0"
76-
: "+Q" (*(volatile u16 __force *)addr)
77-
: "r" (val));
77+
: : "Q" (*(volatile u16 __force *)addr), "r" (val));
7878
}
7979

8080
#define __raw_readw __raw_readw
8181
static inline u16 __raw_readw(const volatile void __iomem *addr)
8282
{
8383
u16 val;
84-
asm volatile("ldrh %1, %0"
85-
: "+Q" (*(volatile u16 __force *)addr),
86-
"=r" (val));
84+
asm volatile("ldrh %0, %1"
85+
: "=r" (val)
86+
: "Q" (*(volatile u16 __force *)addr));
8787
return val;
8888
}
8989
#endif
@@ -92,35 +92,33 @@ static inline u16 __raw_readw(const volatile void __iomem *addr)
9292
static inline void __raw_writeb(u8 val, volatile void __iomem *addr)
9393
{
9494
asm volatile("strb %1, %0"
95-
: "+Qo" (*(volatile u8 __force *)addr)
96-
: "r" (val));
95+
: : "Qo" (*(volatile u8 __force *)addr), "r" (val));
9796
}
9897

9998
#define __raw_writel __raw_writel
10099
static inline void __raw_writel(u32 val, volatile void __iomem *addr)
101100
{
102101
asm volatile("str %1, %0"
103-
: "+Qo" (*(volatile u32 __force *)addr)
104-
: "r" (val));
102+
: : "Qo" (*(volatile u32 __force *)addr), "r" (val));
105103
}
106104

107105
#define __raw_readb __raw_readb
108106
static inline u8 __raw_readb(const volatile void __iomem *addr)
109107
{
110108
u8 val;
111-
asm volatile("ldrb %1, %0"
112-
: "+Qo" (*(volatile u8 __force *)addr),
113-
"=r" (val));
109+
asm volatile("ldrb %0, %1"
110+
: "=r" (val)
111+
: "Qo" (*(volatile u8 __force *)addr));
114112
return val;
115113
}
116114

117115
#define __raw_readl __raw_readl
118116
static inline u32 __raw_readl(const volatile void __iomem *addr)
119117
{
120118
u32 val;
121-
asm volatile("ldr %1, %0"
122-
: "+Qo" (*(volatile u32 __force *)addr),
123-
"=r" (val));
119+
asm volatile("ldr %0, %1"
120+
: "=r" (val)
121+
: "Qo" (*(volatile u32 __force *)addr));
124122
return val;
125123
}
126124

@@ -319,9 +317,33 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
319317
#define writesw(p,d,l) __raw_writesw(p,d,l)
320318
#define writesl(p,d,l) __raw_writesl(p,d,l)
321319

320+
#ifndef __ARMBE__
321+
static inline void memset_io(volatile void __iomem *dst, unsigned c,
322+
size_t count)
323+
{
324+
memset((void __force *)dst, c, count);
325+
}
326+
#define memset_io(dst,c,count) memset_io(dst,c,count)
327+
328+
static inline void memcpy_fromio(void *to, const volatile void __iomem *from,
329+
size_t count)
330+
{
331+
memcpy(to, (const void __force *)from, count);
332+
}
333+
#define memcpy_fromio(to,from,count) memcpy_fromio(to,from,count)
334+
335+
static inline void memcpy_toio(volatile void __iomem *to, const void *from,
336+
size_t count)
337+
{
338+
memcpy((void __force *)to, from, count);
339+
}
340+
#define memcpy_toio(to,from,count) memcpy_toio(to,from,count)
341+
342+
#else
322343
#define memset_io(c,v,l) _memset_io(c,(v),(l))
323344
#define memcpy_fromio(a,c,l) _memcpy_fromio((a),c,(l))
324345
#define memcpy_toio(c,a,l) _memcpy_toio(c,(a),(l))
346+
#endif
325347

326348
#endif /* readl */
327349

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ struct machine_desc {
5151
bool (*smp_init)(void);
5252
void (*fixup)(struct tag *, char **);
5353
void (*dt_fixup)(void);
54-
void (*init_meminfo)(void);
54+
long long (*pv_fixup)(void);
5555
void (*reserve)(void);/* reserve mem blocks */
5656
void (*map_io)(void);/* IO mapping function */
5757
void (*init_early)(void);

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#include <linux/types.h>
1919
#include <linux/sizes.h>
2020

21-
#include <asm/cache.h>
22-
2321
#ifdef CONFIG_NEED_MACH_MEMORY_H
2422
#include <mach/memory.h>
2523
#endif
@@ -132,20 +130,6 @@
132130
#define page_to_phys(page) (__pfn_to_phys(page_to_pfn(page)))
133131
#define phys_to_page(phys) (pfn_to_page(__phys_to_pfn(phys)))
134132

135-
/*
136-
* Minimum guaranted alignment in pgd_alloc(). The page table pointers passed
137-
* around in head.S and proc-*.S are shifted by this amount, in order to
138-
* leave spare high bits for systems with physical address extension. This
139-
* does not fully accomodate the 40-bit addressing capability of ARM LPAE, but
140-
* gives us about 38-bits or so.
141-
*/
142-
#ifdef CONFIG_ARM_LPAE
143-
#define ARCH_PGD_SHIFT L1_CACHE_SHIFT
144-
#else
145-
#define ARCH_PGD_SHIFT 0
146-
#endif
147-
#define ARCH_PGD_MASK ((1 << ARCH_PGD_SHIFT) - 1)
148-
149133
/*
150134
* PLAT_PHYS_OFFSET is the offset (from zero) of the start of physical
151135
* memory. This is used for XIP and NoMMU kernels, and on platforms that don't

0 commit comments

Comments
 (0)