Commit 1bc67188 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm

* 'for-linus' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm: (81 commits)
  ARM: 7133/1: SMP: fix per cpu timer setup before the cpu is marked online
  ARM: 7129/1: Add __arm_ioremap_exec for mapping external memory as MT_MEMORY
  ARM: 7136/1: pl330: Fix a race condition
  ARM: smp: fix clipping of number of CPUs
  ARM: 7137/1: Fix error upon adding LL debug
  ARM: Add a few machine types to mach-types
  ARM: 7130/1: dev_archdata: add private iommu extension
  ARM: 7125/1: Add unwinding annotations for 64bit division functions
  ARM: 7120/1: remove bashism in check for multiple zreladdrs
  ARM: 7118/1: rename temp variable in read*_relaxed()
  ARM: 6217/4: mach-realview: expose PB1176 ROM using physmap and map_rom
  ARM: 7098/1: kdump: copy kernel relocation code at the kexec prepare stage
  ARM: 7062/1: cache: detect PIPT I-cache using CTR
  ARM: platform fixups: remove mdesc argument to fixup function
  ARM: 7017/1: Use generic BUG() handler
  ARM: 7102/1: mach-integrator: update defconfig
  ARM: 7087/2: mach-integrator: get timer frequency from clock
  ARM: 7086/2: mach-integrator: modernize clock event registration
  ARM: 7085/2: mach-integrator: clockevent supports oneshot mode
  ARM: 7084/1: mach-integrator: retire some timer macros
  ...
