Skip to content

Commit 1fdb24e

Browse files
committed
* 'devel-stable' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm: (178 commits) ARM: 7139/1: fix compilation with CONFIG_ARM_ATAG_DTB_COMPAT and large TEXT_OFFSET ARM: gic, local timers: use the request_percpu_irq() interface ARM: gic: consolidate PPI handling ARM: switch from NO_MACH_MEMORY_H to NEED_MACH_MEMORY_H ARM: mach-s5p64x0: remove mach/memory.h ARM: mach-s3c64xx: remove mach/memory.h ARM: plat-mxc: remove mach/memory.h ARM: mach-prima2: remove mach/memory.h ARM: mach-zynq: remove mach/memory.h ARM: mach-bcmring: remove mach/memory.h ARM: mach-davinci: remove mach/memory.h ARM: mach-pxa: remove mach/memory.h ARM: mach-ixp4xx: remove mach/memory.h ARM: mach-h720x: remove mach/memory.h ARM: mach-vt8500: remove mach/memory.h ARM: mach-s5pc100: remove mach/memory.h ARM: mach-tegra: remove mach/memory.h ARM: plat-tcc: remove mach/memory.h ARM: mach-mmp: remove mach/memory.h ARM: mach-cns3xxx: remove mach/memory.h ... Fix up mostly pretty trivial conflicts in: - arch/arm/Kconfig - arch/arm/include/asm/localtimer.h - arch/arm/kernel/Makefile - arch/arm/mach-shmobile/board-ap4evb.c - arch/arm/mach-u300/core.c - arch/arm/mm/dma-mapping.c - arch/arm/mm/proc-v7.S - arch/arm/plat-omap/Kconfig largely due to some CONFIG option renaming (ie CONFIG_PM_SLEEP -> CONFIG_ARM_CPU_SUSPEND for the arm-specific suspend code etc) and addition of NEED_MACH_MEMORY_H next to HAVE_IDE.
2 parents f362f98 + 531a6a9 commit 1fdb24e

524 files changed

Lines changed: 7566 additions & 2887 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.

‎arch/arm/Kconfig‎

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ config ARM
2929
select HAVE_GENERIC_HARDIRQS
3030
select HAVE_SPARSE_IRQ
3131
select GENERIC_IRQ_SHOW
32+
select CPU_PM if (SUSPEND || CPU_IDLE)
3233
help
3334
The ARM series is a line of low-power-consumption RISC chip designs
3435
licensed by ARM Ltd and targeted at embedded applications and
@@ -211,6 +212,19 @@ config ARM_PATCH_PHYS_VIRT
211212
this feature (eg, building a kernel for a single machine) and
212213
you need to shrink the kernel to the minimal size.
213214

215+
config NEED_MACH_MEMORY_H
216+
bool
217+
help
218+
Select this when mach/memory.h is required to provide special
219+
definitions for this platform. The need for mach/memory.h should
220+
be avoided when possible.
221+
222+
config PHYS_OFFSET
223+
hex "Physical address of main memory"
224+
depends on !ARM_PATCH_PHYS_VIRT && !NEED_MACH_MEMORY_H
225+
help
226+
Please provide the physical address corresponding to the
227+
location of main memory in your system.
214228

215229
config GENERIC_BUG
216230
def_bool y
@@ -247,6 +261,7 @@ config ARCH_INTEGRATOR
247261
select GENERIC_CLOCKEVENTS
248262
select PLAT_VERSATILE
249263
select PLAT_VERSATILE_FPGA_IRQ
264+
select NEED_MACH_MEMORY_H
250265
help
251266
Support for ARM's Integrator platform.
252267

@@ -262,6 +277,7 @@ config ARCH_REALVIEW
262277
select PLAT_VERSATILE_CLCD
263278
select ARM_TIMER_SP804
264279
select GPIO_PL061 if GPIOLIB
280+
select NEED_MACH_MEMORY_H
265281
help
266282
This enables support for ARM Ltd RealView boards.
267283

@@ -322,6 +338,7 @@ config ARCH_CLPS711X
322338
bool "Cirrus Logic CLPS711x/EP721x-based"
323339
select CPU_ARM720T
324340
select ARCH_USES_GETTIMEOFFSET
341+
select NEED_MACH_MEMORY_H
325342
help
326343
Support for Cirrus Logic 711x/721x based boards.
327344

@@ -361,6 +378,7 @@ config ARCH_EBSA110
361378
select ISA
362379
select NO_IOPORT
363380
select ARCH_USES_GETTIMEOFFSET
381+
select NEED_MACH_MEMORY_H
364382
help
365383
This is an evaluation board for the StrongARM processor available
366384
from Digital. It has limited hardware on-board, including an
@@ -376,6 +394,7 @@ config ARCH_EP93XX
376394
select ARCH_REQUIRE_GPIOLIB
377395
select ARCH_HAS_HOLES_MEMORYMODEL
378396
select ARCH_USES_GETTIMEOFFSET
397+
select NEED_MEMORY_H
379398
help
380399
This enables support for the Cirrus EP93xx series of CPUs.
381400

@@ -385,6 +404,7 @@ config ARCH_FOOTBRIDGE
385404
select FOOTBRIDGE
386405
select GENERIC_CLOCKEVENTS
387406
select HAVE_IDE
407+
select NEED_MACH_MEMORY_H
388408
help
389409
Support for systems based on the DC21285 companion chip
390410
("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.
@@ -434,6 +454,7 @@ config ARCH_IOP13XX
434454
select PCI
435455
select ARCH_SUPPORTS_MSI
436456
select VMSPLIT_1G
457+
select NEED_MACH_MEMORY_H
437458
help
438459
Support for Intel's IOP13XX (XScale) family of processors.
439460

@@ -464,6 +485,7 @@ config ARCH_IXP23XX
464485
select CPU_XSC3
465486
select PCI
466487
select ARCH_USES_GETTIMEOFFSET
488+
select NEED_MACH_MEMORY_H
467489
help
468490
Support for Intel's IXP23xx (XScale) family of processors.
469491

@@ -473,6 +495,7 @@ config ARCH_IXP2000
473495
select CPU_XSCALE
474496
select PCI
475497
select ARCH_USES_GETTIMEOFFSET
498+
select NEED_MACH_MEMORY_H
476499
help
477500
Support for Intel's IXP2400/2800 (XScale) family of processors.
478501

@@ -565,6 +588,7 @@ config ARCH_KS8695
565588
select CPU_ARM922T
566589
select ARCH_REQUIRE_GPIOLIB
567590
select ARCH_USES_GETTIMEOFFSET
591+
select NEED_MACH_MEMORY_H
568592
help
569593
Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based
570594
System-on-Chip devices.
@@ -657,6 +681,7 @@ config ARCH_SHMOBILE
657681
select SPARSE_IRQ
658682
select MULTI_IRQ_HANDLER
659683
select PM_GENERIC_DOMAINS if PM
684+
select NEED_MACH_MEMORY_H
660685
help
661686
Support for Renesas's SH-Mobile and R-Mobile ARM platforms.
662687

@@ -672,6 +697,7 @@ config ARCH_RPC
672697
select ARCH_SPARSEMEM_ENABLE
673698
select ARCH_USES_GETTIMEOFFSET
674699
select HAVE_IDE
700+
select NEED_MACH_MEMORY_H
675701
help
676702
On the Acorn Risc-PC, Linux can support the internal IDE disk and
677703
CD-ROM interface, serial and parallel port, and the floppy drive.
@@ -691,6 +717,7 @@ config ARCH_SA1100
691717
select TICK_ONESHOT
692718
select ARCH_REQUIRE_GPIOLIB
693719
select HAVE_IDE
720+
select NEED_MACH_MEMORY_H
694721
help
695722
Support for StrongARM 11x0 based boards.
696723

@@ -782,6 +809,7 @@ config ARCH_S5PV210
782809
select HAVE_S3C2410_I2C if I2C
783810
select HAVE_S3C_RTC if RTC_CLASS
784811
select HAVE_S3C2410_WATCHDOG if WATCHDOG
812+
select NEED_MACH_MEMORY_H
785813
help
786814
Samsung S5PV210/S5PC110 series based systems
787815

@@ -798,6 +826,7 @@ config ARCH_EXYNOS4
798826
select HAVE_S3C_RTC if RTC_CLASS
799827
select HAVE_S3C2410_I2C if I2C
800828
select HAVE_S3C2410_WATCHDOG if WATCHDOG
829+
select NEED_MACH_MEMORY_H
801830
help
802831
Samsung EXYNOS4 series based systems
803832

@@ -809,6 +838,7 @@ config ARCH_SHARK
809838
select ZONE_DMA
810839
select PCI
811840
select ARCH_USES_GETTIMEOFFSET
841+
select NEED_MACH_MEMORY_H
812842
help
813843
Support for the StrongARM based Digital DNARD machine, also known
814844
as "Shark" (<http://www.shark-linux.de/shark.html>).
@@ -837,6 +867,7 @@ config ARCH_U300
837867
select HAVE_MACH_CLKDEV
838868
select GENERIC_GPIO
839869
select ARCH_REQUIRE_GPIOLIB
870+
select NEED_MACH_MEMORY_H
840871
help
841872
Support for ST-Ericsson U300 series mobile platforms.
842873

@@ -1835,6 +1866,38 @@ config ZBOOT_ROM_SH_MOBILE_SDHI
18351866

18361867
endchoice
18371868

1869+
config ARM_APPENDED_DTB
1870+
bool "Use appended device tree blob to zImage (EXPERIMENTAL)"
1871+
depends on OF && !ZBOOT_ROM && EXPERIMENTAL
1872+
help
1873+
With this option, the boot code will look for a device tree binary
1874+
(DTB) appended to zImage
1875+
(e.g. cat zImage <filename>.dtb > zImage_w_dtb).
1876+
1877+
This is meant as a backward compatibility convenience for those
1878+
systems with a bootloader that can't be upgraded to accommodate
1879+
the documented boot protocol using a device tree.
1880+
1881+
Beware that there is very little in terms of protection against
1882+
this option being confused by leftover garbage in memory that might
1883+
look like a DTB header after a reboot if no actual DTB is appended
1884+
to zImage. Do not leave this option active in a production kernel
1885+
if you don't intend to always append a DTB. Proper passing of the
1886+
location into r2 of a bootloader provided DTB is always preferable
1887+
to this option.
1888+
1889+
config ARM_ATAG_DTB_COMPAT
1890+
bool "Supplement the appended DTB with traditional ATAG information"
1891+
depends on ARM_APPENDED_DTB
1892+
help
1893+
Some old bootloaders can't be updated to a DTB capable one, yet
1894+
they provide ATAGs with memory configuration, the ramdisk address,
1895+
the kernel cmdline string, etc. Such information is dynamically
1896+
provided by the bootloader and can't always be stored in a static
1897+
DTB. To allow a device tree enabled kernel to be used with such
1898+
bootloaders, this option allows zImage to extract the information
1899+
from the ATAG list and store it at run time into the appended DTB.
1900+
18381901
config CMDLINE
18391902
string "Default kernel command string"
18401903
default ""

‎arch/arm/Kconfig.debug‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,10 @@ config DEBUG_S3C_UART
158158
The uncompressor code port configuration is now handled
159159
by CONFIG_S3C_LOWLEVEL_UART_PORT.
160160

161+
config ARM_KPROBES_TEST
162+
tristate "Kprobes test module"
163+
depends on KPROBES && MODULES
164+
help
165+
Perform tests of kprobes API and instruction set simulation.
166+
161167
endmenu

‎arch/arm/boot/compressed/.gitignore‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,12 @@ piggy.lzo
55
piggy.lzma
66
vmlinux
77
vmlinux.lds
8+
9+
# borrowed libfdt files
10+
fdt.c
11+
fdt.h
12+
fdt_ro.c
13+
fdt_rw.c
14+
fdt_wip.c
15+
libfdt.h
16+
libfdt_internal.h

‎arch/arm/boot/compressed/Makefile‎

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ HEAD = head.o
2626
OBJS += misc.o decompress.o
2727
FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c
2828

29+
# string library code (-Os is enforced to keep it much smaller)
30+
OBJS += string.o
31+
CFLAGS_string.o := -Os
32+
2933
#
3034
# Architecture dependencies
3135
#
@@ -89,21 +93,41 @@ suffix_$(CONFIG_KERNEL_GZIP) = gzip
8993
suffix_$(CONFIG_KERNEL_LZO) = lzo
9094
suffix_$(CONFIG_KERNEL_LZMA) = lzma
9195

96+
# Borrowed libfdt files for the ATAG compatibility mode
97+
98+
libfdt := fdt_rw.c fdt_ro.c fdt_wip.c fdt.c
99+
libfdt_hdrs := fdt.h libfdt.h libfdt_internal.h
100+
101+
libfdt_objs := $(addsuffix .o, $(basename $(libfdt)))
102+
103+
$(addprefix $(obj)/,$(libfdt) $(libfdt_hdrs)): $(obj)/%: $(srctree)/scripts/dtc/libfdt/%
104+
$(call cmd,shipped)
105+
106+
$(addprefix $(obj)/,$(libfdt_objs) atags_to_fdt.o): \
107+
$(addprefix $(obj)/,$(libfdt_hdrs))
108+
109+
ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y)
110+
OBJS += $(libfdt_objs) atags_to_fdt.o
111+
endif
112+
92113
targets := vmlinux vmlinux.lds \
93114
piggy.$(suffix_y) piggy.$(suffix_y).o \
94-
font.o font.c head.o misc.o $(OBJS)
115+
lib1funcs.o lib1funcs.S font.o font.c head.o misc.o $(OBJS)
95116

96117
# Make sure files are removed during clean
97-
extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S
118+
extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S $(libfdt) $(libfdt_hdrs)
98119

99120
ifeq ($(CONFIG_FUNCTION_TRACER),y)
100121
ORIG_CFLAGS := $(KBUILD_CFLAGS)
101122
KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
102123
endif
103124

104-
ccflags-y := -fpic -fno-builtin
125+
ccflags-y := -fpic -fno-builtin -I$(obj)
105126
asflags-y := -Wa,-march=all
106127

128+
# Supply kernel BSS size to the decompressor via a linker symbol.
129+
KBSS_SZ = $(shell size $(obj)/../../../../vmlinux | awk 'END{print $$3}')
130+
LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ)
107131
# Supply ZRELADDR to the decompressor via a linker symbol.
108132
ifneq ($(CONFIG_AUTO_ZRELADDR),y)
109133
LDFLAGS_vmlinux += --defsym zreladdr=$(ZRELADDR)
@@ -123,7 +147,7 @@ LDFLAGS_vmlinux += -T
123147
# For __aeabi_uidivmod
124148
lib1funcs = $(obj)/lib1funcs.o
125149

126-
$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S FORCE
150+
$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S
127151
$(call cmd,shipped)
128152

129153
# We need to prevent any GOTOFF relocs being used with references
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
#include <asm/setup.h>
2+
#include <libfdt.h>
3+
4+
static int node_offset(void *fdt, const char *node_path)
5+
{
6+
int offset = fdt_path_offset(fdt, node_path);
7+
if (offset == -FDT_ERR_NOTFOUND)
8+
offset = fdt_add_subnode(fdt, 0, node_path);
9+
return offset;
10+
}
11+
12+
static int setprop(void *fdt, const char *node_path, const char *property,
13+
uint32_t *val_array, int size)
14+
{
15+
int offset = node_offset(fdt, node_path);
16+
if (offset < 0)
17+
return offset;
18+
return fdt_setprop(fdt, offset, property, val_array, size);
19+
}
20+
21+
static int setprop_string(void *fdt, const char *node_path,
22+
const char *property, const char *string)
23+
{
24+
int offset = node_offset(fdt, node_path);
25+
if (offset < 0)
26+
return offset;
27+
return fdt_setprop_string(fdt, offset, property, string);
28+
}
29+
30+
static int setprop_cell(void *fdt, const char *node_path,
31+
const char *property, uint32_t val)
32+
{
33+
int offset = node_offset(fdt, node_path);
34+
if (offset < 0)
35+
return offset;
36+
return fdt_setprop_cell(fdt, offset, property, val);
37+
}
38+
39+
/*
40+
* Convert and fold provided ATAGs into the provided FDT.
41+
*
42+
* REturn values:
43+
* = 0 -> pretend success
44+
* = 1 -> bad ATAG (may retry with another possible ATAG pointer)
45+
* < 0 -> error from libfdt
46+
*/
47+
int atags_to_fdt(void *atag_list, void *fdt, int total_space)
48+
{
49+
struct tag *atag = atag_list;
50+
uint32_t mem_reg_property[2 * NR_BANKS];
51+
int memcount = 0;
52+
int ret;
53+
54+
/* make sure we've got an aligned pointer */
55+
if ((u32)atag_list & 0x3)
56+
return 1;
57+
58+
/* if we get a DTB here we're done already */
59+
if (*(u32 *)atag_list == fdt32_to_cpu(FDT_MAGIC))
60+
return 0;
61+
62+
/* validate the ATAG */
63+
if (atag->hdr.tag != ATAG_CORE ||
64+
(atag->hdr.size != tag_size(tag_core) &&
65+
atag->hdr.size != 2))
66+
return 1;
67+
68+
/* let's give it all the room it could need */
69+
ret = fdt_open_into(fdt, fdt, total_space);
70+
if (ret < 0)
71+
return ret;
72+
73+
for_each_tag(atag, atag_list) {
74+
if (atag->hdr.tag == ATAG_CMDLINE) {
75+
setprop_string(fdt, "/chosen", "bootargs",
76+
atag->u.cmdline.cmdline);
77+
} else if (atag->hdr.tag == ATAG_MEM) {
78+
if (memcount >= sizeof(mem_reg_property)/4)
79+
continue;
80+
mem_reg_property[memcount++] = cpu_to_fdt32(atag->u.mem.start);
81+
mem_reg_property[memcount++] = cpu_to_fdt32(atag->u.mem.size);
82+
} else if (atag->hdr.tag == ATAG_INITRD2) {
83+
uint32_t initrd_start, initrd_size;
84+
initrd_start = atag->u.initrd.start;
85+
initrd_size = atag->u.initrd.size;
86+
setprop_cell(fdt, "/chosen", "linux,initrd-start",
87+
initrd_start);
88+
setprop_cell(fdt, "/chosen", "linux,initrd-end",
89+
initrd_start + initrd_size);
90+
}
91+
}
92+
93+
if (memcount)
94+
setprop(fdt, "/memory", "reg", mem_reg_property, 4*memcount);
95+
96+
return fdt_pack(fdt);
97+
}

0 commit comments

Comments
 (0)