parents 36b8d186 bdf4e948
* ARM L2 Cache Controller
ARM cores often have a separate level 2 cache controller. There are various
implementations of the L2 cache controller with compatible programming models.
The ARM L2 cache representation in the device tree should be done as follows:
Required properties:
- compatible : should be one of:
"arm,pl310-cache"
"arm,l220-cache"
"arm,l210-cache"
- cache-unified : Specifies the cache is a unified cache.
- cache-level : Should be set to 2 for a level 2 cache.
- reg : Physical base address and size of cache controller's memory mapped
registers.
Optional properties:
- arm,data-latency : Cycles of latency for Data RAM accesses. Specifies 3 cells of
read, write and setup latencies. Minimum valid values are 1. Controllers
without setup latency control should use a value of 0.
- arm,tag-latency : Cycles of latency for Tag RAM accesses. Specifies 3 cells of
read, write and setup latencies. Controllers without setup latency control
should use 0. Controllers without separate read and write Tag RAM latency
values should only use the first cell.
- arm,dirty-latency : Cycles of latency for Dirty RAMs. This is a single cell.
- arm,filter-ranges : <start length> Starting address and length of window to
filter. Addresses in the filter window are directed to the M1 port. Other
addresses will go to the M0 port.
- interrupts : 1 combined interrupt.
Example:
L2: cache-controller {
compatible = "arm,pl310-cache";
reg = <0xfff12000 0x1000>;
arm,data-latency = <1 1 1>;
arm,tag-latency = <2 2 2>;
arm,filter-latency = <0x80000000 0x8000000>;
cache-unified;
cache-level = <2>;
interrupts = <45>;
};
...@@ -3,7 +3,7 @@ config ARM ...@@ -3,7 +3,7 @@ config ARM
default y default y
select HAVE_AOUT select HAVE_AOUT
select HAVE_DMA_API_DEBUG select HAVE_DMA_API_DEBUG
select HAVE_IDE select HAVE_IDE if PCI || ISA || PCMCIA
select HAVE_MEMBLOCK select HAVE_MEMBLOCK
select RTC_LIB select RTC_LIB
select SYS_SUPPORTS_APM_EMULATION select SYS_SUPPORTS_APM_EMULATION
...@@ -195,7 +195,8 @@ config VECTORS_BASE ...@@ -195,7 +195,8 @@ config VECTORS_BASE
The base address of exception vectors. The base address of exception vectors.
config ARM_PATCH_PHYS_VIRT config ARM_PATCH_PHYS_VIRT
bool "Patch physical to virtual translations at runtime" bool "Patch physical to virtual translations at runtime" if EMBEDDED
default y
depends on !XIP_KERNEL && MMU depends on !XIP_KERNEL && MMU
depends on !ARCH_REALVIEW || !SPARSEMEM depends on !ARCH_REALVIEW || !SPARSEMEM
help help
...@@ -204,16 +205,16 @@ config ARM_PATCH_PHYS_VIRT ...@@ -204,16 +205,16 @@ config ARM_PATCH_PHYS_VIRT
kernel in system memory. kernel in system memory.
This can only be used with non-XIP MMU kernels where the base This can only be used with non-XIP MMU kernels where the base
of physical memory is at a 16MB boundary, or theoretically 64K of physical memory is at a 16MB boundary.
for the MSM machine class.
Only disable this option if you know that you do not require
this feature (eg, building a kernel for a single machine) and
you need to shrink the kernel to the minimal size.
config ARM_PATCH_PHYS_VIRT_16BIT
config GENERIC_BUG
def_bool y def_bool y
depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM depends on BUG
help
This option extends the physical to virtual translation patching
to allow physical memory down to a theoretical minimum of 64K
boundaries.
source "init/Kconfig" source "init/Kconfig"
...@@ -301,7 +302,6 @@ config ARCH_AT91 ...@@ -301,7 +302,6 @@ config ARCH_AT91
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select HAVE_CLK select HAVE_CLK
select CLKDEV_LOOKUP select CLKDEV_LOOKUP
select ARM_PATCH_PHYS_VIRT if MMU
help help
This enables support for systems based on the Atmel AT91RM9200, This enables support for systems based on the Atmel AT91RM9200,
AT91SAM9 and AT91CAP9 processors. AT91SAM9 and AT91CAP9 processors.
...@@ -385,6 +385,7 @@ config ARCH_FOOTBRIDGE ...@@ -385,6 +385,7 @@ config ARCH_FOOTBRIDGE
select CPU_SA110 select CPU_SA110
select FOOTBRIDGE select FOOTBRIDGE
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select HAVE_IDE
help help
Support for systems based on the DC21285 companion chip Support for systems based on the DC21285 companion chip
("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.
...@@ -631,6 +632,8 @@ config ARCH_PXA ...@@ -631,6 +632,8 @@ config ARCH_PXA
select SPARSE_IRQ select SPARSE_IRQ
select AUTO_ZRELADDR select AUTO_ZRELADDR
select MULTI_IRQ_HANDLER select MULTI_IRQ_HANDLER
select ARM_CPU_SUSPEND if PM
select HAVE_IDE
help help
Support for Intel/Marvell's PXA2xx/PXA3xx processor line. Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
...@@ -671,6 +674,7 @@ config ARCH_RPC ...@@ -671,6 +674,7 @@ config ARCH_RPC
select NO_IOPORT select NO_IOPORT
select ARCH_SPARSEMEM_ENABLE select ARCH_SPARSEMEM_ENABLE
select ARCH_USES_GETTIMEOFFSET select ARCH_USES_GETTIMEOFFSET
select HAVE_IDE
help help
On the Acorn Risc-PC, Linux can support the internal IDE disk and On the Acorn Risc-PC, Linux can support the internal IDE disk and
CD-ROM interface, serial and parallel port, and the floppy drive. CD-ROM interface, serial and parallel port, and the floppy drive.
...@@ -689,6 +693,7 @@ config ARCH_SA1100 ...@@ -689,6 +693,7 @@ config ARCH_SA1100
select HAVE_SCHED_CLOCK select HAVE_SCHED_CLOCK
select TICK_ONESHOT select TICK_ONESHOT
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select HAVE_IDE
help help
Support for StrongARM 11x0 based boards. Support for StrongARM 11x0 based boards.
...@@ -1375,6 +1380,7 @@ config SMP ...@@ -1375,6 +1380,7 @@ config SMP
MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \ MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \
ARCH_EXYNOS4 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || \ ARCH_EXYNOS4 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || \
ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE
depends on MMU
select USE_GENERIC_SMP_HELPERS select USE_GENERIC_SMP_HELPERS
select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP
help help
...@@ -1407,6 +1413,31 @@ config SMP_ON_UP ...@@ -1407,6 +1413,31 @@ config SMP_ON_UP
If you don't know what to do here, say Y. If you don't know what to do here, say Y.
config ARM_CPU_TOPOLOGY
bool "Support cpu topology definition"
depends on SMP && CPU_V7
default y
help
Support ARM cpu topology definition. The MPIDR register defines
affinity between processors which is then used to describe the cpu
topology of an ARM System.
config SCHED_MC
bool "Multi-core scheduler support"
depends on ARM_CPU_TOPOLOGY
help
Multi-core scheduler support improves the CPU scheduler's decision
making when dealing with multi-core CPU chips at a cost of slightly
increased overhead in some places. If unsure say N here.
config SCHED_SMT
bool "SMT scheduler support"
depends on ARM_CPU_TOPOLOGY
help
Improves the CPU scheduler's decision making when dealing with
MultiThreading at a cost of slightly increased overhead in some
places. If unsure say N here.
config HAVE_ARM_SCU config HAVE_ARM_SCU
bool bool
help help
...@@ -1482,6 +1513,7 @@ config THUMB2_KERNEL ...@@ -1482,6 +1513,7 @@ config THUMB2_KERNEL
depends on CPU_V7 && !CPU_V6 && !CPU_V6K && EXPERIMENTAL depends on CPU_V7 && !CPU_V6 && !CPU_V6K && EXPERIMENTAL
select AEABI select AEABI
select ARM_ASM_UNIFIED select ARM_ASM_UNIFIED
select ARM_UNWIND
help help
By enabling this option, the kernel will be compiled in By enabling this option, the kernel will be compiled in
Thumb-2 mode. A compiler/assembler that understand the unified Thumb-2 mode. A compiler/assembler that understand the unified
...@@ -2101,6 +2133,9 @@ config ARCH_SUSPEND_POSSIBLE ...@@ -2101,6 +2133,9 @@ config ARCH_SUSPEND_POSSIBLE
CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE
def_bool y def_bool y
config ARM_CPU_SUSPEND
def_bool PM_SLEEP
endmenu endmenu
source "net/Kconfig" source "net/Kconfig"
......
...@@ -65,13 +65,71 @@ config DEBUG_USER ...@@ -65,13 +65,71 @@ config DEBUG_USER
# These options are only for real kernel hackers who want to get their hands dirty. # These options are only for real kernel hackers who want to get their hands dirty.
config DEBUG_LL config DEBUG_LL
bool "Kernel low-level debugging functions" bool "Kernel low-level debugging functions (read help!)"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
help help
Say Y here to include definitions of printascii, printch, printhex Say Y here to include definitions of printascii, printch, printhex
in the kernel. This is helpful if you are debugging code that in the kernel. This is helpful if you are debugging code that
executes before the console is initialized. executes before the console is initialized.
Note that selecting this option will limit the kernel to a single
UART definition, as specified below. Attempting to boot the kernel
image on a different platform *will not work*, so this option should
not be enabled for kernels that are intended to be portable.
choice
prompt "Kernel low-level debugging port"
depends on DEBUG_LL
config DEBUG_LL_UART_NONE
bool "No low-level debugging UART"
help
Say Y here if your platform doesn't provide a UART option
below. This relies on your platform choosing the right UART
definition internally in order for low-level debugging to
work.
config DEBUG_ICEDCC
bool "Kernel low-level debugging via EmbeddedICE DCC channel"
help
Say Y here if you want the debug print routines to direct
their output to the EmbeddedICE macrocell's DCC channel using
co-processor 14. This is known to work on the ARM9 style ICE
channel and on the XScale with the PEEDI.
Note that the system will appear to hang during boot if there
is nothing connected to read from the DCC.
config DEBUG_FOOTBRIDGE_COM1
bool "Kernel low-level debugging messages via footbridge 8250 at PCI COM1"
depends on FOOTBRIDGE
help
Say Y here if you want the debug print routines to direct
their output to the 8250 at PCI COM1.
config DEBUG_DC21285_PORT
bool "Kernel low-level debugging messages via footbridge serial port"
depends on FOOTBRIDGE
help
Say Y here if you want the debug print routines to direct
their output to the serial port in the DC21285 (Footbridge).
config DEBUG_CLPS711X_UART1
bool "Kernel low-level debugging messages via UART1"
depends on ARCH_CLPS711X
help
Say Y here if you want the debug print routines to direct
their output to the first serial port on these devices.
config DEBUG_CLPS711X_UART2
bool "Kernel low-level debugging messages via UART2"
depends on ARCH_CLPS711X
help
Say Y here if you want the debug print routines to direct
their output to the second serial port on these devices.
endchoice
config EARLY_PRINTK config EARLY_PRINTK
bool "Early printk" bool "Early printk"
depends on DEBUG_LL depends on DEBUG_LL
...@@ -80,43 +138,14 @@ config EARLY_PRINTK ...@@ -80,43 +138,14 @@ config EARLY_PRINTK
kernel low-level debugging functions. Add earlyprintk to your kernel low-level debugging functions. Add earlyprintk to your
kernel parameters to enable this console. kernel parameters to enable this console.
config DEBUG_ICEDCC
bool "Kernel low-level debugging via EmbeddedICE DCC channel"
depends on DEBUG_LL
help
Say Y here if you want the debug print routines to direct their
output to the EmbeddedICE macrocell's DCC channel using
co-processor 14. This is known to work on the ARM9 style ICE
channel and on the XScale with the PEEDI.
It does include a timeout to ensure that the system does not
totally freeze when there is nothing connected to read.
config OC_ETM config OC_ETM
bool "On-chip ETM and ETB" bool "On-chip ETM and ETB"
select ARM_AMBA depends on ARM_AMBA
help help
Enables the on-chip embedded trace macrocell and embedded trace Enables the on-chip embedded trace macrocell and embedded trace
buffer driver that will allow you to collect traces of the buffer driver that will allow you to collect traces of the
kernel code. kernel code.
config DEBUG_DC21285_PORT
bool "Kernel low-level debugging messages via footbridge serial port"
depends on DEBUG_LL && FOOTBRIDGE
help
Say Y here if you want the debug print routines to direct their
output to the serial port in the DC21285 (Footbridge). Saying N
will cause the debug messages to appear on the first 16550
serial port.
config DEBUG_CLPS711X_UART2
bool "Kernel low-level debugging messages via UART2"
depends on DEBUG_LL && ARCH_CLPS711X
help
Say Y here if you want the debug print routines to direct their
output to the second serial port on these devices. Saying N will
cause the debug messages to appear on the first serial port.
config DEBUG_S3C_UART config DEBUG_S3C_UART
depends on PLAT_SAMSUNG depends on PLAT_SAMSUNG
int "S3C UART to use for low-level debug" int "S3C UART to use for low-level debug"
......
...@@ -128,6 +128,9 @@ textofs-$(CONFIG_PM_H1940) := 0x00108000 ...@@ -128,6 +128,9 @@ textofs-$(CONFIG_PM_H1940) := 0x00108000
ifeq ($(CONFIG_ARCH_SA1100),y) ifeq ($(CONFIG_ARCH_SA1100),y)
textofs-$(CONFIG_SA1111) := 0x00208000 textofs-$(CONFIG_SA1111) := 0x00208000
endif endif
textofs-$(CONFIG_ARCH_MSM7X30) := 0x00208000
textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
# Machine directory name. This list is sorted alphanumerically # Machine directory name. This list is sorted alphanumerically
# by CONFIG_* macro name. # by CONFIG_* macro name.
......
...@@ -78,7 +78,16 @@ endif ...@@ -78,7 +78,16 @@ endif
$(obj)/uImage: STARTADDR=$(LOADADDR) $(obj)/uImage: STARTADDR=$(LOADADDR)
check_for_multiple_loadaddr = \
if [ $(words $(LOADADDR)) -gt 1 ]; then \
echo 'multiple load addresses: $(LOADADDR)'; \
echo 'This is incompatible with uImages'; \
echo 'Specify LOADADDR on the commandline to build an uImage'; \
false; \
fi
$(obj)/uImage: $(obj)/zImage FORCE $(obj)/uImage: $(obj)/zImage FORCE
@$(check_for_multiple_loadaddr)
$(call if_changed,uimage) $(call if_changed,uimage)
@echo ' Image $@ is ready' @echo ' Image $@ is ready'
......
...@@ -139,8 +139,16 @@ bad_syms=$$($(CROSS_COMPILE)nm $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \ ...@@ -139,8 +139,16 @@ bad_syms=$$($(CROSS_COMPILE)nm $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \
( echo "following symbols must have non local/private scope:" >&2; \ ( echo "following symbols must have non local/private scope:" >&2; \
echo "$$bad_syms" >&2; rm -f $@; false ) echo "$$bad_syms" >&2; rm -f $@; false )
check_for_multiple_zreladdr = \
if [ $(words $(ZRELADDR)) -gt 1 -a "$(CONFIG_AUTO_ZRELADDR)" = "" ]; then \
echo 'multiple zreladdrs: $(ZRELADDR)'; \
echo 'This needs CONFIG_AUTO_ZRELADDR to be set'; \
false; \
fi
$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \ $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \
$(addprefix $(obj)/, $(OBJS)) $(lib1funcs) FORCE $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) FORCE
@$(check_for_multiple_zreladdr)
$(call if_changed,ld) $(call if_changed,ld)
@$(check_for_bad_syms) @$(check_for_bad_syms)
......
...@@ -180,7 +180,7 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val, ...@@ -180,7 +180,7 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
return -EINVAL; return -EINVAL;
mask = 0xff << shift; mask = 0xff << shift;
bit = 1 << (cpu + shift); bit = 1 << (cpu_logical_map(cpu) + shift);
spin_lock(&irq_controller_lock); spin_lock(&irq_controller_lock);
val = readl_relaxed(reg) & ~mask; val = readl_relaxed(reg) & ~mask;
...@@ -259,9 +259,15 @@ static void __init gic_dist_init(struct gic_chip_data *gic, ...@@ -259,9 +259,15 @@ static void __init gic_dist_init(struct gic_chip_data *gic,
unsigned int irq_start) unsigned int irq_start)
{ {
unsigned int gic_irqs, irq_limit, i; unsigned int gic_irqs, irq_limit, i;
u32 cpumask;
void __iomem *base = gic->dist_base; void __iomem *base = gic->dist_base;
u32 cpumask = 1 << smp_processor_id(); u32 cpu = 0;
#ifdef CONFIG_SMP
cpu = cpu_logical_map(smp_processor_id());
#endif
cpumask = 1 << cpu;
cpumask |= cpumask << 8; cpumask |= cpumask << 8;
cpumask |= cpumask << 16; cpumask |= cpumask << 16;
...@@ -382,7 +388,12 @@ void __cpuinit gic_enable_ppi(unsigned int irq) ...@@ -382,7 +388,12 @@ void __cpuinit gic_enable_ppi(unsigned int irq)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
{ {
unsigned long map = *cpus_addr(*mask); int cpu;
unsigned long map = 0;
/* Convert our logical CPU mask into a physical one. */
for_each_cpu(cpu, mask)
map |= 1 << cpu_logical_map(cpu);
/* /*
* Ensure that stores to Normal memory are visible to the * Ensure that stores to Normal memory are visible to the
......
...@@ -1546,7 +1546,7 @@ int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op) ...@@ -1546,7 +1546,7 @@ int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op)
/* Start the next */ /* Start the next */
case PL330_OP_START: case PL330_OP_START:
if (!_start(thrd)) if (!_thrd_active(thrd) && !_start(thrd))
ret = -EIO; ret = -EIO;
break; break;
......
...@@ -346,7 +346,8 @@ void __init vic_init(void __iomem *base, unsigned int irq_start, ...@@ -346,7 +346,8 @@ void __init vic_init(void __iomem *base, unsigned int irq_start,
/* Identify which VIC cell this one is, by reading the ID */ /* Identify which VIC cell this one is, by reading the ID */
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
u32 addr = ((u32)base & PAGE_MASK) + 0xfe0 + (i * 4); void __iomem *addr;
addr = (void __iomem *)((u32)base & PAGE_MASK) + 0xfe0 + (i * 4);
cellid |= (readl(addr) & 0xff) << (8 * i); cellid |= (readl(addr) & 0xff) << (8 * i);
} }
vendor = (cellid >> 12) & 0xff; vendor = (cellid >> 12) & 0xff;
......
CONFIG_EXPERIMENTAL=y CONFIG_EXPERIMENTAL=y
CONFIG_SYSVIPC=y CONFIG_SYSVIPC=y
CONFIG_TINY_RCU=y
CONFIG_IKCONFIG=y CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14 CONFIG_LOG_BUF_SHIFT=14
...@@ -8,20 +9,29 @@ CONFIG_MODULES=y ...@@ -8,20 +9,29 @@ CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_UNLOAD=y
CONFIG_ARCH_INTEGRATOR=y CONFIG_ARCH_INTEGRATOR=y
CONFIG_ARCH_INTEGRATOR_AP=y CONFIG_ARCH_INTEGRATOR_AP=y
CONFIG_ARCH_INTEGRATOR_CP=y
CONFIG_CPU_ARM720T=y CONFIG_CPU_ARM720T=y
CONFIG_CPU_ARM920T=y CONFIG_CPU_ARM920T=y
CONFIG_CPU_ARM922T=y
CONFIG_CPU_ARM926T=y
CONFIG_CPU_ARM1020=y
CONFIG_CPU_ARM1022=y
CONFIG_CPU_ARM1026=y
CONFIG_PCI=y CONFIG_PCI=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_AEABI=y
CONFIG_LEDS=y CONFIG_LEDS=y
CONFIG_LEDS_CPU=y CONFIG_LEDS_CPU=y
CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_CMDLINE="console=ttyAM0,38400n8 root=/dev/nfs ip=bootp mem=32M" CONFIG_CMDLINE="console=ttyAM0,38400n8 root=/dev/nfs ip=bootp"
CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_FPE_NWFPE=y CONFIG_FPE_NWFPE=y
CONFIG_PM=y
CONFIG_NET=y CONFIG_NET=y
CONFIG_PACKET=y CONFIG_PACKET=y
CONFIG_UNIX=y CONFIG_UNIX=y
...@@ -32,7 +42,6 @@ CONFIG_IP_PNP_DHCP=y ...@@ -32,7 +42,6 @@ CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y CONFIG_IP_PNP_BOOTP=y
# CONFIG_IPV6 is not set # CONFIG_IPV6 is not set
CONFIG_MTD=y CONFIG_MTD=y
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_AFS_PARTS=y CONFIG_MTD_AFS_PARTS=y
CONFIG_MTD_CHAR=y CONFIG_MTD_CHAR=y
...@@ -40,6 +49,7 @@ CONFIG_MTD_BLOCK=y ...@@ -40,6 +49,7 @@ CONFIG_MTD_BLOCK=y
CONFIG_MTD_CFI=y CONFIG_MTD_CFI=y
CONFIG_MTD_CFI_ADV_OPTIONS=y CONFIG_MTD_CFI_ADV_OPTIONS=y
CONFIG_MTD_CFI_INTELEXT=y CONFIG_MTD_CFI_INTELEXT=y
CONFIG_MTD_PHYSMAP=y
CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_RAM_SIZE=8192
...@@ -56,6 +66,8 @@ CONFIG_FB_MODE_HELPERS=y ...@@ -56,6 +66,8 @@ CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_MATROX=y CONFIG_FB_MATROX=y
CONFIG_FB_MATROX_MILLENIUM=y CONFIG_FB_MATROX_MILLENIUM=y
CONFIG_FB_MATROX_MYSTIQUE=y CONFIG_FB_MATROX_MYSTIQUE=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_PL030=y
CONFIG_EXT2_FS=y CONFIG_EXT2_FS=y
CONFIG_TMPFS=y CONFIG_TMPFS=y
CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS=y
...@@ -68,4 +80,3 @@ CONFIG_NFSD_V3=y ...@@ -68,4 +80,3 @@ CONFIG_NFSD_V3=y
CONFIG_PARTITION_ADVANCED=y CONFIG_PARTITION_ADVANCED=y
CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_ERRORS=y
include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
header-y += hwcap.h header-y += hwcap.h
generic-y += auxvec.h
generic-y += bitsperlong.h
generic-y += cputime.h
generic-y += emergency-restart.h
generic-y += errno.h
generic-y += ioctl.h
generic-y += irq_regs.h
generic-y += kdebug.h
generic-y += local.h
generic-y += local64.h
generic-y += percpu.h
generic-y += poll.h
generic-y += resource.h
generic-y += sections.h
generic-y += siginfo.h
generic-y += sizes.h
#ifndef __ASMARM_AUXVEC_H
#define __ASMARM_AUXVEC_H
#endif
#include <asm-generic/bitsperlong.h>
...@@ -3,21 +3,58 @@ ...@@ -3,21 +3,58 @@
#ifdef CONFIG_BUG #ifdef CONFIG_BUG
#ifdef CONFIG_DEBUG_BUGVERBOSE
extern void __bug(const char *file, int line) __attribute__((noreturn));
/* give file/line information */
#define BUG() __bug(__FILE__, __LINE__)
/*
* Use a suitable undefined instruction to use for ARM/Thumb2 bug handling.
* We need to be careful not to conflict with those used by other modules and
* the register_undef_hook() system.
*/
#ifdef CONFIG_THUMB2_KERNEL
#define BUG_INSTR_VALUE 0xde02
#define BUG_INSTR_TYPE ".hword "
#else #else
#define BUG_INSTR_VALUE 0xe7f001f2
#define BUG_INSTR_TYPE ".word "
#endif
/* this just causes an oops */
#define BUG() do { *(int *)0 = 0; } while (1)
#endif #define BUG() _BUG(__FILE__, __LINE__, BUG_INSTR_VALUE)
#define _BUG(file, line, value) __BUG(file, line, value)
#ifdef CONFIG_DEBUG_BUGVERBOSE
/*
* The extra indirection is to ensure that the __FILE__ string comes through
* OK. Many version of gcc do not support the asm %c parameter which would be
* preferable to this unpleasantness. We use mergeable string sections to
* avoid multiple copies of the string appearing in the kernel image.
*/
#define __BUG(__file, __line, __value) \
do { \
BUILD_BUG_ON(sizeof(struct bug_entry) != 12); \
asm volatile("1:\t" BUG_INSTR_TYPE #__value "\n" \
".pushsection .rodata.str, \"aMS\", %progbits, 1\n" \
"2:\t.asciz " #__file "\n" \
".popsection\n" \
".pushsection __bug_table,\"a\"\n" \
"3:\t.word 1b, 2b\n" \
"\t.hword " #__line ", 0\n" \
".popsection"); \
unreachable(); \
} while (0)
#else /* not CONFIG_DEBUG_BUGVERBOSE */
#define __BUG(__file, __line, __value) \
do { \
asm volatile(BUG_INSTR_TYPE #__value); \
unreachable(); \
} while (0)
#endif /* CONFIG_DEBUG_BUGVERBOSE */
#define HAVE_ARCH_BUG #define HAVE_ARCH_BUG
#endif #endif /* CONFIG_BUG */
#include <asm-generic/bug.h> #include <asm-generic/bug.h>
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#define CACHEID_VIPT (CACHEID_VIPT_ALIASING|CACHEID_VIPT_NONALIASING) #define CACHEID_VIPT (CACHEID_VIPT_ALIASING|CACHEID_VIPT_NONALIASING)
#define CACHEID_ASID_TAGGED (1 << 3) #define CACHEID_ASID_TAGGED (1 << 3)
#define CACHEID_VIPT_I_ALIASING (1 << 4) #define CACHEID_VIPT_I_ALIASING (1 << 4)
#define CACHEID_PIPT (1 << 5)
extern unsigned int cacheid; extern unsigned int cacheid;
...@@ -16,6 +17,7 @@ extern unsigned int cacheid; ...@@ -16,6 +17,7 @@ extern unsigned int cacheid;
#define cache_is_vipt_aliasing() cacheid_is(CACHEID_VIPT_ALIASING) #define cache_is_vipt_aliasing() cacheid_is(CACHEID_VIPT_ALIASING)
#define icache_is_vivt_asid_tagged() cacheid_is(CACHEID_ASID_TAGGED) #define icache_is_vivt_asid_tagged() cacheid_is(CACHEID_ASID_TAGGED)
#define icache_is_vipt_aliasing() cacheid_is(CACHEID_VIPT_I_ALIASING) #define icache_is_vipt_aliasing() cacheid_is(CACHEID_VIPT_I_ALIASING)
#define icache_is_pipt() cacheid_is(CACHEID_PIPT)
/* /*
* __LINUX_ARM_ARCH__ is the minimum supported CPU architecture * __LINUX_ARM_ARCH__ is the minimum supported CPU architecture
...@@ -26,7 +28,8 @@ extern unsigned int cacheid; ...@@ -26,7 +28,8 @@ extern unsigned int cacheid;
#if __LINUX_ARM_ARCH__ >= 7 #if __LINUX_ARM_ARCH__ >= 7
#define __CACHEID_ARCH_MIN (CACHEID_VIPT_NONALIASING |\ #define __CACHEID_ARCH_MIN (CACHEID_VIPT_NONALIASING |\
CACHEID_ASID_TAGGED |\ CACHEID_ASID_TAGGED |\
CACHEID_VIPT_I_ALIASING) CACHEID_VIPT_I_ALIASING |\
CACHEID_PIPT)
#elif __LINUX_ARM_ARCH__ >= 6 #elif __LINUX_ARM_ARCH__ >= 6
#define __CACHEID_ARCH_MIN (~CACHEID_VIVT) #define __CACHEID_ARCH_MIN (~CACHEID_VIVT)
#else #else
......
#ifndef __ARM_CPUTIME_H
#define __ARM_CPUTIME_H
#include <asm-generic/cputime.h>
#endif /* __ARM_CPUTIME_H */
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#define CPUID_CACHETYPE 1 #define CPUID_CACHETYPE 1
#define CPUID_TCM 2 #define CPUID_TCM 2
#define CPUID_TLBTYPE 3 #define CPUID_TLBTYPE 3
#define CPUID_MPIDR 5
#define CPUID_EXT_PFR0 "c1, 0" #define CPUID_EXT_PFR0 "c1, 0"
#define CPUID_EXT_PFR1 "c1, 1" #define CPUID_EXT_PFR1 "c1, 1"
...@@ -70,6 +71,11 @@ static inline unsigned int __attribute_const__ read_cpuid_tcmstatus(void) ...@@ -70,6 +71,11 @@ static inline unsigned int __attribute_const__ read_cpuid_tcmstatus(void)
return read_cpuid(CPUID_TCM); return read_cpuid(CPUID_TCM);
} }
static inline unsigned int __attribute_const__ read_cpuid_mpidr(void)
{
return read_cpuid(CPUID_MPIDR);
}
/* /*
* Intel's XScale3 core supports some v6 features (supersections, L2) * Intel's XScale3 core supports some v6 features (supersections, L2)
* but advertises itself as v5 as it does not support the v6 ISA. For * but advertises itself as v5 as it does not support the v6 ISA. For
......
...@@ -10,6 +10,9 @@ struct dev_archdata { ...@@ -10,6 +10,9 @@ struct dev_archdata {
#ifdef CONFIG_DMABOUNCE #ifdef CONFIG_DMABOUNCE
struct dmabounce_device_info *dmabounce; struct dmabounce_device_info *dmabounce;
#endif #endif
#ifdef CONFIG_IOMMU_API
void *iommu; /* private IOMMU data */
#endif
}; };
struct pdev_archdata { struct pdev_archdata {
......
...@@ -32,7 +32,7 @@ static inline unsigned long dma_to_pfn(struct device *dev, dma_addr_t addr) ...@@ -32,7 +32,7 @@ static inline unsigned long dma_to_pfn(struct device *dev, dma_addr_t addr)
static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) static inline void *dma_to_virt(struct device *dev, dma_addr_t addr)
{ {
return (void *)__bus_to_virt(addr); return (void *)__bus_to_virt((unsigned long)addr);
} }
static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) static inline dma_addr_t virt_to_dma(struct device *dev, void *addr)
......
...@@ -161,7 +161,6 @@ struct expansion_card { ...@@ -161,7 +161,6 @@ struct expansion_card {
/* Private internal data */ /* Private internal data */
const char *card_desc; /* Card description */ const char *card_desc; /* Card description */
CONST unsigned int podaddr; /* Base Linux address for card */
CONST loader_t loader; /* loader program */ CONST loader_t loader; /* loader program */
u64 dma_mask; u64 dma_mask;
}; };
......
#ifndef _ASM_EMERGENCY_RESTART_H
#define _ASM_EMERGENCY_RESTART_H
#include <asm-generic/emergency-restart.h>
#endif /* _ASM_EMERGENCY_RESTART_H */
#ifndef _ARM_ERRNO_H
#define _ARM_ERRNO_H
#include <asm-generic/errno.h>
#endif
/*
* Annotations for marking C functions as exception handlers.
*
* These should only be used for C functions that are called from the low
* level exception entry code and not any intervening C code.
*/
#ifndef __ASM_ARM_EXCEPTION_H
#define __ASM_ARM_EXCEPTION_H
#include <linux/ftrace.h>
#define __exception __attribute__((section(".exception.text")))
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
#define __exception_irq_entry __irq_entry
#else
#define __exception_irq_entry __exception
#endif
#endif /* __ASM_ARM_EXCEPTION_H */
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
#define L2X0_LOCKDOWN_WAY_D_BASE 0x900 #define L2X0_LOCKDOWN_WAY_D_BASE 0x900
#define L2X0_LOCKDOWN_WAY_I_BASE 0x904 #define L2X0_LOCKDOWN_WAY_I_BASE 0x904
#define L2X0_LOCKDOWN_STRIDE 0x08 #define L2X0_LOCKDOWN_STRIDE 0x08
#define L2X0_ADDR_FILTER_START 0xC00
#define L2X0_ADDR_FILTER_END 0xC04
#define L2X0_TEST_OPERATION 0xF00 #define L2X0_TEST_OPERATION 0xF00
#define L2X0_LINE_DATA 0xF10 #define L2X0_LINE_DATA 0xF10
#define L2X0_LINE_TAG 0xF30 #define L2X0_LINE_TAG 0xF30
...@@ -65,8 +67,23 @@ ...@@ -65,8 +67,23 @@
#define L2X0_CACHE_ID_PART_MASK (0xf << 6) #define L2X0_CACHE_ID_PART_MASK (0xf << 6)
#define L2X0_CACHE_ID_PART_L210 (1 << 6) #define L2X0_CACHE_ID_PART_L210 (1 << 6)
#define L2X0_CACHE_ID_PART_L310 (3 << 6) #define L2X0_CACHE_ID_PART_L310 (3 << 6)
#define L2X0_CACHE_ID_RTL_MASK 0x3f
#define L2X0_CACHE_ID_RTL_R0P0 0x0
#define L2X0_CACHE_ID_RTL_R1P0 0x2
#define L2X0_CACHE_ID_RTL_R2P0 0x4
#define L2X0_CACHE_ID_RTL_R3P0 0x5
#define L2X0_CACHE_ID_RTL_R3P1 0x6
#define L2X0_CACHE_ID_RTL_R3P2 0x8
#define L2X0_AUX_CTRL_MASK 0xc0000fff #define L2X0_AUX_CTRL_MASK 0xc0000fff
#define L2X0_AUX_CTRL_DATA_RD_LATENCY_SHIFT 0
#define L2X0_AUX_CTRL_DATA_RD_LATENCY_MASK 0x7
#define L2X0_AUX_CTRL_DATA_WR_LATENCY_SHIFT 3
#define L2X0_AUX_CTRL_DATA_WR_LATENCY_MASK (0x7 << 3)
#define L2X0_AUX_CTRL_TAG_LATENCY_SHIFT 6
#define L2X0_AUX_CTRL_TAG_LATENCY_MASK (0x7 << 6)
#define L2X0_AUX_CTRL_DIRTY_LATENCY_SHIFT 9
#define L2X0_AUX_CTRL_DIRTY_LATENCY_MASK (0x7 << 9)
#define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT 16 #define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT 16
#define L2X0_AUX_CTRL_WAY_SIZE_SHIFT 17 #define L2X0_AUX_CTRL_WAY_SIZE_SHIFT 17
#define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x7 << 17) #define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x7 << 17)
...@@ -77,8 +94,33 @@ ...@@ -77,8 +94,33 @@
#define L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT 29 #define L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT 29
#define L2X0_AUX_CTRL_EARLY_BRESP_SHIFT 30 #define L2X0_AUX_CTRL_EARLY_BRESP_SHIFT 30
#define L2X0_LATENCY_CTRL_SETUP_SHIFT 0
#define L2X0_LATENCY_CTRL_RD_SHIFT 4
#define L2X0_LATENCY_CTRL_WR_SHIFT 8
#define L2X0_ADDR_FILTER_EN 1
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
extern void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask); extern void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask);
extern int l2x0_of_init(__u32 aux_val, __u32 aux_mask);
struct l2x0_regs {
unsigned long phy_base;
unsigned long aux_ctrl;
/*
* Whether the following registers need to be saved/restored
* depends on platform
*/
unsigned long tag_latency;
unsigned long data_latency;
unsigned long filter_start;
unsigned long filter_end;
unsigned long prefetch_ctrl;
unsigned long pwr_ctrl;
};
extern struct l2x0_regs l2x0_saved_regs;
#endif #endif
#endif #endif
...@@ -80,6 +80,7 @@ extern void __iomem *__arm_ioremap_caller(unsigned long, size_t, unsigned int, ...@@ -80,6 +80,7 @@ extern void __iomem *__arm_ioremap_caller(unsigned long, size_t, unsigned int,
extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, unsigned int); extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, unsigned int);
extern void __iomem *__arm_ioremap(unsigned long, size_t, unsigned int); extern void __iomem *__arm_ioremap(unsigned long, size_t, unsigned int);
extern void __iomem *__arm_ioremap_exec(unsigned long, size_t, bool cached);
extern void __iounmap(volatile void __iomem *addr); extern void __iounmap(volatile void __iomem *addr);
/* /*
...@@ -109,6 +110,27 @@ static inline void __iomem *__typesafe_io(unsigned long addr) ...@@ -109,6 +110,27 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
*/ */
#include <mach/io.h> #include <mach/io.h>
/*
* This is the limit of PC card/PCI/ISA IO space, which is by default
* 64K if we have PC card, PCI or ISA support. Otherwise, default to
* zero to prevent ISA/PCI drivers claiming IO space (and potentially
* oopsing.)
*
* Only set this larger if you really need inb() et.al. to operate over
* a larger address space. Note that SOC_COMMON ioremaps each sockets
* IO space area, and so inb() et.al. must be defined to operate as per
* readb() et.al. on such platforms.
*/
#ifndef IO_SPACE_LIMIT
#if defined(CONFIG_PCMCIA_SOC_COMMON) || defined(CONFIG_PCMCIA_SOC_COMMON_MODULE)
#define IO_SPACE_LIMIT ((resource_size_t)0xffffffff)
#elif defined(CONFIG_PCI) || defined(CONFIG_ISA) || defined(CONFIG_PCCARD)
#define IO_SPACE_LIMIT ((resource_size_t)0xffff)
#else
#define IO_SPACE_LIMIT ((resource_size_t)0)
#endif
#endif
/* /*
* IO port access primitives * IO port access primitives
* ------------------------- * -------------------------
...@@ -189,11 +211,11 @@ extern void _memset_io(volatile void __iomem *, int, size_t); ...@@ -189,11 +211,11 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
* IO port primitives for more information. * IO port primitives for more information.
*/ */
#ifdef __mem_pci #ifdef __mem_pci
#define readb_relaxed(c) ({ u8 __v = __raw_readb(__mem_pci(c)); __v; }) #define readb_relaxed(c) ({ u8 __r = __raw_readb(__mem_pci(c)); __r; })
#define readw_relaxed(c) ({ u16 __v = le16_to_cpu((__force __le16) \ #define readw_relaxed(c) ({ u16 __r = le16_to_cpu((__force __le16) \
__raw_readw(__mem_pci(c))); __v; }) __raw_readw(__mem_pci(c))); __r; })
#define readl_relaxed(c) ({ u32 __v = le32_to_cpu((__force __le32) \ #define readl_relaxed(c) ({ u32 __r = le32_to_cpu((__force __le32) \
__raw_readl(__mem_pci(c))); __v; }) __raw_readl(__mem_pci(c))); __r; })
#define writeb_relaxed(v,c) ((void)__raw_writeb(v,__mem_pci(c))) #define writeb_relaxed(v,c) ((void)__raw_writeb(v,__mem_pci(c)))
#define writew_relaxed(v,c) ((void)__raw_writew((__force u16) \ #define writew_relaxed(v,c) ((void)__raw_writew((__force u16) \
...@@ -260,10 +282,16 @@ extern void _memset_io(volatile void __iomem *, int, size_t); ...@@ -260,10 +282,16 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
#define ioread16(p) ({ unsigned int __v = le16_to_cpu((__force __le16)__raw_readw(p)); __iormb(); __v; }) #define ioread16(p) ({ unsigned int __v = le16_to_cpu((__force __le16)__raw_readw(p)); __iormb(); __v; })
#define ioread32(p) ({ unsigned int __v = le32_to_cpu((__force __le32)__raw_readl(p)); __iormb(); __v; }) #define ioread32(p) ({ unsigned int __v = le32_to_cpu((__force __le32)__raw_readl(p)); __iormb(); __v; })
#define ioread16be(p) ({ unsigned int __v = be16_to_cpu((__force __be16)__raw_readw(p)); __iormb(); __v; })
#define ioread32be(p) ({ unsigned int __v = be32_to_cpu((__force __be32)__raw_readl(p)); __iormb(); __v; })
#define iowrite8(v,p) ({ __iowmb(); (void)__raw_writeb(v, p); }) #define iowrite8(v,p) ({ __iowmb(); (void)__raw_writeb(v, p); })
#define iowrite16(v,p) ({ __iowmb(); (void)__raw_writew((__force __u16)cpu_to_le16(v), p); }) #define iowrite16(v,p) ({ __iowmb(); (void)__raw_writew((__force __u16)cpu_to_le16(v), p); })
#define iowrite32(v,p) ({ __iowmb(); (void)__raw_writel((__force __u32)cpu_to_le32(v), p); }) #define iowrite32(v,p) ({ __iowmb(); (void)__raw_writel((__force __u32)cpu_to_le32(v), p); })
#define iowrite16be(v,p) ({ __iowmb(); (void)__raw_writew((__force __u16)cpu_to_be16(v), p); })
#define iowrite32be(v,p) ({ __iowmb(); (void)__raw_writel((__force __u32)cpu_to_be32(v), p); })
#define ioread8_rep(p,d,c) __raw_readsb(p,d,c) #define ioread8_rep(p,d,c) __raw_readsb(p,d,c)
#define ioread16_rep(p,d,c) __raw_readsw(p,d,c) #define ioread16_rep(p,d,c) __raw_readsw(p,d,c)
#define ioread32_rep(p,d,c) __raw_readsl(p,d,c) #define ioread32_rep(p,d,c) __raw_readsl(p,d,c)
......
#include <asm-generic/ioctl.h>
#include <asm-generic/irq_regs.h>
#include <asm-generic/kdebug.h>
#include <asm-generic/local.h>
#include <asm-generic/local64.h>
...@@ -24,6 +24,10 @@ void percpu_timer_setup(void); ...@@ -24,6 +24,10 @@ void percpu_timer_setup(void);
*/ */
asmlinkage void do_local_timer(struct pt_regs *); asmlinkage void do_local_timer(struct pt_regs *);
/*
* Called from C code
*/
void handle_local_timer(struct pt_regs *);
#ifdef CONFIG_LOCAL_TIMERS #ifdef CONFIG_LOCAL_TIMERS
......
...@@ -34,8 +34,7 @@ struct machine_desc { ...@@ -34,8 +34,7 @@ struct machine_desc {
unsigned int reserve_lp1 :1; /* never has lp1 */ unsigned int reserve_lp1 :1; /* never has lp1 */
unsigned int reserve_lp2 :1; /* never has lp2 */ unsigned int reserve_lp2 :1; /* never has lp2 */
unsigned int soft_reboot :1; /* soft reboot */ unsigned int soft_reboot :1; /* soft reboot */
void (*fixup)(struct machine_desc *, void (*fixup)(struct tag *, char **,
struct tag *, char **,
struct meminfo *); struct meminfo *);
void (*reserve)(void);/* reserve mem blocks */ void (*reserve)(void);/* reserve mem blocks */
void (*map_io)(void);/* IO mapping function */ void (*map_io)(void);/* IO mapping function */
......
...@@ -160,7 +160,6 @@ ...@@ -160,7 +160,6 @@
* so that all we need to do is modify the 8-bit constant field. * so that all we need to do is modify the 8-bit constant field.
*/ */
#define __PV_BITS_31_24 0x81000000 #define __PV_BITS_31_24 0x81000000
#define __PV_BITS_23_16 0x00810000
extern unsigned long __pv_phys_offset; extern unsigned long __pv_phys_offset;
#define PHYS_OFFSET __pv_phys_offset #define PHYS_OFFSET __pv_phys_offset
...@@ -178,9 +177,6 @@ static inline unsigned long __virt_to_phys(unsigned long x) ...@@ -178,9 +177,6 @@ static inline unsigned long __virt_to_phys(unsigned long x)
{ {
unsigned long t; unsigned long t;
__pv_stub(x, t, "add", __PV_BITS_31_24); __pv_stub(x, t, "add", __PV_BITS_31_24);
#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
__pv_stub(t, t, "add", __PV_BITS_23_16);
#endif
return t; return t;
} }
...@@ -188,9 +184,6 @@ static inline unsigned long __phys_to_virt(unsigned long x) ...@@ -188,9 +184,6 @@ static inline unsigned long __phys_to_virt(unsigned long x)
{ {
unsigned long t; unsigned long t;
__pv_stub(x, t, "sub", __PV_BITS_31_24); __pv_stub(x, t, "sub", __PV_BITS_31_24);
#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
__pv_stub(t, t, "sub", __PV_BITS_23_16);
#endif
return t; return t;
} }
#else #else
......
...@@ -31,11 +31,7 @@ struct mod_arch_specific { ...@@ -31,11 +31,7 @@ struct mod_arch_specific {
/* Add __virt_to_phys patching state as well */ /* Add __virt_to_phys patching state as well */
#ifdef CONFIG_ARM_PATCH_PHYS_VIRT #ifdef CONFIG_ARM_PATCH_PHYS_VIRT
#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
#define MODULE_ARCH_VERMAGIC_P2V "p2v16 "
#else
#define MODULE_ARCH_VERMAGIC_P2V "p2v8 " #define MODULE_ARCH_VERMAGIC_P2V "p2v8 "
#endif
#else #else
#define MODULE_ARCH_VERMAGIC_P2V "" #define MODULE_ARCH_VERMAGIC_P2V ""
#endif #endif
......
...@@ -34,6 +34,7 @@ struct outer_cache_fns { ...@@ -34,6 +34,7 @@ struct outer_cache_fns {
void (*sync)(void); void (*sync)(void);
#endif #endif
void (*set_debug)(unsigned long); void (*set_debug)(unsigned long);
void (*resume)(void);
}; };
#ifdef CONFIG_OUTER_CACHE #ifdef CONFIG_OUTER_CACHE
...@@ -74,6 +75,12 @@ static inline void outer_disable(void) ...@@ -74,6 +75,12 @@ static inline void outer_disable(void)
outer_cache.disable(); outer_cache.disable();
} }
static inline void outer_resume(void)
{
if (outer_cache.resume)
outer_cache.resume();
}
#else #else
static inline void outer_inv_range(phys_addr_t start, phys_addr_t end) static inline void outer_inv_range(phys_addr_t start, phys_addr_t end)
......
...@@ -151,47 +151,7 @@ extern void __cpu_copy_user_highpage(struct page *to, struct page *from, ...@@ -151,47 +151,7 @@ extern void __cpu_copy_user_highpage(struct page *to, struct page *from,
#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
extern void copy_page(void *to, const void *from); extern void copy_page(void *to, const void *from);
typedef unsigned long pteval_t; #include <asm/pgtable-2level-types.h>
#undef STRICT_MM_TYPECHECKS
#ifdef STRICT_MM_TYPECHECKS
/*
* These are used to make use of C type-checking..
*/
typedef struct { pteval_t pte; } pte_t;
typedef struct { unsigned long pmd; } pmd_t;
typedef struct { unsigned long pgd[2]; } pgd_t;
typedef struct { unsigned long pgprot; } pgprot_t;
#define pte_val(x) ((x).pte)
#define pmd_val(x) ((x).pmd)
#define pgd_val(x) ((x).pgd[0])
#define pgprot_val(x) ((x).pgprot)
#define __pte(x) ((pte_t) { (x) } )
#define __pmd(x) ((pmd_t) { (x) } )
#define __pgprot(x) ((pgprot_t) { (x) } )
#else
/*
* .. while these make it easier on the compiler
*/
typedef pteval_t pte_t;
typedef unsigned long pmd_t;
typedef unsigned long pgd_t[2];
typedef unsigned long pgprot_t;
#define pte_val(x) (x)
#define pmd_val(x) (x)
#define pgd_val(x) ((x)[0])
#define pgprot_val(x) (x)
#define __pte(x) (x)
#define __pmd(x) (x)
#define __pgprot(x) (x)
#endif /* STRICT_MM_TYPECHECKS */
#endif /* CONFIG_MMU */ #endif /* CONFIG_MMU */
......
#ifndef __ARM_PERCPU
#define __ARM_PERCPU
#include <asm-generic/percpu.h>
#endif
...@@ -105,9 +105,9 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte) ...@@ -105,9 +105,9 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
} }
static inline void __pmd_populate(pmd_t *pmdp, phys_addr_t pte, static inline void __pmd_populate(pmd_t *pmdp, phys_addr_t pte,
unsigned long prot) pmdval_t prot)
{ {
unsigned long pmdval = (pte + PTE_HWTABLE_OFF) | prot; pmdval_t pmdval = (pte + PTE_HWTABLE_OFF) | prot;
pmdp[0] = __pmd(pmdval); pmdp[0] = __pmd(pmdval);
pmdp[1] = __pmd(pmdval + 256 * sizeof(pte_t)); pmdp[1] = __pmd(pmdval + 256 * sizeof(pte_t));
flush_pmd_entry(pmdp); flush_pmd_entry(pmdp);
......
/*
* arch/arm/include/asm/pgtable-2level-hwdef.h
*
* Copyright (C) 1995-2002 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef _ASM_PGTABLE_2LEVEL_HWDEF_H
#define _ASM_PGTABLE_2LEVEL_HWDEF_H
/*
* Hardware page table definitions.
*
* + Level 1 descriptor (PMD)
* - common
*/
#define PMD_TYPE_MASK (_AT(pmdval_t, 3) << 0)
#define PMD_TYPE_FAULT (_AT(pmdval_t, 0) << 0)
#define PMD_TYPE_TABLE (_AT(pmdval_t, 1) << 0)
#define PMD_TYPE_SECT (_AT(pmdval_t, 2) << 0)
#define PMD_BIT4 (_AT(pmdval_t, 1) << 4)
#define PMD_DOMAIN(x) (_AT(pmdval_t, (x)) << 5)
#define PMD_PROTECTION (_AT(pmdval_t, 1) << 9) /* v5 */
/*
* - section
*/
#define PMD_SECT_BUFFERABLE (_AT(pmdval_t, 1) << 2)
#define PMD_SECT_CACHEABLE (_AT(pmdval_t, 1) << 3)
#define PMD_SECT_XN (_AT(pmdval_t, 1) << 4) /* v6 */
#define PMD_SECT_AP_WRITE (_AT(pmdval_t, 1) << 10)
#define PMD_SECT_AP_READ (_AT(pmdval_t, 1) << 11)
#define PMD_SECT_TEX(x) (_AT(pmdval_t, (x)) << 12) /* v5 */
#define PMD_SECT_APX (_AT(pmdval_t, 1) << 15) /* v6 */
#define PMD_SECT_S (_AT(pmdval_t, 1) << 16) /* v6 */
#define PMD_SECT_nG (_AT(pmdval_t, 1) << 17) /* v6 */
#define PMD_SECT_SUPER (_AT(pmdval_t, 1) << 18) /* v6 */
#define PMD_SECT_AF (_AT(pmdval_t, 0))
#define PMD_SECT_UNCACHED (_AT(pmdval_t, 0))
#define PMD_SECT_BUFFERED (PMD_SECT_BUFFERABLE)
#define PMD_SECT_WT (PMD_SECT_CACHEABLE)
#define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
#define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE)
#define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
#define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2))
/*
* - coarse table (not used)
*/
/*
* + Level 2 descriptor (PTE)
* - common
*/
#define PTE_TYPE_MASK (_AT(pteval_t, 3) << 0)
#define PTE_TYPE_FAULT (_AT(pteval_t, 0) << 0)
#define PTE_TYPE_LARGE (_AT(pteval_t, 1) << 0)
#define PTE_TYPE_SMALL (_AT(pteval_t, 2) << 0)
#define PTE_TYPE_EXT (_AT(pteval_t, 3) << 0) /* v5 */
#define PTE_BUFFERABLE (_AT(pteval_t, 1) << 2)
#define PTE_CACHEABLE (_AT(pteval_t, 1) << 3)
/*
* - extended small page/tiny page
*/
#define PTE_EXT_XN (_AT(pteval_t, 1) << 0) /* v6 */
#define PTE_EXT_AP_MASK (_AT(pteval_t, 3) << 4)
#define PTE_EXT_AP0 (_AT(pteval_t, 1) << 4)
#define PTE_EXT_AP1 (_AT(pteval_t, 2) << 4)
#define PTE_EXT_AP_UNO_SRO (_AT(pteval_t, 0) << 4)
#define PTE_EXT_AP_UNO_SRW (PTE_EXT_AP0)
#define PTE_EXT_AP_URO_SRW (PTE_EXT_AP1)
#define PTE_EXT_AP_URW_SRW (PTE_EXT_AP1|PTE_EXT_AP0)
#define PTE_EXT_TEX(x) (_AT(pteval_t, (x)) << 6) /* v5 */
#define PTE_EXT_APX (_AT(pteval_t, 1) << 9) /* v6 */
#define PTE_EXT_COHERENT (_AT(pteval_t, 1) << 9) /* XScale3 */
#define PTE_EXT_SHARED (_AT(pteval_t, 1) << 10) /* v6 */
#define PTE_EXT_NG (_AT(pteval_t, 1) << 11) /* v6 */
/*
* - small page
*/
#define PTE_SMALL_AP_MASK (_AT(pteval_t, 0xff) << 4)
#define PTE_SMALL_AP_UNO_SRO (_AT(pteval_t, 0x00) << 4)
#define PTE_SMALL_AP_UNO_SRW (_AT(pteval_t, 0x55) << 4)
#define PTE_SMALL_AP_URO_SRW (_AT(pteval_t, 0xaa) << 4)
#define PTE_SMALL_AP_URW_SRW (_AT(pteval_t, 0xff) << 4)
#define PHYS_MASK (~0UL)
#endif
/*
* arch/arm/include/asm/pgtable-2level-types.h
*
* Copyright (C) 1995-2003 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _ASM_PGTABLE_2LEVEL_TYPES_H
#define _ASM_PGTABLE_2LEVEL_TYPES_H
#include <asm/types.h>
typedef u32 pteval_t;
typedef u32 pmdval_t;
#undef STRICT_MM_TYPECHECKS
#ifdef STRICT_MM_TYPECHECKS
/*
* These are used to make use of C type-checking..
*/
typedef struct { pteval_t pte; } pte_t;
typedef struct { pmdval_t pmd; } pmd_t;
typedef struct { pmdval_t pgd[2]; } pgd_t;
typedef struct { pteval_t pgprot; } pgprot_t;
#define pte_val(x) ((x).pte)
#define pmd_val(x) ((x).pmd)
#define pgd_val(x) ((x).pgd[0])
#define pgprot_val(x) ((x).pgprot)
#define __pte(x) ((pte_t) { (x) } )
#define __pmd(x) ((pmd_t) { (x) } )
#define __pgprot(x) ((pgprot_t) { (x) } )
#else
/*
* .. while these make it easier on the compiler
*/
typedef pteval_t pte_t;
typedef pmdval_t pmd_t;
typedef pmdval_t pgd_t[2];
typedef pteval_t pgprot_t;
#define pte_val(x) (x)
#define pmd_val(x) (x)
#define pgd_val(x) ((x)[0])
#define pgprot_val(x) (x)
#define __pte(x) (x)
#define __pmd(x) (x)
#define __pgprot(x) (x)
#endif /* STRICT_MM_TYPECHECKS */
#endif /* _ASM_PGTABLE_2LEVEL_TYPES_H */
/*
* arch/arm/include/asm/pgtable-2level.h
*
* Copyright (C) 1995-2002 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef _ASM_PGTABLE_2LEVEL_H
#define _ASM_PGTABLE_2LEVEL_H
/*
* Hardware-wise, we have a two level page table structure, where the first
* level has 4096 entries, and the second level has 256 entries. Each entry
* is one 32-bit word. Most of the bits in the second level entry are used
* by hardware, and there aren't any "accessed" and "dirty" bits.
*
* Linux on the other hand has a three level page table structure, which can
* be wrapped to fit a two level page table structure easily - using the PGD
* and PTE only. However, Linux also expects one "PTE" table per page, and
* at least a "dirty" bit.
*
* Therefore, we tweak the implementation slightly - we tell Linux that we
* have 2048 entries in the first level, each of which is 8 bytes (iow, two
* hardware pointers to the second level.) The second level contains two
* hardware PTE tables arranged contiguously, preceded by Linux versions
* which contain the state information Linux needs. We, therefore, end up
* with 512 entries in the "PTE" level.
*
* This leads to the page tables having the following layout:
*
* pgd pte
* | |
* +--------+
* | | +------------+ +0
* +- - - - + | Linux pt 0 |
* | | +------------+ +1024
* +--------+ +0 | Linux pt 1 |
* | |-----> +------------+ +2048
* +- - - - + +4 | h/w pt 0 |
* | |-----> +------------+ +3072
* +--------+ +8 | h/w pt 1 |
* | | +------------+ +4096
*
* See L_PTE_xxx below for definitions of bits in the "Linux pt", and
* PTE_xxx for definitions of bits appearing in the "h/w pt".
*
* PMD_xxx definitions refer to bits in the first level page table.
*
* The "dirty" bit is emulated by only granting hardware write permission
* iff the page is marked "writable" and "dirty" in the Linux PTE. This
* means that a write to a clean page will cause a permission fault, and
* the Linux MM layer will mark the page dirty via handle_pte_fault().
* For the hardware to notice the permission change, the TLB entry must
* be flushed, and ptep_set_access_flags() does that for us.
*
* The "accessed" or "young" bit is emulated by a similar method; we only
* allow accesses to the page if the "young" bit is set. Accesses to the
* page will cause a fault, and handle_pte_fault() will set the young bit
* for us as long as the page is marked present in the corresponding Linux
* PTE entry. Again, ptep_set_access_flags() will ensure that the TLB is
* up to date.
*
* However, when the "young" bit is cleared, we deny access to the page
* by clearing the hardware PTE. Currently Linux does not flush the TLB
* for us in this case, which means the TLB will retain the transation
* until either the TLB entry is evicted under pressure, or a context
* switch which changes the user space mapping occurs.
*/
#define PTRS_PER_PTE 512
#define PTRS_PER_PMD 1
#define PTRS_PER_PGD 2048
#define PTE_HWTABLE_PTRS (PTRS_PER_PTE)
#define PTE_HWTABLE_OFF (PTE_HWTABLE_PTRS * sizeof(pte_t))
#define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u32))
/*
* PMD_SHIFT determines the size of the area a second-level page table can map
* PGDIR_SHIFT determines what a third-level page table entry can map
*/
#define PMD_SHIFT 21
#define PGDIR_SHIFT 21
#define PMD_SIZE (1UL << PMD_SHIFT)
#define PMD_MASK (~(PMD_SIZE-1))
#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
#define PGDIR_MASK (~(PGDIR_SIZE-1))
/*
* section address mask and size definitions.
*/
#define SECTION_SHIFT 20
#define SECTION_SIZE (1UL << SECTION_SHIFT)
#define SECTION_MASK (~(SECTION_SIZE-1))
/*
* ARMv6 supersection address mask and size definitions.
*/
#define SUPERSECTION_SHIFT 24
#define SUPERSECTION_SIZE (1UL << SUPERSECTION_SHIFT)
#define SUPERSECTION_MASK (~(SUPERSECTION_SIZE-1))
#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
/*
* "Linux" PTE definitions.
*
* We keep two sets of PTEs - the hardware and the linux version.
* This allows greater flexibility in the way we map the Linux bits
* onto the hardware tables, and allows us to have YOUNG and DIRTY
* bits.
*
* The PTE table pointer refers to the hardware entries; the "Linux"
* entries are stored 1024 bytes below.
*/
#define L_PTE_PRESENT (_AT(pteval_t, 1) << 0)
#define L_PTE_YOUNG (_AT(pteval_t, 1) << 1)
#define L_PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !PRESENT */
#define L_PTE_DIRTY (_AT(pteval_t, 1) << 6)
#define L_PTE_RDONLY (_AT(pteval_t, 1) << 7)
#define L_PTE_USER (_AT(pteval_t, 1) << 8)
#define L_PTE_XN (_AT(pteval_t, 1) << 9)
#define L_PTE_SHARED (_AT(pteval_t, 1) << 10) /* shared(v6), coherent(xsc3) */
/*
* These are the memory types, defined to be compatible with
* pre-ARMv6 CPUs cacheable and bufferable bits: XXCB
*/
#define L_PTE_MT_UNCACHED (_AT(pteval_t, 0x00) << 2) /* 0000 */
#define L_PTE_MT_BUFFERABLE (_AT(pteval_t, 0x01) << 2) /* 0001 */
#define L_PTE_MT_WRITETHROUGH (_AT(pteval_t, 0x02) << 2) /* 0010 */
#define L_PTE_MT_WRITEBACK (_AT(pteval_t, 0x03) << 2) /* 0011 */
#define L_PTE_MT_MINICACHE (_AT(pteval_t, 0x06) << 2) /* 0110 (sa1100, xscale) */
#define L_PTE_MT_WRITEALLOC (_AT(pteval_t, 0x07) << 2) /* 0111 */
#define L_PTE_MT_DEV_SHARED (_AT(pteval_t, 0x04) << 2) /* 0100 */
#define L_PTE_MT_DEV_NONSHARED (_AT(pteval_t, 0x0c) << 2) /* 1100 */
#define L_PTE_MT_DEV_WC (_AT(pteval_t, 0x09) << 2) /* 1001 */
#define L_PTE_MT_DEV_CACHED (_AT(pteval_t, 0x0b) << 2) /* 1011 */
#define L_PTE_MT_MASK (_AT(pteval_t, 0x0f) << 2)
#endif /* _ASM_PGTABLE_2LEVEL_H */
...@@ -10,81 +10,6 @@ ...@@ -10,81 +10,6 @@
#ifndef _ASMARM_PGTABLE_HWDEF_H #ifndef _ASMARM_PGTABLE_HWDEF_H
#define _ASMARM_PGTABLE_HWDEF_H #define _ASMARM_PGTABLE_HWDEF_H
/* #include <asm/pgtable-2level-hwdef.h>
* Hardware page table definitions.
*
* + Level 1 descriptor (PMD)
* - common
*/
#define PMD_TYPE_MASK (3 << 0)
#define PMD_TYPE_FAULT (0 << 0)
#define PMD_TYPE_TABLE (1 << 0)
#define PMD_TYPE_SECT (2 << 0)
#define PMD_BIT4 (1 << 4)
#define PMD_DOMAIN(x) ((x) << 5)
#define PMD_PROTECTION (1 << 9) /* v5 */
/*
* - section
*/
#define PMD_SECT_BUFFERABLE (1 << 2)
#define PMD_SECT_CACHEABLE (1 << 3)
#define PMD_SECT_XN (1 << 4) /* v6 */
#define PMD_SECT_AP_WRITE (1 << 10)
#define PMD_SECT_AP_READ (1 << 11)
#define PMD_SECT_TEX(x) ((x) << 12) /* v5 */
#define PMD_SECT_APX (1 << 15) /* v6 */
#define PMD_SECT_S (1 << 16) /* v6 */
#define PMD_SECT_nG (1 << 17) /* v6 */
#define PMD_SECT_SUPER (1 << 18) /* v6 */
#define PMD_SECT_UNCACHED (0)
#define PMD_SECT_BUFFERED (PMD_SECT_BUFFERABLE)
#define PMD_SECT_WT (PMD_SECT_CACHEABLE)
#define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
#define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE)
#define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
#define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2))
/*
* - coarse table (not used)
*/
/*
* + Level 2 descriptor (PTE)
* - common
*/
#define PTE_TYPE_MASK (3 << 0)
#define PTE_TYPE_FAULT (0 << 0)
#define PTE_TYPE_LARGE (1 << 0)
#define PTE_TYPE_SMALL (2 << 0)
#define PTE_TYPE_EXT (3 << 0) /* v5 */
#define PTE_BUFFERABLE (1 << 2)
#define PTE_CACHEABLE (1 << 3)
/*
* - extended small page/tiny page
*/
#define PTE_EXT_XN (1 << 0) /* v6 */
#define PTE_EXT_AP_MASK (3 << 4)
#define PTE_EXT_AP0 (1 << 4)
#define PTE_EXT_AP1 (2 << 4)
#define PTE_EXT_AP_UNO_SRO (0 << 4)
#define PTE_EXT_AP_UNO_SRW (PTE_EXT_AP0)
#define PTE_EXT_AP_URO_SRW (PTE_EXT_AP1)
#define PTE_EXT_AP_URW_SRW (PTE_EXT_AP1|PTE_EXT_AP0)
#define PTE_EXT_TEX(x) ((x) << 6) /* v5 */
#define PTE_EXT_APX (1 << 9) /* v6 */
#define PTE_EXT_COHERENT (1 << 9) /* XScale3 */
#define PTE_EXT_SHARED (1 << 10) /* v6 */
#define PTE_EXT_NG (1 << 11) /* v6 */
/*
* - small page
*/
#define PTE_SMALL_AP_MASK (0xff << 4)
#define PTE_SMALL_AP_UNO_SRO (0x00 << 4)
#define PTE_SMALL_AP_UNO_SRW (0x55 << 4)
#define PTE_SMALL_AP_URO_SRW (0xaa << 4)
#define PTE_SMALL_AP_URW_SRW (0xff << 4)
#endif #endif
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#include <mach/vmalloc.h> #include <mach/vmalloc.h>
#include <asm/pgtable-hwdef.h> #include <asm/pgtable-hwdef.h>
#include <asm/pgtable-2level.h>
/* /*
* Just any arbitrary offset to the start of the vmalloc VM area: the * Just any arbitrary offset to the start of the vmalloc VM area: the
* current 8MB value just means that there will be a 8MB "hole" after the * current 8MB value just means that there will be a 8MB "hole" after the
...@@ -41,79 +43,6 @@ ...@@ -41,79 +43,6 @@
#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
#endif #endif
/*
* Hardware-wise, we have a two level page table structure, where the first
* level has 4096 entries, and the second level has 256 entries. Each entry
* is one 32-bit word. Most of the bits in the second level entry are used
* by hardware, and there aren't any "accessed" and "dirty" bits.
*
* Linux on the other hand has a three level page table structure, which can
* be wrapped to fit a two level page table structure easily - using the PGD
* and PTE only. However, Linux also expects one "PTE" table per page, and
* at least a "dirty" bit.
*
* Therefore, we tweak the implementation slightly - we tell Linux that we
* have 2048 entries in the first level, each of which is 8 bytes (iow, two
* hardware pointers to the second level.) The second level contains two
* hardware PTE tables arranged contiguously, preceded by Linux versions
* which contain the state information Linux needs. We, therefore, end up
* with 512 entries in the "PTE" level.
*
* This leads to the page tables having the following layout:
*
* pgd pte
* | |
* +--------+
* | | +------------+ +0
* +- - - - + | Linux pt 0 |
* | | +------------+ +1024
* +--------+ +0 | Linux pt 1 |
* | |-----> +------------+ +2048
* +- - - - + +4 | h/w pt 0 |
* | |-----> +------------+ +3072
* +--------+ +8 | h/w pt 1 |
* | | +------------+ +4096
*
* See L_PTE_xxx below for definitions of bits in the "Linux pt", and
* PTE_xxx for definitions of bits appearing in the "h/w pt".
*
* PMD_xxx definitions refer to bits in the first level page table.
*
* The "dirty" bit is emulated by only granting hardware write permission
* iff the page is marked "writable" and "dirty" in the Linux PTE. This
* means that a write to a clean page will cause a permission fault, and
* the Linux MM layer will mark the page dirty via handle_pte_fault().
* For the hardware to notice the permission change, the TLB entry must
* be flushed, and ptep_set_access_flags() does that for us.
*
* The "accessed" or "young" bit is emulated by a similar method; we only
* allow accesses to the page if the "young" bit is set. Accesses to the
* page will cause a fault, and handle_pte_fault() will set the young bit
* for us as long as the page is marked present in the corresponding Linux
* PTE entry. Again, ptep_set_access_flags() will ensure that the TLB is
* up to date.
*
* However, when the "young" bit is cleared, we deny access to the page
* by clearing the hardware PTE. Currently Linux does not flush the TLB
* for us in this case, which means the TLB will retain the transation
* until either the TLB entry is evicted under pressure, or a context
* switch which changes the user space mapping occurs.
*/
#define PTRS_PER_PTE 512
#define PTRS_PER_PMD 1
#define PTRS_PER_PGD 2048
#define PTE_HWTABLE_PTRS (PTRS_PER_PTE)
#define PTE_HWTABLE_OFF (PTE_HWTABLE_PTRS * sizeof(pte_t))
#define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u32))
/*
* PMD_SHIFT determines the size of the area a second-level page table can map
* PGDIR_SHIFT determines what a third-level page table entry can map
*/
#define PMD_SHIFT 21
#define PGDIR_SHIFT 21
#define LIBRARY_TEXT_START 0x0c000000 #define LIBRARY_TEXT_START 0x0c000000
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
...@@ -124,12 +53,6 @@ extern void __pgd_error(const char *file, int line, pgd_t); ...@@ -124,12 +53,6 @@ extern void __pgd_error(const char *file, int line, pgd_t);
#define pte_ERROR(pte) __pte_error(__FILE__, __LINE__, pte) #define pte_ERROR(pte) __pte_error(__FILE__, __LINE__, pte)
#define pmd_ERROR(pmd) __pmd_error(__FILE__, __LINE__, pmd) #define pmd_ERROR(pmd) __pmd_error(__FILE__, __LINE__, pmd)
#define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd) #define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd)
#endif /* !__ASSEMBLY__ */
#define PMD_SIZE (1UL << PMD_SHIFT)
#define PMD_MASK (~(PMD_SIZE-1))
#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
#define PGDIR_MASK (~(PGDIR_SIZE-1))
/* /*
* This is the lowest virtual address we can permit any user space * This is the lowest virtual address we can permit any user space
...@@ -138,60 +61,6 @@ extern void __pgd_error(const char *file, int line, pgd_t); ...@@ -138,60 +61,6 @@ extern void __pgd_error(const char *file, int line, pgd_t);
*/ */
#define FIRST_USER_ADDRESS PAGE_SIZE #define FIRST_USER_ADDRESS PAGE_SIZE
#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
/*
* section address mask and size definitions.
*/
#define SECTION_SHIFT 20
#define SECTION_SIZE (1UL << SECTION_SHIFT)
#define SECTION_MASK (~(SECTION_SIZE-1))
/*
* ARMv6 supersection address mask and size definitions.
*/
#define SUPERSECTION_SHIFT 24
#define SUPERSECTION_SIZE (1UL << SUPERSECTION_SHIFT)
#define SUPERSECTION_MASK (~(SUPERSECTION_SIZE-1))
/*
* "Linux" PTE definitions.
*
* We keep two sets of PTEs - the hardware and the linux version.
* This allows greater flexibility in the way we map the Linux bits
* onto the hardware tables, and allows us to have YOUNG and DIRTY
* bits.
*
* The PTE table pointer refers to the hardware entries; the "Linux"
* entries are stored 1024 bytes below.
*/
#define L_PTE_PRESENT (_AT(pteval_t, 1) << 0)
#define L_PTE_YOUNG (_AT(pteval_t, 1) << 1)
#define L_PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !PRESENT */
#define L_PTE_DIRTY (_AT(pteval_t, 1) << 6)
#define L_PTE_RDONLY (_AT(pteval_t, 1) << 7)
#define L_PTE_USER (_AT(pteval_t, 1) << 8)
#define L_PTE_XN (_AT(pteval_t, 1) << 9)
#define L_PTE_SHARED (_AT(pteval_t, 1) << 10) /* shared(v6), coherent(xsc3) */
/*
* These are the memory types, defined to be compatible with
* pre-ARMv6 CPUs cacheable and bufferable bits: XXCB
*/
#define L_PTE_MT_UNCACHED (_AT(pteval_t, 0x00) << 2) /* 0000 */
#define L_PTE_MT_BUFFERABLE (_AT(pteval_t, 0x01) << 2) /* 0001 */
#define L_PTE_MT_WRITETHROUGH (_AT(pteval_t, 0x02) << 2) /* 0010 */
#define L_PTE_MT_WRITEBACK (_AT(pteval_t, 0x03) << 2) /* 0011 */
#define L_PTE_MT_MINICACHE (_AT(pteval_t, 0x06) << 2) /* 0110 (sa1100, xscale) */
#define L_PTE_MT_WRITEALLOC (_AT(pteval_t, 0x07) << 2) /* 0111 */
#define L_PTE_MT_DEV_SHARED (_AT(pteval_t, 0x04) << 2) /* 0100 */
#define L_PTE_MT_DEV_NONSHARED (_AT(pteval_t, 0x0c) << 2) /* 1100 */
#define L_PTE_MT_DEV_WC (_AT(pteval_t, 0x09) << 2) /* 1001 */
#define L_PTE_MT_DEV_CACHED (_AT(pteval_t, 0x0b) << 2) /* 1011 */
#define L_PTE_MT_MASK (_AT(pteval_t, 0x0f) << 2)
#ifndef __ASSEMBLY__
/* /*
* The pgprot_* and protection_map entries will be fixed up in runtime * The pgprot_* and protection_map entries will be fixed up in runtime
* to include the cachable and bufferable bits based on memory policy, * to include the cachable and bufferable bits based on memory policy,
...@@ -327,10 +196,10 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; ...@@ -327,10 +196,10 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
static inline pte_t *pmd_page_vaddr(pmd_t pmd) static inline pte_t *pmd_page_vaddr(pmd_t pmd)
{ {
return __va(pmd_val(pmd) & PAGE_MASK); return __va(pmd_val(pmd) & PHYS_MASK & (s32)PAGE_MASK);
} }
#define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd))) #define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd) & PHYS_MASK))
/* we don't need complex calculations here as the pmd is folded into the pgd */ /* we don't need complex calculations here as the pmd is folded into the pgd */
#define pmd_addr_end(addr,end) (end) #define pmd_addr_end(addr,end) (end)
...@@ -351,7 +220,7 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd) ...@@ -351,7 +220,7 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd)
#define pte_offset_map(pmd,addr) (__pte_map(pmd) + pte_index(addr)) #define pte_offset_map(pmd,addr) (__pte_map(pmd) + pte_index(addr))
#define pte_unmap(pte) __pte_unmap(pte) #define pte_unmap(pte) __pte_unmap(pte)
#define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) #define pte_pfn(pte) ((pte_val(pte) & PHYS_MASK) >> PAGE_SHIFT)
#define pfn_pte(pfn,prot) __pte(__pfn_to_phys(pfn) | pgprot_val(prot)) #define pfn_pte(pfn,prot) __pte(__pfn_to_phys(pfn) | pgprot_val(prot))
#define pte_page(pte) pfn_to_page(pte_pfn(pte)) #define pte_page(pte) pfn_to_page(pte_pfn(pte))
......
#include <asm-generic/poll.h>
#ifndef _ARM_RESOURCE_H
#define _ARM_RESOURCE_H
#include <asm-generic/resource.h>
#endif
#include <asm-generic/sections.h>
#ifndef _ASMARM_SIGINFO_H
#define _ASMARM_SIGINFO_H
#include <asm-generic/siginfo.h>
#endif
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* Size definitions
* Copyright (C) ARM Limited 1998. All rights reserved.
*/
#include <asm-generic/sizes.h>
#define SZ_48M (SZ_32M + SZ_16M)
...@@ -32,6 +32,11 @@ extern void show_ipi_list(struct seq_file *, int); ...@@ -32,6 +32,11 @@ extern void show_ipi_list(struct seq_file *, int);
*/ */
asmlinkage void do_IPI(int ipinr, struct pt_regs *regs); asmlinkage void do_IPI(int ipinr, struct pt_regs *regs);
/*
* Called from C code, this handles an IPI.
*/
void handle_IPI(int ipinr, struct pt_regs *regs);
/* /*
* Setup the set of possible CPUs (via set_cpu_possible) * Setup the set of possible CPUs (via set_cpu_possible)
*/ */
...@@ -65,6 +70,12 @@ extern void platform_secondary_init(unsigned int cpu); ...@@ -65,6 +70,12 @@ extern void platform_secondary_init(unsigned int cpu);
*/ */
extern void platform_smp_prepare_cpus(unsigned int); extern void platform_smp_prepare_cpus(unsigned int);
/*
* Logical CPU mapping.
*/
extern int __cpu_logical_map[NR_CPUS];
#define cpu_logical_map(cpu) __cpu_logical_map[cpu]
/* /*
* Initial data for bringing up a secondary CPU. * Initial data for bringing up a secondary CPU.
*/ */
......
...@@ -57,18 +57,12 @@ ...@@ -57,18 +57,12 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <linux/compiler.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/irqflags.h> #include <linux/irqflags.h>
#include <asm/outercache.h> #include <asm/outercache.h>
#define __exception __attribute__((section(".exception.text")))
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
#define __exception_irq_entry __irq_entry
#else
#define __exception_irq_entry __exception
#endif
struct thread_info; struct thread_info;
struct task_struct; struct task_struct;
...@@ -97,14 +91,13 @@ void hook_ifault_code(int nr, int (*fn)(unsigned long, unsigned int, ...@@ -97,14 +91,13 @@ void hook_ifault_code(int nr, int (*fn)(unsigned long, unsigned int,
#define xchg(ptr,x) \ #define xchg(ptr,x) \
((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
extern asmlinkage void __backtrace(void);
extern asmlinkage void c_backtrace(unsigned long fp, int pmode); extern asmlinkage void c_backtrace(unsigned long fp, int pmode);
struct mm_struct; struct mm_struct;
extern void show_pte(struct mm_struct *mm, unsigned long addr); extern void show_pte(struct mm_struct *mm, unsigned long addr);
extern void __show_regs(struct pt_regs *); extern void __show_regs(struct pt_regs *);
extern int cpu_architecture(void); extern int __pure cpu_architecture(void);
extern void cpu_init(void); extern void cpu_init(void);
void arm_machine_restart(char mode, const char *cmd); void arm_machine_restart(char mode, const char *cmd);
......
...@@ -471,7 +471,7 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr) ...@@ -471,7 +471,7 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr)
* these operations. This is typically used when we are removing * these operations. This is typically used when we are removing
* PMD entries. * PMD entries.
*/ */
static inline void flush_pmd_entry(pmd_t *pmd) static inline void flush_pmd_entry(void *pmd)
{ {
const unsigned int __tlb_flag = __cpu_tlb_flags; const unsigned int __tlb_flag = __cpu_tlb_flags;
...@@ -487,7 +487,7 @@ static inline void flush_pmd_entry(pmd_t *pmd) ...@@ -487,7 +487,7 @@ static inline void flush_pmd_entry(pmd_t *pmd)
dsb(); dsb();
} }
static inline void clean_pmd_entry(pmd_t *pmd) static inline void clean_pmd_entry(void *pmd)
{ {
const unsigned int __tlb_flag = __cpu_tlb_flags; const unsigned int __tlb_flag = __cpu_tlb_flags;
......
#ifndef _ASM_ARM_TOPOLOGY_H #ifndef _ASM_ARM_TOPOLOGY_H
#define _ASM_ARM_TOPOLOGY_H #define _ASM_ARM_TOPOLOGY_H
#ifdef CONFIG_ARM_CPU_TOPOLOGY
#include <linux/cpumask.h>
struct cputopo_arm {
int thread_id;
int core_id;
int socket_id;
cpumask_t thread_sibling;
cpumask_t core_sibling;
};
extern struct cputopo_arm cpu_topology[NR_CPUS];
#define topology_physical_package_id(cpu) (cpu_topology[cpu].socket_id)
#define topology_core_id(cpu) (cpu_topology[cpu].core_id)
#define topology_core_cpumask(cpu) (&cpu_topology[cpu].core_sibling)
#define topology_thread_cpumask(cpu) (&cpu_topology[cpu].thread_sibling)
#define mc_capable() (cpu_topology[0].socket_id != -1)
#define smt_capable() (cpu_topology[0].thread_id != -1)
void init_cpu_topology(void);
void store_cpu_topology(unsigned int cpuid);
const struct cpumask *cpu_coregroup_mask(unsigned int cpu);
#else
static inline void init_cpu_topology(void) { }
static inline void store_cpu_topology(unsigned int cpuid) { }
#endif
#include <asm-generic/topology.h> #include <asm-generic/topology.h>
#endif /* _ASM_ARM_TOPOLOGY_H */ #endif /* _ASM_ARM_TOPOLOGY_H */
...@@ -29,7 +29,7 @@ obj-$(CONFIG_MODULES) += armksyms.o module.o ...@@ -29,7 +29,7 @@ obj-$(CONFIG_MODULES) += armksyms.o module.o
obj-$(CONFIG_ARTHUR) += arthur.o obj-$(CONFIG_ARTHUR) += arthur.o
obj-$(CONFIG_ISA_DMA) += dma-isa.o obj-$(CONFIG_ISA_DMA) += dma-isa.o
obj-$(CONFIG_PCI) += bios32.o isa.o obj-$(CONFIG_PCI) += bios32.o isa.o
obj-$(CONFIG_PM_SLEEP) += sleep.o obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o
obj-$(CONFIG_HAVE_SCHED_CLOCK) += sched_clock.o obj-$(CONFIG_HAVE_SCHED_CLOCK) += sched_clock.o
obj-$(CONFIG_SMP) += smp.o smp_tlb.o obj-$(CONFIG_SMP) += smp.o smp_tlb.o
obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o
...@@ -66,6 +66,7 @@ obj-$(CONFIG_IWMMXT) += iwmmxt.o ...@@ -66,6 +66,7 @@ obj-$(CONFIG_IWMMXT) += iwmmxt.o
obj-$(CONFIG_CPU_HAS_PMU) += pmu.o obj-$(CONFIG_CPU_HAS_PMU) += pmu.o
obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o
AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt
obj-$(CONFIG_ARM_CPU_TOPOLOGY) += topology.o
ifneq ($(CONFIG_ARCH_EBSA110),y) ifneq ($(CONFIG_ARCH_EBSA110),y)
obj-y += io.o obj-y += io.o
......
...@@ -49,9 +49,6 @@ extern void __aeabi_ulcmp(void); ...@@ -49,9 +49,6 @@ extern void __aeabi_ulcmp(void);
extern void fpundefinstr(void); extern void fpundefinstr(void);
EXPORT_SYMBOL(__backtrace);
/* platform dependent support */ /* platform dependent support */
EXPORT_SYMBOL(__udelay); EXPORT_SYMBOL(__udelay);
EXPORT_SYMBOL(__const_udelay); EXPORT_SYMBOL(__const_udelay);
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/memory.h> #include <asm/memory.h>
#include <asm/procinfo.h> #include <asm/procinfo.h>
#include <asm/hardware/cache-l2x0.h>
#include <linux/kbuild.h> #include <linux/kbuild.h>
/* /*
...@@ -92,6 +93,17 @@ int main(void) ...@@ -92,6 +93,17 @@ int main(void)
DEFINE(S_OLD_R0, offsetof(struct pt_regs, ARM_ORIG_r0)); DEFINE(S_OLD_R0, offsetof(struct pt_regs, ARM_ORIG_r0));
DEFINE(S_FRAME_SIZE, sizeof(struct pt_regs)); DEFINE(S_FRAME_SIZE, sizeof(struct pt_regs));
BLANK(); BLANK();
#ifdef CONFIG_CACHE_L2X0
DEFINE(L2X0_R_PHY_BASE, offsetof(struct l2x0_regs, phy_base));
DEFINE(L2X0_R_AUX_CTRL, offsetof(struct l2x0_regs, aux_ctrl));
DEFINE(L2X0_R_TAG_LATENCY, offsetof(struct l2x0_regs, tag_latency));
DEFINE(L2X0_R_DATA_LATENCY, offsetof(struct l2x0_regs, data_latency));
DEFINE(L2X0_R_FILTER_START, offsetof(struct l2x0_regs, filter_start));
DEFINE(L2X0_R_FILTER_END, offsetof(struct l2x0_regs, filter_end));
DEFINE(L2X0_R_PREFETCH_CTRL, offsetof(struct l2x0_regs, prefetch_ctrl));
DEFINE(L2X0_R_PWR_CTRL, offsetof(struct l2x0_regs, pwr_ctrl));
BLANK();
#endif
#ifdef CONFIG_CPU_HAS_ASID #ifdef CONFIG_CPU_HAS_ASID
DEFINE(MM_CONTEXT_ID, offsetof(struct mm_struct, context.id)); DEFINE(MM_CONTEXT_ID, offsetof(struct mm_struct, context.id));
BLANK(); BLANK();
......
...@@ -412,6 +412,9 @@ void pcibios_fixup_bus(struct pci_bus *bus) ...@@ -412,6 +412,9 @@ void pcibios_fixup_bus(struct pci_bus *bus)
printk(KERN_INFO "PCI: bus%d: Fast back to back transfers %sabled\n", printk(KERN_INFO "PCI: bus%d: Fast back to back transfers %sabled\n",
bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis"); bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis");
} }
#ifdef CONFIG_HOTPLUG
EXPORT_SYMBOL(pcibios_fixup_bus);
#endif
/* /*
* Convert from Linux-centric to bus-centric addresses for bridge devices. * Convert from Linux-centric to bus-centric addresses for bridge devices.
...@@ -431,6 +434,7 @@ pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, ...@@ -431,6 +434,7 @@ pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
region->start = res->start - offset; region->start = res->start - offset;
region->end = res->end - offset; region->end = res->end - offset;
} }
EXPORT_SYMBOL(pcibios_resource_to_bus);
void __devinit void __devinit
pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
...@@ -447,12 +451,7 @@ pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, ...@@ -447,12 +451,7 @@ pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
res->start = region->start + offset; res->start = region->start + offset;
res->end = region->end + offset; res->end = region->end + offset;
} }
#ifdef CONFIG_HOTPLUG
EXPORT_SYMBOL(pcibios_fixup_bus);
EXPORT_SYMBOL(pcibios_resource_to_bus);
EXPORT_SYMBOL(pcibios_bus_to_resource); EXPORT_SYMBOL(pcibios_bus_to_resource);
#endif
/* /*
* Swizzle the device pin each time we cross a bridge. * Swizzle the device pin each time we cross a bridge.
......
...@@ -151,6 +151,8 @@ printhex: adr r2, hexbuf ...@@ -151,6 +151,8 @@ printhex: adr r2, hexbuf
b printascii b printascii
ENDPROC(printhex2) ENDPROC(printhex2)
hexbuf: .space 16
.ltorg .ltorg
ENTRY(printascii) ENTRY(printascii)
...@@ -175,5 +177,3 @@ ENTRY(printch) ...@@ -175,5 +177,3 @@ ENTRY(printch)
mov r0, #0 mov r0, #0
b 1b b 1b
ENDPROC(printch) ENDPROC(printch)
hexbuf: .space 16
...@@ -237,7 +237,7 @@ static void ecard_init_pgtables(struct mm_struct *mm) ...@@ -237,7 +237,7 @@ static void ecard_init_pgtables(struct mm_struct *mm)
memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (IO_SIZE / PGDIR_SIZE)); memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (IO_SIZE / PGDIR_SIZE));
src_pgd = pgd_offset(mm, EASI_BASE); src_pgd = pgd_offset(mm, (unsigned long)EASI_BASE);
dst_pgd = pgd_offset(mm, EASI_START); dst_pgd = pgd_offset(mm, EASI_START);
memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (EASI_SIZE / PGDIR_SIZE)); memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (EASI_SIZE / PGDIR_SIZE));
...@@ -674,44 +674,37 @@ static int __init ecard_probeirqhw(void) ...@@ -674,44 +674,37 @@ static int __init ecard_probeirqhw(void)
#define ecard_probeirqhw() (0) #define ecard_probeirqhw() (0)
#endif #endif
#ifndef IO_EC_MEMC8_BASE static void __iomem *__ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed)
#define IO_EC_MEMC8_BASE 0
#endif
static unsigned int __ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed)
{ {
unsigned long address = 0; void __iomem *address = NULL;
int slot = ec->slot_no; int slot = ec->slot_no;
if (ec->slot_no == 8) if (ec->slot_no == 8)
return IO_EC_MEMC8_BASE; return ECARD_MEMC8_BASE;
ectcr &= ~(1 << slot); ectcr &= ~(1 << slot);
switch (type) { switch (type) {
case ECARD_MEMC: case ECARD_MEMC:
if (slot < 4) if (slot < 4)
address = IO_EC_MEMC_BASE + (slot << 12); address = ECARD_MEMC_BASE + (slot << 14);
break; break;
case ECARD_IOC: case ECARD_IOC:
if (slot < 4) if (slot < 4)
address = IO_EC_IOC_BASE + (slot << 12); address = ECARD_IOC_BASE + (slot << 14);
#ifdef IO_EC_IOC4_BASE
else else
address = IO_EC_IOC4_BASE + ((slot - 4) << 12); address = ECARD_IOC4_BASE + ((slot - 4) << 14);
#endif
if (address) if (address)
address += speed << 17; address += speed << 19;
break; break;
#ifdef IO_EC_EASI_BASE
case ECARD_EASI: case ECARD_EASI:
address = IO_EC_EASI_BASE + (slot << 22); address = ECARD_EASI_BASE + (slot << 24);
if (speed == ECARD_FAST) if (speed == ECARD_FAST)
ectcr |= 1 << slot; ectcr |= 1 << slot;
break; break;
#endif
default: default:
break; break;
} }
...@@ -990,6 +983,7 @@ ecard_probe(int slot, card_type_t type) ...@@ -990,6 +983,7 @@ ecard_probe(int slot, card_type_t type)
ecard_t **ecp; ecard_t **ecp;
ecard_t *ec; ecard_t *ec;
struct ex_ecid cid; struct ex_ecid cid;
void __iomem *addr;
int i, rc; int i, rc;
ec = ecard_alloc_card(type, slot); ec = ecard_alloc_card(type, slot);
...@@ -999,7 +993,7 @@ ecard_probe(int slot, card_type_t type) ...@@ -999,7 +993,7 @@ ecard_probe(int slot, card_type_t type)
} }
rc = -ENODEV; rc = -ENODEV;
if ((ec->podaddr = __ecard_address(ec, type, ECARD_SYNC)) == 0) if ((addr = __ecard_address(ec, type, ECARD_SYNC)) == NULL)
goto nodev; goto nodev;
cid.r_zero = 1; cid.r_zero = 1;
...@@ -1019,7 +1013,7 @@ ecard_probe(int slot, card_type_t type) ...@@ -1019,7 +1013,7 @@ ecard_probe(int slot, card_type_t type)
ec->cid.fiqmask = cid.r_fiqmask; ec->cid.fiqmask = cid.r_fiqmask;
ec->cid.fiqoff = ecard_gets24(cid.r_fiqoff); ec->cid.fiqoff = ecard_gets24(cid.r_fiqoff);
ec->fiqaddr = ec->fiqaddr =
ec->irqaddr = (void __iomem *)ioaddr(ec->podaddr); ec->irqaddr = addr;
if (ec->cid.is) { if (ec->cid.is) {
ec->irqmask = ec->cid.irqmask; ec->irqmask = ec->cid.irqmask;
...@@ -1048,10 +1042,8 @@ ecard_probe(int slot, card_type_t type) ...@@ -1048,10 +1042,8 @@ ecard_probe(int slot, card_type_t type)
set_irq_flags(ec->irq, IRQF_VALID); set_irq_flags(ec->irq, IRQF_VALID);
} }
#ifdef IO_EC_MEMC8_BASE
if (slot == 8) if (slot == 8)
ec->irq = 11; ec->irq = 11;
#endif
#ifdef CONFIG_ARCH_RPC #ifdef CONFIG_ARCH_RPC
/* On RiscPC, only first two slots have DMA capability */ /* On RiscPC, only first two slots have DMA capability */
if (slot < 2) if (slot < 2)
...@@ -1097,9 +1089,7 @@ static int __init ecard_init(void) ...@@ -1097,9 +1089,7 @@ static int __init ecard_init(void)
ecard_probe(slot, ECARD_IOC); ecard_probe(slot, ECARD_IOC);
} }
#ifdef IO_EC_MEMC8_BASE
ecard_probe(8, ECARD_IOC); ecard_probe(8, ECARD_IOC);
#endif
irqhw = ecard_probeirqhw(); irqhw = ecard_probeirqhw();
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <asm/unwind.h> #include <asm/unwind.h>
#include <asm/unistd.h> #include <asm/unistd.h>
#include <asm/tls.h> #include <asm/tls.h>
#include <asm/system.h>
#include "entry-header.S" #include "entry-header.S"
#include <asm/entry-macro-multi.S> #include <asm/entry-macro-multi.S>
...@@ -262,8 +263,7 @@ __und_svc: ...@@ -262,8 +263,7 @@ __und_svc:
ldr r0, [r4, #-4] ldr r0, [r4, #-4]
#else #else
ldrh r0, [r4, #-2] @ Thumb instruction at LR - 2 ldrh r0, [r4, #-2] @ Thumb instruction at LR - 2
and r9, r0, #0xf800 cmp r0, #0xe800 @ 32-bit instruction if xx >= 0
cmp r9, #0xe800 @ 32-bit instruction if xx >= 0
ldrhhs r9, [r4] @ bottom 16 bits ldrhhs r9, [r4] @ bottom 16 bits
orrhs r0, r9, r0, lsl #16 orrhs r0, r9, r0, lsl #16
#endif #endif
...@@ -440,18 +440,46 @@ __und_usr: ...@@ -440,18 +440,46 @@ __und_usr:
#endif #endif
beq call_fpe beq call_fpe
@ Thumb instruction @ Thumb instruction
#if __LINUX_ARM_ARCH__ >= 7 #if CONFIG_ARM_THUMB && __LINUX_ARM_ARCH__ >= 6 && CONFIG_CPU_V7
/*
* Thumb-2 instruction handling. Note that because pre-v6 and >= v6 platforms
* can never be supported in a single kernel, this code is not applicable at
* all when __LINUX_ARM_ARCH__ < 6. This allows simplifying assumptions to be
* made about .arch directives.
*/
#if __LINUX_ARM_ARCH__ < 7
/* If the target CPU may not be Thumb-2-capable, a run-time check is needed: */
#define NEED_CPU_ARCHITECTURE
ldr r5, .LCcpu_architecture
ldr r5, [r5]
cmp r5, #CPU_ARCH_ARMv7
blo __und_usr_unknown
/*
* The following code won't get run unless the running CPU really is v7, so
* coding round the lack of ldrht on older arches is pointless. Temporarily
* override the assembler target arch with the minimum required instead:
*/
.arch armv6t2
#endif
2: 2:
ARM( ldrht r5, [r4], #2 ) ARM( ldrht r5, [r4], #2 )
THUMB( ldrht r5, [r4] ) THUMB( ldrht r5, [r4] )
THUMB( add r4, r4, #2 ) THUMB( add r4, r4, #2 )
and r0, r5, #0xf800 @ mask bits 111x x... .... .... cmp r5, #0xe800 @ 32bit instruction if xx != 0
cmp r0, #0xe800 @ 32bit instruction if xx != 0
blo __und_usr_unknown blo __und_usr_unknown
3: ldrht r0, [r4] 3: ldrht r0, [r4]
add r2, r2, #2 @ r2 is PC + 2, make it PC + 4 add r2, r2, #2 @ r2 is PC + 2, make it PC + 4
orr r0, r0, r5, lsl #16 orr r0, r0, r5, lsl #16
#if __LINUX_ARM_ARCH__ < 7
/* If the target arch was overridden, change it back: */
#ifdef CONFIG_CPU_32v6K
.arch armv6k
#else #else
.arch armv6
#endif
#endif /* __LINUX_ARM_ARCH__ < 7 */
#else /* !(CONFIG_ARM_THUMB && __LINUX_ARM_ARCH__ >= 6 && CONFIG_CPU_V7) */
b __und_usr_unknown b __und_usr_unknown
#endif #endif
UNWIND(.fnend ) UNWIND(.fnend )
...@@ -578,6 +606,12 @@ call_fpe: ...@@ -578,6 +606,12 @@ call_fpe:
movw_pc lr @ CP#14 (Debug) movw_pc lr @ CP#14 (Debug)
movw_pc lr @ CP#15 (Control) movw_pc lr @ CP#15 (Control)
#ifdef NEED_CPU_ARCHITECTURE
.align 2
.LCcpu_architecture:
.word __cpu_architecture
#endif
#ifdef CONFIG_NEON #ifdef CONFIG_NEON
.align 6 .align 6
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <asm/memory.h> #include <asm/memory.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/pgtable.h>
#ifdef CONFIG_DEBUG_LL #ifdef CONFIG_DEBUG_LL
#include <mach/debug-macro.S> #include <mach/debug-macro.S>
...@@ -38,11 +39,14 @@ ...@@ -38,11 +39,14 @@
#error KERNEL_RAM_VADDR must start at 0xXXXX8000 #error KERNEL_RAM_VADDR must start at 0xXXXX8000
#endif #endif
#define PG_DIR_SIZE 0x4000
#define PMD_ORDER 2
.globl swapper_pg_dir .globl swapper_pg_dir
.equ swapper_pg_dir, KERNEL_RAM_VADDR - 0x4000 .equ swapper_pg_dir, KERNEL_RAM_VADDR - PG_DIR_SIZE
.macro pgtbl, rd, phys .macro pgtbl, rd, phys
add \rd, \phys, #TEXT_OFFSET - 0x4000 add \rd, \phys, #TEXT_OFFSET - PG_DIR_SIZE
.endm .endm
#ifdef CONFIG_XIP_KERNEL #ifdef CONFIG_XIP_KERNEL
...@@ -148,11 +152,11 @@ __create_page_tables: ...@@ -148,11 +152,11 @@ __create_page_tables:
pgtbl r4, r8 @ page table address pgtbl r4, r8 @ page table address
/* /*
* Clear the 16K level 1 swapper page table * Clear the swapper page table
*/ */
mov r0, r4 mov r0, r4
mov r3, #0 mov r3, #0
add r6, r0, #0x4000 add r6, r0, #PG_DIR_SIZE
1: str r3, [r0], #4 1: str r3, [r0], #4
str r3, [r0], #4 str r3, [r0], #4
str r3, [r0], #4 str r3, [r0], #4
...@@ -171,30 +175,30 @@ __create_page_tables: ...@@ -171,30 +175,30 @@ __create_page_tables:
sub r0, r0, r3 @ virt->phys offset sub r0, r0, r3 @ virt->phys offset
add r5, r5, r0 @ phys __enable_mmu add r5, r5, r0 @ phys __enable_mmu
add r6, r6, r0 @ phys __enable_mmu_end add r6, r6, r0 @ phys __enable_mmu_end
mov r5, r5, lsr #20 mov r5, r5, lsr #SECTION_SHIFT
mov r6, r6, lsr #20 mov r6, r6, lsr #SECTION_SHIFT
1: orr r3, r7, r5, lsl #20 @ flags + kernel base 1: orr r3, r7, r5, lsl #SECTION_SHIFT @ flags + kernel base
str r3, [r4, r5, lsl #2] @ identity mapping str r3, [r4, r5, lsl #PMD_ORDER] @ identity mapping
teq r5, r6 cmp r5, r6
addne r5, r5, #1 @ next section addlo r5, r5, #1 @ next section
bne 1b blo 1b
/* /*
* Now setup the pagetables for our kernel direct * Now setup the pagetables for our kernel direct
* mapped region. * mapped region.
*/ */
mov r3, pc mov r3, pc
mov r3, r3, lsr #20 mov r3, r3, lsr #SECTION_SHIFT
orr r3, r7, r3, lsl #20 orr r3, r7, r3, lsl #SECTION_SHIFT
add r0, r4, #(KERNEL_START & 0xff000000) >> 18 add r0, r4, #(KERNEL_START & 0xff000000) >> (SECTION_SHIFT - PMD_ORDER)
str r3, [r0, #(KERNEL_START & 0x00f00000) >> 18]! str r3, [r0, #((KERNEL_START & 0x00f00000) >> SECTION_SHIFT) << PMD_ORDER]!
ldr r6, =(KERNEL_END - 1) ldr r6, =(KERNEL_END - 1)
add r0, r0, #4 add r0, r0, #1 << PMD_ORDER
add r6, r4, r6, lsr #18 add r6, r4, r6, lsr #(SECTION_SHIFT - PMD_ORDER)
1: cmp r0, r6 1: cmp r0, r6
add r3, r3, #1 << 20 add r3, r3, #1 << SECTION_SHIFT
strls r3, [r0], #4 strls r3, [r0], #1 << PMD_ORDER
bls 1b bls 1b
#ifdef CONFIG_XIP_KERNEL #ifdef CONFIG_XIP_KERNEL
...@@ -203,11 +207,11 @@ __create_page_tables: ...@@ -203,11 +207,11 @@ __create_page_tables:
*/ */
add r3, r8, #TEXT_OFFSET add r3, r8, #TEXT_OFFSET
orr r3, r3, r7 orr r3, r3, r7
add r0, r4, #(KERNEL_RAM_VADDR & 0xff000000) >> 18 add r0, r4, #(KERNEL_RAM_VADDR & 0xff000000) >> (SECTION_SHIFT - PMD_ORDER)
str r3, [r0, #(KERNEL_RAM_VADDR & 0x00f00000) >> 18]! str r3, [r0, #(KERNEL_RAM_VADDR & 0x00f00000) >> (SECTION_SHIFT - PMD_ORDER)]!
ldr r6, =(_end - 1) ldr r6, =(_end - 1)
add r0, r0, #4 add r0, r0, #4
add r6, r4, r6, lsr #18 add r6, r4, r6, lsr #(SECTION_SHIFT - PMD_ORDER)
1: cmp r0, r6 1: cmp r0, r6
add r3, r3, #1 << 20 add r3, r3, #1 << 20
strls r3, [r0], #4 strls r3, [r0], #4
...@@ -218,12 +222,12 @@ __create_page_tables: ...@@ -218,12 +222,12 @@ __create_page_tables:
* Then map boot params address in r2 or * Then map boot params address in r2 or
* the first 1MB of ram if boot params address is not specified. * the first 1MB of ram if boot params address is not specified.
*/ */
mov r0, r2, lsr #20 mov r0, r2, lsr #SECTION_SHIFT
movs r0, r0, lsl #20 movs r0, r0, lsl #SECTION_SHIFT
moveq r0, r8 moveq r0, r8
sub r3, r0, r8 sub r3, r0, r8
add r3, r3, #PAGE_OFFSET add r3, r3, #PAGE_OFFSET
add r3, r4, r3, lsr #18 add r3, r4, r3, lsr #(SECTION_SHIFT - PMD_ORDER)
orr r6, r7, r0 orr r6, r7, r0
str r6, [r3] str r6, [r3]
...@@ -236,21 +240,21 @@ __create_page_tables: ...@@ -236,21 +240,21 @@ __create_page_tables:
*/ */
addruart r7, r3 addruart r7, r3
mov r3, r3, lsr #20 mov r3, r3, lsr #SECTION_SHIFT
mov r3, r3, lsl #2 mov r3, r3, lsl #PMD_ORDER
add r0, r4, r3 add r0, r4, r3
rsb r3, r3, #0x4000 @ PTRS_PER_PGD*sizeof(long) rsb r3, r3, #0x4000 @ PTRS_PER_PGD*sizeof(long)
cmp r3, #0x0800 @ limit to 512MB cmp r3, #0x0800 @ limit to 512MB
movhi r3, #0x0800 movhi r3, #0x0800
add r6, r0, r3 add r6, r0, r3
mov r3, r7, lsr #20 mov r3, r7, lsr #SECTION_SHIFT
ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags
orr r3, r7, r3, lsl #20 orr r3, r7, r3, lsl #SECTION_SHIFT
1: str r3, [r0], #4 1: str r3, [r0], #4
add r3, r3, #1 << 20 add r3, r3, #1 << SECTION_SHIFT
teq r0, r6 cmp r0, r6
bne 1b blo 1b
#else /* CONFIG_DEBUG_ICEDCC */ #else /* CONFIG_DEBUG_ICEDCC */
/* we don't need any serial debugging mappings for ICEDCC */ /* we don't need any serial debugging mappings for ICEDCC */
...@@ -262,7 +266,7 @@ __create_page_tables: ...@@ -262,7 +266,7 @@ __create_page_tables:
* If we're using the NetWinder or CATS, we also need to map * If we're using the NetWinder or CATS, we also need to map
* in the 16550-type serial port for the debug messages * in the 16550-type serial port for the debug messages
*/ */
add r0, r4, #0xff000000 >> 18 add r0, r4, #0xff000000 >> (SECTION_SHIFT - PMD_ORDER)
orr r3, r7, #0x7c000000 orr r3, r7, #0x7c000000
str r3, [r0] str r3, [r0]
#endif #endif
...@@ -272,10 +276,10 @@ __create_page_tables: ...@@ -272,10 +276,10 @@ __create_page_tables:
* Similar reasons here - for debug. This is * Similar reasons here - for debug. This is
* only for Acorn RiscPC architectures. * only for Acorn RiscPC architectures.
*/ */
add r0, r4, #0x02000000 >> 18 add r0, r4, #0x02000000 >> (SECTION_SHIFT - PMD_ORDER)
orr r3, r7, #0x02000000 orr r3, r7, #0x02000000
str r3, [r0] str r3, [r0]
add r0, r4, #0xd8000000 >> 18 add r0, r4, #0xd8000000 >> (SECTION_SHIFT - PMD_ORDER)
str r3, [r0] str r3, [r0]
#endif #endif
#endif #endif
...@@ -488,13 +492,8 @@ __fixup_pv_table: ...@@ -488,13 +492,8 @@ __fixup_pv_table:
add r5, r5, r3 @ adjust table end address add r5, r5, r3 @ adjust table end address
add r7, r7, r3 @ adjust __pv_phys_offset address add r7, r7, r3 @ adjust __pv_phys_offset address
str r8, [r7] @ save computed PHYS_OFFSET to __pv_phys_offset str r8, [r7] @ save computed PHYS_OFFSET to __pv_phys_offset
#ifndef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
mov r6, r3, lsr #24 @ constant for add/sub instructions mov r6, r3, lsr #24 @ constant for add/sub instructions
teq r3, r6, lsl #24 @ must be 16MiB aligned teq r3, r6, lsl #24 @ must be 16MiB aligned
#else
mov r6, r3, lsr #16 @ constant for add/sub instructions
teq r3, r6, lsl #16 @ must be 64kiB aligned
#endif
THUMB( it ne @ cross section branch ) THUMB( it ne @ cross section branch )
bne __error bne __error
str r6, [r7, #4] @ save to __pv_offset str r6, [r7, #4] @ save to __pv_offset
...@@ -510,20 +509,8 @@ ENDPROC(__fixup_pv_table) ...@@ -510,20 +509,8 @@ ENDPROC(__fixup_pv_table)
.text .text
__fixup_a_pv_table: __fixup_a_pv_table:
#ifdef CONFIG_THUMB2_KERNEL #ifdef CONFIG_THUMB2_KERNEL
#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT lsls r6, #24
lsls r0, r6, #24 beq 2f
lsr r6, #8
beq 1f
clz r7, r0
lsr r0, #24
lsl r0, r7
bic r0, 0x0080
lsrs r7, #1
orrcs r0, #0x0080
orr r0, r0, r7, lsl #12
#endif
1: lsls r6, #24
beq 4f
clz r7, r6 clz r7, r6
lsr r6, #24 lsr r6, #24
lsl r6, r7 lsl r6, r7
...@@ -532,43 +519,25 @@ __fixup_a_pv_table: ...@@ -532,43 +519,25 @@ __fixup_a_pv_table:
orrcs r6, #0x0080 orrcs r6, #0x0080
orr r6, r6, r7, lsl #12 orr r6, r6, r7, lsl #12
orr r6, #0x4000 orr r6, #0x4000
b 4f b 2f
2: @ at this point the C flag is always clear 1: add r7, r3
add r7, r3 ldrh ip, [r7, #2]
#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
ldrh ip, [r7]
tst ip, 0x0400 @ the i bit tells us LS or MS byte
beq 3f
cmp r0, #0 @ set C flag, and ...
biceq ip, 0x0400 @ immediate zero value has a special encoding
streqh ip, [r7] @ that requires the i bit cleared
#endif
3: ldrh ip, [r7, #2]
and ip, 0x8f00 and ip, 0x8f00
orrcc ip, r6 @ mask in offset bits 31-24 orr ip, r6 @ mask in offset bits 31-24
orrcs ip, r0 @ mask in offset bits 23-16
strh ip, [r7, #2] strh ip, [r7, #2]
4: cmp r4, r5 2: cmp r4, r5
ldrcc r7, [r4], #4 @ use branch for delay slot ldrcc r7, [r4], #4 @ use branch for delay slot
bcc 2b bcc 1b
bx lr bx lr
#else #else
#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT b 2f
and r0, r6, #255 @ offset bits 23-16 1: ldr ip, [r7, r3]
mov r6, r6, lsr #8 @ offset bits 31-24
#else
mov r0, #0 @ just in case...
#endif
b 3f
2: ldr ip, [r7, r3]
bic ip, ip, #0x000000ff bic ip, ip, #0x000000ff
tst ip, #0x400 @ rotate shift tells us LS or MS byte orr ip, ip, r6 @ mask in offset bits 31-24
orrne ip, ip, r6 @ mask in offset bits 31-24
orreq ip, ip, r0 @ mask in offset bits 23-16
str ip, [r7, r3] str ip, [r7, r3]
3: cmp r4, r5 2: cmp r4, r5
ldrcc r7, [r4], #4 @ use branch for delay slot ldrcc r7, [r4], #4 @ use branch for delay slot
bcc 2b bcc 1b
mov pc, lr mov pc, lr
#endif #endif
ENDPROC(__fixup_a_pv_table) ENDPROC(__fixup_a_pv_table)
......
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
#include <linux/list.h> #include <linux/list.h>
#include <linux/kallsyms.h> #include <linux/kallsyms.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/ftrace.h>
#include <asm/exception.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
......
...@@ -32,6 +32,24 @@ static atomic_t waiting_for_crash_ipi; ...@@ -32,6 +32,24 @@ static atomic_t waiting_for_crash_ipi;
int machine_kexec_prepare(struct kimage *image) int machine_kexec_prepare(struct kimage *image)
{ {
unsigned long page_list;
void *reboot_code_buffer;
page_list = image->head & PAGE_MASK;
reboot_code_buffer = page_address(image->control_code_page);
/* Prepare parameters for reboot_code_buffer*/
kexec_start_address = image->start;
kexec_indirection_page = page_list;
kexec_mach_type = machine_arch_type;
kexec_boot_atags = image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET;
/* copy our kernel relocation code to the control code page */
memcpy(reboot_code_buffer,
relocate_new_kernel, relocate_new_kernel_size);
flush_icache_range((unsigned long) reboot_code_buffer,
(unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE);
return 0; return 0;
} }
...@@ -82,31 +100,14 @@ void (*kexec_reinit)(void); ...@@ -82,31 +100,14 @@ void (*kexec_reinit)(void);
void machine_kexec(struct kimage *image) void machine_kexec(struct kimage *image)
{ {
unsigned long page_list;
unsigned long reboot_code_buffer_phys; unsigned long reboot_code_buffer_phys;
void *reboot_code_buffer; void *reboot_code_buffer;
page_list = image->head & PAGE_MASK;
/* we need both effective and real address here */ /* we need both effective and real address here */
reboot_code_buffer_phys = reboot_code_buffer_phys =
page_to_pfn(image->control_code_page) << PAGE_SHIFT; page_to_pfn(image->control_code_page) << PAGE_SHIFT;
reboot_code_buffer = page_address(image->control_code_page); reboot_code_buffer = page_address(image->control_code_page);
/* Prepare parameters for reboot_code_buffer*/
kexec_start_address = image->start;
kexec_indirection_page = page_list;
kexec_mach_type = machine_arch_type;
kexec_boot_atags = image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET;
/* copy our kernel relocation code to the control code page */
memcpy(reboot_code_buffer,
relocate_new_kernel, relocate_new_kernel_size);
flush_icache_range((unsigned long) reboot_code_buffer,
(unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE);
printk(KERN_INFO "Bye!\n"); printk(KERN_INFO "Bye!\n");
if (kexec_reinit) if (kexec_reinit)
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
* recompiling the whole kernel when CONFIG_XIP_KERNEL is turned on/off. * recompiling the whole kernel when CONFIG_XIP_KERNEL is turned on/off.
*/ */
#undef MODULES_VADDR #undef MODULES_VADDR
#define MODULES_VADDR (((unsigned long)_etext + ~PGDIR_MASK) & PGDIR_MASK) #define MODULES_VADDR (((unsigned long)_etext + ~PMD_MASK) & PMD_MASK)
#endif #endif
#ifdef CONFIG_MMU #ifdef CONFIG_MMU
......
...@@ -319,7 +319,7 @@ void show_regs(struct pt_regs * regs) ...@@ -319,7 +319,7 @@ void show_regs(struct pt_regs * regs)
printk("\n"); printk("\n");
printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm); printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm);
__show_regs(regs); __show_regs(regs);
__backtrace(); dump_stack();
} }
ATOMIC_NOTIFIER_HEAD(thread_notify_head); ATOMIC_NOTIFIER_HEAD(thread_notify_head);
......
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/memblock.h> #include <linux/memblock.h>
#include <linux/bug.h>
#include <linux/compiler.h>
#include <asm/unified.h> #include <asm/unified.h>
#include <asm/cpu.h> #include <asm/cpu.h>
...@@ -42,6 +44,7 @@ ...@@ -42,6 +44,7 @@
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/cachetype.h> #include <asm/cachetype.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/system.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -115,6 +118,13 @@ struct outer_cache_fns outer_cache __read_mostly; ...@@ -115,6 +118,13 @@ struct outer_cache_fns outer_cache __read_mostly;
EXPORT_SYMBOL(outer_cache); EXPORT_SYMBOL(outer_cache);
#endif #endif
/*
* Cached cpu_architecture() result for use by assembler code.
* C code should use the cpu_architecture() function instead of accessing this
* variable directly.
*/
int __cpu_architecture __read_mostly = CPU_ARCH_UNKNOWN;
struct stack { struct stack {
u32 irq[3]; u32 irq[3];
u32 abt[3]; u32 abt[3];
...@@ -210,7 +220,7 @@ static const char *proc_arch[] = { ...@@ -210,7 +220,7 @@ static const char *proc_arch[] = {
"?(17)", "?(17)",
}; };
int cpu_architecture(void) static int __get_cpu_architecture(void)
{ {
int cpu_arch; int cpu_arch;
...@@ -243,11 +253,22 @@ int cpu_architecture(void) ...@@ -243,11 +253,22 @@ int cpu_architecture(void)
return cpu_arch; return cpu_arch;
} }
int __pure cpu_architecture(void)
{
BUG_ON(__cpu_architecture == CPU_ARCH_UNKNOWN);
return __cpu_architecture;
}
static int cpu_has_aliasing_icache(unsigned int arch) static int cpu_has_aliasing_icache(unsigned int arch)
{ {
int aliasing_icache; int aliasing_icache;
unsigned int id_reg, num_sets, line_size; unsigned int id_reg, num_sets, line_size;
/* PIPT caches never alias. */
if (icache_is_pipt())
return 0;
/* arch specifies the register format */ /* arch specifies the register format */
switch (arch) { switch (arch) {
case CPU_ARCH_ARMv7: case CPU_ARCH_ARMv7:
...@@ -282,8 +303,14 @@ static void __init cacheid_init(void) ...@@ -282,8 +303,14 @@ static void __init cacheid_init(void)
/* ARMv7 register format */ /* ARMv7 register format */
arch = CPU_ARCH_ARMv7; arch = CPU_ARCH_ARMv7;
cacheid = CACHEID_VIPT_NONALIASING; cacheid = CACHEID_VIPT_NONALIASING;
if ((cachetype & (3 << 14)) == 1 << 14) switch (cachetype & (3 << 14)) {
case (1 << 14):
cacheid |= CACHEID_ASID_TAGGED; cacheid |= CACHEID_ASID_TAGGED;
break;
case (3 << 14):
cacheid |= CACHEID_PIPT;
break;
}
} else { } else {
arch = CPU_ARCH_ARMv6; arch = CPU_ARCH_ARMv6;
if (cachetype & (1 << 23)) if (cachetype & (1 << 23))
...@@ -300,10 +327,11 @@ static void __init cacheid_init(void) ...@@ -300,10 +327,11 @@ static void __init cacheid_init(void)
printk("CPU: %s data cache, %s instruction cache\n", printk("CPU: %s data cache, %s instruction cache\n",
cache_is_vivt() ? "VIVT" : cache_is_vivt() ? "VIVT" :
cache_is_vipt_aliasing() ? "VIPT aliasing" : cache_is_vipt_aliasing() ? "VIPT aliasing" :
cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown", cache_is_vipt_nonaliasing() ? "PIPT / VIPT nonaliasing" : "unknown",
cache_is_vivt() ? "VIVT" : cache_is_vivt() ? "VIVT" :
icache_is_vivt_asid_tagged() ? "VIVT ASID tagged" : icache_is_vivt_asid_tagged() ? "VIVT ASID tagged" :
icache_is_vipt_aliasing() ? "VIPT aliasing" : icache_is_vipt_aliasing() ? "VIPT aliasing" :
icache_is_pipt() ? "PIPT" :
cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown"); cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown");
} }
...@@ -414,6 +442,7 @@ static void __init setup_processor(void) ...@@ -414,6 +442,7 @@ static void __init setup_processor(void)
} }
cpu_name = list->cpu_name; cpu_name = list->cpu_name;
__cpu_architecture = __get_cpu_architecture();
#ifdef MULTI_CPU #ifdef MULTI_CPU
processor = *list->proc; processor = *list->proc;
...@@ -861,7 +890,7 @@ static struct machine_desc * __init setup_machine_tags(unsigned int nr) ...@@ -861,7 +890,7 @@ static struct machine_desc * __init setup_machine_tags(unsigned int nr)
} }
if (mdesc->fixup) if (mdesc->fixup)
mdesc->fixup(mdesc, tags, &from, &meminfo); mdesc->fixup(tags, &from, &meminfo);
if (tags->hdr.tag == ATAG_CORE) { if (tags->hdr.tag == ATAG_CORE) {
if (meminfo.nr_banks != 0) if (meminfo.nr_banks != 0)
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <linux/cache.h> #include <linux/cache.h>
#include <linux/profile.h> #include <linux/profile.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/ftrace.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/cpu.h> #include <linux/cpu.h>
...@@ -31,6 +30,8 @@ ...@@ -31,6 +30,8 @@
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/cpu.h> #include <asm/cpu.h>
#include <asm/cputype.h> #include <asm/cputype.h>
#include <asm/exception.h>
#include <asm/topology.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
...@@ -39,6 +40,7 @@ ...@@ -39,6 +40,7 @@
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/localtimer.h> #include <asm/localtimer.h>
#include <asm/smp_plat.h>
/* /*
* as from 2.5, kernels no longer have an init_tasks structure * as from 2.5, kernels no longer have an init_tasks structure
...@@ -259,6 +261,20 @@ void __ref cpu_die(void) ...@@ -259,6 +261,20 @@ void __ref cpu_die(void)
} }
#endif /* CONFIG_HOTPLUG_CPU */ #endif /* CONFIG_HOTPLUG_CPU */
int __cpu_logical_map[NR_CPUS];
void __init smp_setup_processor_id(void)
{
int i;
u32 cpu = is_smp() ? read_cpuid_mpidr() & 0xff : 0;
cpu_logical_map(0) = cpu;
for (i = 1; i < NR_CPUS; ++i)
cpu_logical_map(i) = i == cpu ? 0 : i;
printk(KERN_INFO "Booting Linux on physical CPU %d\n", cpu);
}
/* /*
* Called by both boot and secondaries to move global data into * Called by both boot and secondaries to move global data into
* per-processor storage. * per-processor storage.
...@@ -268,6 +284,8 @@ static void __cpuinit smp_store_cpu_info(unsigned int cpuid) ...@@ -268,6 +284,8 @@ static void __cpuinit smp_store_cpu_info(unsigned int cpuid)
struct cpuinfo_arm *cpu_info = &per_cpu(cpu_data, cpuid); struct cpuinfo_arm *cpu_info = &per_cpu(cpu_data, cpuid);
cpu_info->loops_per_jiffy = loops_per_jiffy; cpu_info->loops_per_jiffy = loops_per_jiffy;
store_cpu_topology(cpuid);
} }
/* /*
...@@ -301,17 +319,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void) ...@@ -301,17 +319,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
*/ */
platform_secondary_init(cpu); platform_secondary_init(cpu);
/*
* Enable local interrupts.
*/
notify_cpu_starting(cpu); notify_cpu_starting(cpu);
local_irq_enable();
local_fiq_enable();
/*
* Setup the percpu timer for this CPU.
*/
percpu_timer_setup();
calibrate_delay(); calibrate_delay();
...@@ -323,9 +331,22 @@ asmlinkage void __cpuinit secondary_start_kernel(void) ...@@ -323,9 +331,22 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
* before we continue. * before we continue.
*/ */
set_cpu_online(cpu, true); set_cpu_online(cpu, true);
/*
* Setup the percpu timer for this CPU.
*/
percpu_timer_setup();
while (!cpu_active(cpu)) while (!cpu_active(cpu))
cpu_relax(); cpu_relax();
/*
* cpu_active bit is set, so it's safe to enalbe interrupts
* now.
*/
local_irq_enable();
local_fiq_enable();
/* /*
* OK, it's off to the idle thread for us * OK, it's off to the idle thread for us
*/ */
...@@ -358,6 +379,8 @@ void __init smp_prepare_cpus(unsigned int max_cpus) ...@@ -358,6 +379,8 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
{ {
unsigned int ncores = num_possible_cpus(); unsigned int ncores = num_possible_cpus();
init_cpu_topology();
smp_store_cpu_info(smp_processor_id()); smp_store_cpu_info(smp_processor_id());
/* /*
...@@ -459,6 +482,11 @@ static void ipi_timer(void) ...@@ -459,6 +482,11 @@ static void ipi_timer(void)
#ifdef CONFIG_LOCAL_TIMERS #ifdef CONFIG_LOCAL_TIMERS
asmlinkage void __exception_irq_entry do_local_timer(struct pt_regs *regs) asmlinkage void __exception_irq_entry do_local_timer(struct pt_regs *regs)
{
handle_local_timer(regs);
}
void handle_local_timer(struct pt_regs *regs)
{ {
struct pt_regs *old_regs = set_irq_regs(regs); struct pt_regs *old_regs = set_irq_regs(regs);
int cpu = smp_processor_id(); int cpu = smp_processor_id();
...@@ -566,6 +594,11 @@ static void ipi_cpu_stop(unsigned int cpu) ...@@ -566,6 +594,11 @@ static void ipi_cpu_stop(unsigned int cpu)
* Main handler for inter-processor interrupts * Main handler for inter-processor interrupts
*/ */
asmlinkage void __exception_irq_entry do_IPI(int ipinr, struct pt_regs *regs) asmlinkage void __exception_irq_entry do_IPI(int ipinr, struct pt_regs *regs)
{
handle_IPI(ipinr, regs);
}
void handle_IPI(int ipinr, struct pt_regs *regs)
{ {
unsigned int cpu = smp_processor_id(); unsigned int cpu = smp_processor_id();
struct pt_regs *old_regs = set_irq_regs(regs); struct pt_regs *old_regs = set_irq_regs(regs);
......
...@@ -34,7 +34,7 @@ unsigned int __init scu_get_core_count(void __iomem *scu_base) ...@@ -34,7 +34,7 @@ unsigned int __init scu_get_core_count(void __iomem *scu_base)
/* /*
* Enable the SCU * Enable the SCU
*/ */
void __init scu_enable(void __iomem *scu_base) void scu_enable(void __iomem *scu_base)
{ {
u32 scu_ctrl; u32 scu_ctrl;
......
...@@ -39,13 +39,11 @@ ...@@ -39,13 +39,11 @@
*/ */
static struct sys_timer *system_timer; static struct sys_timer *system_timer;
#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \
defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE)
/* this needs a better home */ /* this needs a better home */
DEFINE_SPINLOCK(rtc_lock); DEFINE_SPINLOCK(rtc_lock);
#ifdef CONFIG_RTC_DRV_CMOS_MODULE
EXPORT_SYMBOL(rtc_lock); EXPORT_SYMBOL(rtc_lock);
#endif
#endif /* pc-style 'CMOS' RTC support */ #endif /* pc-style 'CMOS' RTC support */
/* change this if you have some constant time drift */ /* change this if you have some constant time drift */
......
/*
* arch/arm/kernel/topology.c
*
* Copyright (C) 2011 Linaro Limited.
* Written by: Vincent Guittot
*
* based on arch/sh/kernel/topology.c
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#include <linux/cpu.h>
#include <linux/cpumask.h>
#include <linux/init.h>
#include <linux/percpu.h>
#include <linux/node.h>
#include <linux/nodemask.h>
#include <linux/sched.h>
#include <asm/cputype.h>
#include <asm/topology.h>
#define MPIDR_SMP_BITMASK (0x3 << 30)
#define MPIDR_SMP_VALUE (0x2 << 30)
#define MPIDR_MT_BITMASK (0x1 << 24)
/*
* These masks reflect the current use of the affinity levels.
* The affinity level can be up to 16 bits according to ARM ARM
*/
#define MPIDR_LEVEL0_MASK 0x3
#define MPIDR_LEVEL0_SHIFT 0
#define MPIDR_LEVEL1_MASK 0xF
#define MPIDR_LEVEL1_SHIFT 8
#define MPIDR_LEVEL2_MASK 0xFF
#define MPIDR_LEVEL2_SHIFT 16
struct cputopo_arm cpu_topology[NR_CPUS];
const struct cpumask *cpu_coregroup_mask(unsigned int cpu)
{
return &cpu_topology[cpu].core_sibling;
}
/*
* store_cpu_topology is called at boot when only one cpu is running
* and with the mutex cpu_hotplug.lock locked, when several cpus have booted,
* which prevents simultaneous write access to cpu_topology array
*/
void store_cpu_topology(unsigned int cpuid)
{
struct cputopo_arm *cpuid_topo = &cpu_topology[cpuid];
unsigned int mpidr;
unsigned int cpu;
/* If the cpu topology has been already set, just return */
if (cpuid_topo->core_id != -1)
return;
mpidr = read_cpuid_mpidr();
/* create cpu topology mapping */
if ((mpidr & MPIDR_SMP_BITMASK) == MPIDR_SMP_VALUE) {
/*
* This is a multiprocessor system
* multiprocessor format & multiprocessor mode field are set
*/
if (mpidr & MPIDR_MT_BITMASK) {
/* core performance interdependency */
cpuid_topo->thread_id = (mpidr >> MPIDR_LEVEL0_SHIFT)
& MPIDR_LEVEL0_MASK;
cpuid_topo->core_id = (mpidr >> MPIDR_LEVEL1_SHIFT)
& MPIDR_LEVEL1_MASK;
cpuid_topo->socket_id = (mpidr >> MPIDR_LEVEL2_SHIFT)
& MPIDR_LEVEL2_MASK;
} else {
/* largely independent cores */
cpuid_topo->thread_id = -1;
cpuid_topo->core_id = (mpidr >> MPIDR_LEVEL0_SHIFT)
& MPIDR_LEVEL0_MASK;
cpuid_topo->socket_id = (mpidr >> MPIDR_LEVEL1_SHIFT)
& MPIDR_LEVEL1_MASK;
}
} else {
/*
* This is an uniprocessor system
* we are in multiprocessor format but uniprocessor system
* or in the old uniprocessor format
*/
cpuid_topo->thread_id = -1;
cpuid_topo->core_id = 0;
cpuid_topo->socket_id = -1;
}
/* update core and thread sibling masks */
for_each_possible_cpu(cpu) {
struct cputopo_arm *cpu_topo = &cpu_topology[cpu];
if (cpuid_topo->socket_id == cpu_topo->socket_id) {
cpumask_set_cpu(cpuid, &cpu_topo->core_sibling);
if (cpu != cpuid)
cpumask_set_cpu(cpu,
&cpuid_topo->core_sibling);
if (cpuid_topo->core_id == cpu_topo->core_id) {
cpumask_set_cpu(cpuid,
&cpu_topo->thread_sibling);
if (cpu != cpuid)
cpumask_set_cpu(cpu,
&cpuid_topo->thread_sibling);
}
}
}
smp_wmb();
printk(KERN_INFO "CPU%u: thread %d, cpu %d, socket %d, mpidr %x\n",
cpuid, cpu_topology[cpuid].thread_id,
cpu_topology[cpuid].core_id,
cpu_topology[cpuid].socket_id, mpidr);
}
/*
* init_cpu_topology is called at boot when only one cpu is running
* which prevent simultaneous write access to cpu_topology array
*/
void init_cpu_topology(void)
{
unsigned int cpu;
/* init core mask */
for_each_possible_cpu(cpu) {
struct cputopo_arm *cpu_topo = &(cpu_topology[cpu]);
cpu_topo->thread_id = -1;
cpu_topo->core_id = -1;
cpu_topo->socket_id = -1;
cpumask_clear(&cpu_topo->core_sibling);
cpumask_clear(&cpu_topo->thread_sibling);
}
smp_wmb();
}
...@@ -21,12 +21,14 @@ ...@@ -21,12 +21,14 @@
#include <linux/kdebug.h> #include <linux/kdebug.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/kexec.h> #include <linux/kexec.h>
#include <linux/bug.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/atomic.h> #include <linux/atomic.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/exception.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/unistd.h> #include <asm/unistd.h>
#include <asm/traps.h> #include <asm/traps.h>
...@@ -270,6 +272,8 @@ void die(const char *str, struct pt_regs *regs, int err) ...@@ -270,6 +272,8 @@ void die(const char *str, struct pt_regs *regs, int err)
spin_lock_irq(&die_lock); spin_lock_irq(&die_lock);
console_verbose(); console_verbose();
bust_spinlocks(1); bust_spinlocks(1);
if (!user_mode(regs))
report_bug(regs->ARM_pc, regs);
ret = __die(str, err, thread, regs); ret = __die(str, err, thread, regs);
if (regs && kexec_should_crash(thread->task)) if (regs && kexec_should_crash(thread->task))
...@@ -301,6 +305,24 @@ void arm_notify_die(const char *str, struct pt_regs *regs, ...@@ -301,6 +305,24 @@ void arm_notify_die(const char *str, struct pt_regs *regs,
} }
} }
#ifdef CONFIG_GENERIC_BUG
int is_valid_bugaddr(unsigned long pc)
{
#ifdef CONFIG_THUMB2_KERNEL
unsigned short bkpt;
#else
unsigned long bkpt;
#endif
if (probe_kernel_address((unsigned *)pc, bkpt))
return 0;
return bkpt == BUG_INSTR_VALUE;
}
#endif
static LIST_HEAD(undef_hook); static LIST_HEAD(undef_hook);
static DEFINE_SPINLOCK(undef_lock); static DEFINE_SPINLOCK(undef_lock);
...@@ -706,16 +728,6 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs) ...@@ -706,16 +728,6 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs)
arm_notify_die("unknown data abort code", regs, &info, instr, 0); arm_notify_die("unknown data abort code", regs, &info, instr, 0);
} }
void __attribute__((noreturn)) __bug(const char *file, int line)
{
printk(KERN_CRIT"kernel BUG at %s:%d!\n", file, line);
*(int *)0 = 0;
/* Avoid "noreturn function does return" */
for (;;);
}
EXPORT_SYMBOL(__bug);
void __readwrite_bug(const char *fn) void __readwrite_bug(const char *fn)
{ {
printk("%s called, but not implemented\n", fn); printk("%s called, but not implemented\n", fn);
......
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
#define ARM_CPU_KEEP(x) #define ARM_CPU_KEEP(x)
#endif #endif
#if defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK) #if (defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK)) || \
defined(CONFIG_GENERIC_BUG)
#define ARM_EXIT_KEEP(x) x #define ARM_EXIT_KEEP(x) x
#define ARM_EXIT_DISCARD(x) #define ARM_EXIT_DISCARD(x)
#else #else
......
...@@ -22,15 +22,10 @@ ...@@ -22,15 +22,10 @@
#define mask r7 #define mask r7
#define offset r8 #define offset r8
ENTRY(__backtrace)
mov r1, #0x10
mov r0, fp
ENTRY(c_backtrace) ENTRY(c_backtrace)
#if !defined(CONFIG_FRAME_POINTER) || !defined(CONFIG_PRINTK) #if !defined(CONFIG_FRAME_POINTER) || !defined(CONFIG_PRINTK)
mov pc, lr mov pc, lr
ENDPROC(__backtrace)
ENDPROC(c_backtrace) ENDPROC(c_backtrace)
#else #else
stmfd sp!, {r4 - r8, lr} @ Save an extra register so we have a location... stmfd sp!, {r4 - r8, lr} @ Save an extra register so we have a location...
...@@ -107,7 +102,6 @@ for_each_frame: tst frame, mask @ Check for address exceptions ...@@ -107,7 +102,6 @@ for_each_frame: tst frame, mask @ Check for address exceptions
mov r1, frame mov r1, frame
bl printk bl printk
no_frame: ldmfd sp!, {r4 - r8, pc} no_frame: ldmfd sp!, {r4 - r8, pc}
ENDPROC(__backtrace)
ENDPROC(c_backtrace) ENDPROC(c_backtrace)
.pushsection __ex_table,"a" .pushsection __ex_table,"a"
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
*/ */
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/unwind.h>
#ifdef __ARMEB__ #ifdef __ARMEB__
#define xh r0 #define xh r0
...@@ -44,6 +45,7 @@ ...@@ -44,6 +45,7 @@
*/ */
ENTRY(__do_div64) ENTRY(__do_div64)
UNWIND(.fnstart)
@ Test for easy paths first. @ Test for easy paths first.
subs ip, r4, #1 subs ip, r4, #1
...@@ -189,7 +191,12 @@ ENTRY(__do_div64) ...@@ -189,7 +191,12 @@ ENTRY(__do_div64)
moveq yh, xh moveq yh, xh
moveq xh, #0 moveq xh, #0
moveq pc, lr moveq pc, lr
UNWIND(.fnend)
UNWIND(.fnstart)
UNWIND(.pad #4)
UNWIND(.save {lr})
Ldiv0_64:
@ Division by 0: @ Division by 0:
str lr, [sp, #-8]! str lr, [sp, #-8]!
bl __div0 bl __div0
...@@ -200,4 +207,5 @@ ENTRY(__do_div64) ...@@ -200,4 +207,5 @@ ENTRY(__do_div64)
mov xh, #0 mov xh, #0
ldr pc, [sp], #8 ldr pc, [sp], #8
UNWIND(.fnend)
ENDPROC(__do_div64) ENDPROC(__do_div64)
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/hardirq.h> /* for in_atomic() */ #include <linux/hardirq.h> /* for in_atomic() */
#include <linux/gfp.h> #include <linux/gfp.h>
#include <linux/highmem.h>
#include <asm/current.h> #include <asm/current.h>
#include <asm/page.h> #include <asm/page.h>
......
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
# INITRD_PHYS must be in RAM # INITRD_PHYS must be in RAM
ifeq ($(CONFIG_ARCH_AT91CAP9),y) ifeq ($(CONFIG_ARCH_AT91CAP9),y)
zreladdr-y := 0x70008000 zreladdr-y += 0x70008000
params_phys-y := 0x70000100 params_phys-y := 0x70000100
initrd_phys-y := 0x70410000 initrd_phys-y := 0x70410000
else ifeq ($(CONFIG_ARCH_AT91SAM9G45),y) else ifeq ($(CONFIG_ARCH_AT91SAM9G45),y)
zreladdr-y := 0x70008000 zreladdr-y += 0x70008000
params_phys-y := 0x70000100 params_phys-y := 0x70000100
initrd_phys-y := 0x70410000 initrd_phys-y := 0x70410000
else else
zreladdr-y := 0x20008000 zreladdr-y += 0x20008000
params_phys-y := 0x20000100 params_phys-y := 0x20000100
initrd_phys-y := 0x20410000 initrd_phys-y := 0x20410000
endif endif
# Address where decompressor will be written and eventually executed. # Address where decompressor will be written and eventually executed.
# #
# default to SDRAM # default to SDRAM
zreladdr-y := $(CONFIG_BCM_ZRELADDR) zreladdr-y += $(CONFIG_BCM_ZRELADDR)
params_phys-y := 0x00000800 params_phys-y := 0x00000800
...@@ -136,8 +136,8 @@ static void __init bcmring_init_machine(void) ...@@ -136,8 +136,8 @@ static void __init bcmring_init_machine(void)
* *
*****************************************************************************/ *****************************************************************************/
static void __init bcmring_fixup(struct machine_desc *desc, static void __init bcmring_fixup(struct tag *t, char **cmdline,
struct tag *t, char **cmdline, struct meminfo *mi) { struct meminfo *mi) {
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
printk(KERN_NOTICE "bcmring_fixup\n"); printk(KERN_NOTICE "bcmring_fixup\n");
t->hdr.tag = ATAG_CORE; t->hdr.tag = ATAG_CORE;
......
# The standard locations for stuff on CLPS711x type processors # The standard locations for stuff on CLPS711x type processors
zreladdr-y := 0xc0028000 zreladdr-y += 0xc0028000
params_phys-y := 0xc0000100 params_phys-y := 0xc0000100
# Should probably have some agreement on these... # Should probably have some agreement on these...
initrd_phys-$(CONFIG_ARCH_P720T) := 0xc0400000 initrd_phys-$(CONFIG_ARCH_P720T) := 0xc0400000
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
#include "common.h" #include "common.h"
static void __init static void __init
fixup_clep7312(struct machine_desc *desc, struct tag *tags, fixup_clep7312(struct tag *tags, char **cmdline, struct meminfo *mi)
char **cmdline, struct meminfo *mi)
{ {
mi->nr_banks=1; mi->nr_banks=1;
mi->bank[0].start = 0xc0000000; mi->bank[0].start = 0xc0000000;
......
...@@ -37,8 +37,7 @@ static void __init edb7211_reserve(void) ...@@ -37,8 +37,7 @@ static void __init edb7211_reserve(void)
} }
static void __init static void __init
fixup_edb7211(struct machine_desc *desc, struct tag *tags, fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi)
char **cmdline, struct meminfo *mi)
{ {
/* /*
* Bank start addresses are not present in the information * Bank start addresses are not present in the information
......
...@@ -57,8 +57,7 @@ typedef struct tag_IMAGE_PARAMS ...@@ -57,8 +57,7 @@ typedef struct tag_IMAGE_PARAMS
#define IMAGE_PARAMS_PHYS 0xC01F0000 #define IMAGE_PARAMS_PHYS 0xC01F0000
static void __init static void __init
fortunet_fixup(struct machine_desc *desc, struct tag *tags, fortunet_fixup(struct tag *tags, char **cmdline, struct meminfo *mi)
char **cmdline, struct meminfo *mi)
{ {
IMAGE_PARAMS *ip = phys_to_virt(IMAGE_PARAMS_PHYS); IMAGE_PARAMS *ip = phys_to_virt(IMAGE_PARAMS_PHYS);
*cmdline = phys_to_virt(ip->command_line); *cmdline = phys_to_virt(ip->command_line);
......
...@@ -56,8 +56,7 @@ static struct map_desc p720t_io_desc[] __initdata = { ...@@ -56,8 +56,7 @@ static struct map_desc p720t_io_desc[] __initdata = {
}; };
static void __init static void __init
fixup_p720t(struct machine_desc *desc, struct tag *tag, fixup_p720t(struct tag *tag, char **cmdline, struct meminfo *mi)
char **cmdline, struct meminfo *mi)
{ {
/* /*
* Our bootloader doesn't setup any tags (yet). * Our bootloader doesn't setup any tags (yet).
......
zreladdr-y := 0x00008000 zreladdr-y += 0x00008000
params_phys-y := 0x00000100 params_phys-y := 0x00000100
initrd_phys-y := 0x00C00000 initrd_phys-y := 0x00C00000
...@@ -2,12 +2,12 @@ ifeq ($(CONFIG_ARCH_DAVINCI_DA8XX),y) ...@@ -2,12 +2,12 @@ ifeq ($(CONFIG_ARCH_DAVINCI_DA8XX),y)
ifeq ($(CONFIG_ARCH_DAVINCI_DMx),y) ifeq ($(CONFIG_ARCH_DAVINCI_DMx),y)
$(error Cannot enable DaVinci and DA8XX platforms concurrently) $(error Cannot enable DaVinci and DA8XX platforms concurrently)
else else
zreladdr-y := 0xc0008000 zreladdr-y += 0xc0008000
params_phys-y := 0xc0000100 params_phys-y := 0xc0000100
initrd_phys-y := 0xc0800000 initrd_phys-y := 0xc0800000
endif endif
else else
zreladdr-y := 0x80008000 zreladdr-y += 0x80008000
params_phys-y := 0x80000100 params_phys-y := 0x80000100
initrd_phys-y := 0x80800000 initrd_phys-y := 0x80800000
endif endif
zreladdr-y := 0x00008000 zreladdr-y += 0x00008000
params_phys-y := 0x00000100 params_phys-y := 0x00000100
initrd_phys-y := 0x00800000 initrd_phys-y := 0x00800000
zreladdr-y := 0x00008000 zreladdr-y += 0x00008000
params_phys-y := 0x00000400 params_phys-y := 0x00000400
initrd_phys-y := 0x00800000 initrd_phys-y := 0x00800000
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
#ifndef __ASM_ARM_ARCH_IO_H #ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H #define __ASM_ARM_ARCH_IO_H
#define IO_SPACE_LIMIT 0xffff
u8 __inb8(unsigned int port); u8 __inb8(unsigned int port);
void __outb8(u8 val, unsigned int port); void __outb8(u8 val, unsigned int port);
......
zreladdr-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) := 0x00008000 zreladdr-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) += 0x00008000
params_phys-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) := 0x00000100 params_phys-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) := 0x00000100
zreladdr-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) := 0xc0008000 zreladdr-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) += 0xc0008000
params_phys-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) := 0xc0000100 params_phys-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) := 0xc0000100
zreladdr-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) := 0xd0008000 zreladdr-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) += 0xd0008000
params_phys-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) := 0xd0000100 params_phys-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) := 0xd0000100
zreladdr-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) := 0xe0008000 zreladdr-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) += 0xe0008000
params_phys-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) := 0xe0000100 params_phys-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) := 0xe0000100
zreladdr-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) := 0xf0008000 zreladdr-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) += 0xf0008000
params_phys-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) := 0xf0000100 params_phys-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) := 0xf0000100
...@@ -12,6 +12,7 @@ if ARCH_EXYNOS4 ...@@ -12,6 +12,7 @@ if ARCH_EXYNOS4
config CPU_EXYNOS4210 config CPU_EXYNOS4210
bool bool
select S3C_PL330_DMA select S3C_PL330_DMA
select ARM_CPU_SUSPEND if PM
help help
Enable EXYNOS4210 CPU support Enable EXYNOS4210 CPU support
......
zreladdr-y := 0x40008000 zreladdr-y += 0x40008000
params_phys-y := 0x40000100 params_phys-y := 0x40000100
...@@ -193,12 +193,10 @@ void __init smp_init_cpus(void) ...@@ -193,12 +193,10 @@ void __init smp_init_cpus(void)
ncores = scu_base ? scu_get_core_count(scu_base) : 1; ncores = scu_base ? scu_get_core_count(scu_base) : 1;
/* sanity check */ /* sanity check */
if (ncores > NR_CPUS) { if (ncores > nr_cpu_ids) {
printk(KERN_WARNING pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
"EXYNOS4: no. of cores (%d) greater than configured " ncores, nr_cpu_ids);
"maximum of %d - clipping\n", ncores = nr_cpu_ids;
ncores, NR_CPUS);
ncores = NR_CPUS;
} }
for (i = 0; i < ncores; i++) for (i = 0; i < ncores; i++)
......
...@@ -4,8 +4,8 @@ menu "Footbridge Implementations" ...@@ -4,8 +4,8 @@ menu "Footbridge Implementations"
config ARCH_CATS config ARCH_CATS
bool "CATS" bool "CATS"
select CLKSRC_I8253
select CLKEVT_I8253 select CLKEVT_I8253
select CLKSRC_I8253
select FOOTBRIDGE_HOST select FOOTBRIDGE_HOST
select ISA select ISA
select ISA_DMA select ISA_DMA
...@@ -61,8 +61,8 @@ config ARCH_EBSA285_HOST ...@@ -61,8 +61,8 @@ config ARCH_EBSA285_HOST
config ARCH_NETWINDER config ARCH_NETWINDER
bool "NetWinder" bool "NetWinder"
select CLKSRC_I8253
select CLKEVT_I8253 select CLKEVT_I8253
select CLKSRC_I8253
select FOOTBRIDGE_HOST select FOOTBRIDGE_HOST
select ISA select ISA
select ISA_DMA select ISA_DMA
......
zreladdr-y := 0x00008000 zreladdr-y += 0x00008000
params_phys-y := 0x00000100 params_phys-y := 0x00000100
initrd_phys-y := 0x00800000 initrd_phys-y := 0x00800000
...@@ -76,8 +76,7 @@ __initcall(cats_hw_init); ...@@ -76,8 +76,7 @@ __initcall(cats_hw_init);
* hard reboots fail on early boards. * hard reboots fail on early boards.
*/ */
static void __init static void __init
fixup_cats(struct machine_desc *desc, struct tag *tags, fixup_cats(struct tag *tags, char **cmdline, struct meminfo *mi)
char **cmdline, struct meminfo *mi)
{ {
screen_info.orig_video_lines = 25; screen_info.orig_video_lines = 25;
screen_info.orig_video_points = 16; screen_info.orig_video_points = 16;
......
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
#define PCIO_SIZE 0x00100000 #define PCIO_SIZE 0x00100000
#define PCIO_BASE MMU_IO(0xff000000, 0x7c000000) #define PCIO_BASE MMU_IO(0xff000000, 0x7c000000)
#define IO_SPACE_LIMIT 0xffff
/* /*
* Translation of various region addresses to virtual addresses * Translation of various region addresses to virtual addresses
*/ */
......
...@@ -631,8 +631,7 @@ __initcall(nw_hw_init); ...@@ -631,8 +631,7 @@ __initcall(nw_hw_init);
* the parameter page. * the parameter page.
*/ */
static void __init static void __init
fixup_netwinder(struct machine_desc *desc, struct tag *tags, fixup_netwinder(struct tag *tags, char **cmdline, struct meminfo *mi)
char **cmdline, struct meminfo *mi)
{ {
#ifdef CONFIG_ISAPNP #ifdef CONFIG_ISAPNP
extern int isapnp_disable; extern int isapnp_disable;
......
ifeq ($(CONFIG_GEMINI_MEM_SWAP),y) ifeq ($(CONFIG_GEMINI_MEM_SWAP),y)
zreladdr-y := 0x00008000 zreladdr-y += 0x00008000
params_phys-y := 0x00000100 params_phys-y := 0x00000100
initrd_phys-y := 0x00800000 initrd_phys-y := 0x00800000
else else
zreladdr-y := 0x10008000 zreladdr-y += 0x10008000
params_phys-y := 0x10000100 params_phys-y := 0x10000100
initrd_phys-y := 0x10800000 initrd_phys-y := 0x10800000
endif endif
zreladdr-$(CONFIG_ARCH_H720X) := 0x40008000 zreladdr-$(CONFIG_ARCH_H720X) += 0x40008000
zreladdr-$(CONFIG_ARCH_MX1) := 0x08008000 zreladdr-$(CONFIG_ARCH_MX1) += 0x08008000
params_phys-$(CONFIG_ARCH_MX1) := 0x08000100 params_phys-$(CONFIG_ARCH_MX1) := 0x08000100
initrd_phys-$(CONFIG_ARCH_MX1) := 0x08800000 initrd_phys-$(CONFIG_ARCH_MX1) := 0x08800000
zreladdr-$(CONFIG_MACH_MX21) := 0xC0008000 zreladdr-$(CONFIG_MACH_MX21) += 0xC0008000
params_phys-$(CONFIG_MACH_MX21) := 0xC0000100 params_phys-$(CONFIG_MACH_MX21) := 0xC0000100
initrd_phys-$(CONFIG_MACH_MX21) := 0xC0800000 initrd_phys-$(CONFIG_MACH_MX21) := 0xC0800000
zreladdr-$(CONFIG_ARCH_MX25) := 0x80008000 zreladdr-$(CONFIG_ARCH_MX25) += 0x80008000
params_phys-$(CONFIG_ARCH_MX25) := 0x80000100 params_phys-$(CONFIG_ARCH_MX25) := 0x80000100
initrd_phys-$(CONFIG_ARCH_MX25) := 0x80800000 initrd_phys-$(CONFIG_ARCH_MX25) := 0x80800000
zreladdr-$(CONFIG_MACH_MX27) := 0xA0008000 zreladdr-$(CONFIG_MACH_MX27) += 0xA0008000
params_phys-$(CONFIG_MACH_MX27) := 0xA0000100 params_phys-$(CONFIG_MACH_MX27) := 0xA0000100
initrd_phys-$(CONFIG_MACH_MX27) := 0xA0800000 initrd_phys-$(CONFIG_MACH_MX27) := 0xA0800000
zreladdr-$(CONFIG_ARCH_MX3) := 0x80008000 zreladdr-$(CONFIG_ARCH_MX3) += 0x80008000
params_phys-$(CONFIG_ARCH_MX3) := 0x80000100 params_phys-$(CONFIG_ARCH_MX3) := 0x80000100
initrd_phys-$(CONFIG_ARCH_MX3) := 0x80800000 initrd_phys-$(CONFIG_ARCH_MX3) := 0x80800000
zreladdr-y := 0x00008000 zreladdr-y += 0x00008000
params_phys-y := 0x00000100 params_phys-y := 0x00000100
initrd_phys-y := 0x00800000 initrd_phys-y := 0x00800000
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment