Commit 7eb4f12e authored by Russell King's avatar Russell King

Merge flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5

into flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5-rmk
parents d8c084f9 3ae93f09
......@@ -15,8 +15,8 @@ GZFLAGS :=-9
CFLAGS :=$(CFLAGS:-O2=-Os)
ifneq ($(CONFIG_NO_FRAME_POINTER),y)
CFLAGS :=$(CFLAGS: -fomit-frame-pointer=)
ifeq ($(CONFIG_FRAME_POINTER),y)
CFLAGS :=$(CFLAGS:-fomit-frame-pointer=-mapcs -mno-sched-prolog)
endif
ifeq ($(CONFIG_DEBUG_INFO),y)
......@@ -179,8 +179,10 @@ FASTFPE_OBJ :=$(FASTFPE)/
endif
# If we have a machine-specific directory, then include it in the build.
core-y += arch/arm/mach-$(MACHINE)/ \
arch/arm/kernel/ arch/arm/mm/
ifneq ($(MACHINE),)
core-y += arch/arm/mach-$(MACHINE)/
endif
core-y += arch/arm/kernel/ arch/arm/mm/
core-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/
core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ)
......
......@@ -76,4 +76,3 @@ __SA1100_start:
mov r0, #0x00200000
1: subs r0, r0, #1
bne 1b
......@@ -533,11 +533,14 @@ source net/bluetooth/Config.in
mainmenu_option next_comment
comment 'Kernel hacking'
# Always compile kernel with framepointer (until 2.4 real comes out)
# Bug reports aren't much use without this.
bool 'Compile kernel without frame pointer' CONFIG_NO_FRAME_POINTER
# RMK wants arm kernels compiled with frame pointers so hardwire this to y. If
# you know what you are doing and are willing to live without stack traces, you
# can get a slightly smaller kernel by setting this option to n, but then RMK
# will have to kill you ;).
define_bool CONFIG_FRAME_POINTER y
bool 'Verbose user fault messages' CONFIG_DEBUG_USER
bool 'Include debugging information in kernel binary' CONFIG_DEBUG_INFO
bool 'Include GDB debugging information in kernel binary' CONFIG_DEBUG_INFO
bool 'Kernel debugging' CONFIG_DEBUG_KERNEL
dep_bool ' Debug memory allocations' CONFIG_DEBUG_SLAB $CONFIG_DEBUG_KERNEL
......@@ -546,6 +549,7 @@ dep_bool ' Spinlock debugging' CONFIG_DEBUG_SPINLOCK $CONFIG_DEBUG_KERNEL
dep_bool ' Wait queue debugging' CONFIG_DEBUG_WAITQ $CONFIG_DEBUG_KERNEL
dep_bool ' Verbose BUG() reporting (adds 70K)' CONFIG_DEBUG_BUGVERBOSE $CONFIG_DEBUG_KERNEL
dep_bool ' Verbose kernel error messages' CONFIG_DEBUG_ERRORS $CONFIG_DEBUG_KERNEL
dep_bool ' Load all symbols for debugging/kksymoops' CONFIG_KALLSYMS $CONFIG_DEBUG_KERNEL $CONFIG_FRAME_POINTER
# These options are only for real kernel hackers who want to get their hands dirty.
dep_bool ' Kernel low-level debugging functions' CONFIG_DEBUG_LL $CONFIG_DEBUG_KERNEL
dep_bool ' Kernel low-level debugging messages via footbridge serial port' CONFIG_DEBUG_DC21285_PORT $CONFIG_DEBUG_LL $CONFIG_FOOTBRIDGE
......
......@@ -669,7 +669,7 @@ CONFIG_PARTITION_ADVANCED=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
......
......@@ -654,7 +654,7 @@ CONFIG_USB_MOUSE=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
# CONFIG_DEBUG_USER is not set
# CONFIG_DEBUG_INFO is not set
......
......@@ -610,7 +610,7 @@ CONFIG_FONT_8x16=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_KERNEL is not set
......
......@@ -954,7 +954,7 @@ CONFIG_SWITCHES_UCB1X00=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
......
......@@ -1141,7 +1141,7 @@ CONFIG_BT_HCIVHCI=m
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_KERNEL=y
......
......@@ -863,7 +863,7 @@ CONFIG_PC_KEYMAP=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
......
......@@ -957,7 +957,7 @@ CONFIG_BT_HCIUART=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
......
......@@ -884,7 +884,7 @@ CONFIG_FONT_8x16=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
......
......@@ -595,7 +595,7 @@ CONFIG_PARTITION_ADVANCED=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
# CONFIG_DEBUG_USER is not set
# CONFIG_DEBUG_INFO is not set
......
......@@ -678,7 +678,7 @@ CONFIG_MSDOS_PARTITION=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
# CONFIG_DEBUG_USER is not set
# CONFIG_DEBUG_INFO is not set
# CONFIG_NO_PGT_CACHE is not set
......
......@@ -886,7 +886,7 @@ CONFIG_SOUND=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
# CONFIG_NO_PGT_CACHE is not set
......
......@@ -577,7 +577,7 @@ CONFIG_MSDOS_PARTITION=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
# CONFIG_NO_PGT_CACHE is not set
......
......@@ -605,7 +605,7 @@ CONFIG_SOUND_UDA1341=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
......
......@@ -625,7 +625,7 @@ CONFIG_SOUND_UDA1341=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
# CONFIG_DEBUG_USER is not set
# CONFIG_DEBUG_INFO is not set
......
......@@ -722,7 +722,7 @@ CONFIG_FONT_8x16=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
......
......@@ -735,7 +735,7 @@ CONFIG_USB_MOUSE=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
......
......@@ -939,7 +939,7 @@ CONFIG_SOUND_H3600_UDA1341=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
# CONFIG_DEBUG_USER is not set
# CONFIG_DEBUG_INFO is not set
......
......@@ -653,7 +653,7 @@ CONFIG_FONT_8x16=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
......
......@@ -786,7 +786,7 @@ CONFIG_MSDOS_PARTITION=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
# CONFIG_NO_PGT_CACHE is not set
......
......@@ -881,7 +881,7 @@ CONFIG_SOUND_SA1100=m
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
# CONFIG_DEBUG_USER is not set
# CONFIG_DEBUG_INFO is not set
# CONFIG_NO_PGT_CACHE is not set
......
......@@ -883,7 +883,7 @@ CONFIG_SOUND_SA1100SSP=m
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
......
......@@ -860,7 +860,7 @@ CONFIG_SOUND_PRIME=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_KERNEL=y
......
......@@ -466,7 +466,7 @@ CONFIG_EXT2_FS=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_KERNEL is not set
......
......@@ -1104,7 +1104,7 @@ CONFIG_USB_OHCI_SA1111=m
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
CONFIG_DEBUG_KERNEL=y
......
......@@ -732,7 +732,7 @@ CONFIG_SOUND_PANGOLIN_UDA1341=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_INFO=y
......
......@@ -773,7 +773,7 @@ CONFIG_USB_MOUSE=m
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_INFO=y
......
......@@ -773,7 +773,7 @@ CONFIG_USB_MOUSE=m
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_INFO=y
......
......@@ -764,7 +764,7 @@ CONFIG_USB_MOUSE=m
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_INFO=y
......
......@@ -773,7 +773,7 @@ CONFIG_USB_MOUSE=m
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_INFO=y
......
......@@ -525,7 +525,7 @@ CONFIG_MSDOS_PARTITION=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
......
......@@ -830,7 +830,7 @@ CONFIG_SOUND_VIDC=m
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
......
......@@ -726,7 +726,7 @@ CONFIG_MCP_UCB1200_TS=y
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
......
......@@ -917,7 +917,7 @@ CONFIG_SOUND_SB=m
#
# Kernel hacking
#
CONFIG_NO_FRAME_POINTER=y
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_KERNEL is not set
......
......@@ -946,7 +946,7 @@ CONFIG_SOUND_H3600_UDA1341=m
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
# CONFIG_DEBUG_USER is not set
# CONFIG_DEBUG_INFO is not set
# CONFIG_NO_PGT_CACHE is not set
......
......@@ -952,7 +952,7 @@ CONFIG_USB_USBNET=m
#
# Kernel hacking
#
# CONFIG_NO_FRAME_POINTER is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_INFO=y
# CONFIG_NO_PGT_CACHE is not set
......
......@@ -127,6 +127,7 @@ EXPORT_SYMBOL(__bad_xchg);
EXPORT_SYMBOL(__readwrite_bug);
EXPORT_SYMBOL(enable_irq);
EXPORT_SYMBOL(disable_irq);
EXPORT_SYMBOL(probe_irq_mask);
EXPORT_SYMBOL(set_irq_type);
EXPORT_SYMBOL(pm_idle);
EXPORT_SYMBOL(pm_power_off);
......
......@@ -259,7 +259,7 @@ struct pci_fixup pcibios_fixups[] = {
}, { 0 }
};
void __init
void __devinit
pcibios_update_resource(struct pci_dev *dev, struct resource *root,
struct resource *res, int resource)
{
......@@ -300,7 +300,7 @@ pcibios_update_resource(struct pci_dev *dev, struct resource *root,
}
}
void __init pcibios_update_irq(struct pci_dev *dev, int irq)
void __devinit pcibios_update_irq(struct pci_dev *dev, int irq)
{
if (debug_pci)
printk("PCI: Assigning IRQ %02d to %s\n", irq, dev->name);
......@@ -321,7 +321,7 @@ static inline int pdev_bad_for_parity(struct pci_dev *dev)
/*
* Adjust the device resources from bus-centric to Linux-centric.
*/
static void __init
static void __devinit
pdev_fixup_device_resources(struct pci_sys_data *root, struct pci_dev *dev)
{
unsigned long offset;
......@@ -340,7 +340,7 @@ pdev_fixup_device_resources(struct pci_sys_data *root, struct pci_dev *dev)
}
}
static void __init
static void __devinit
pbus_assign_bus_resources(struct pci_bus *bus, struct pci_sys_data *root)
{
struct pci_dev *dev = bus->self;
......@@ -359,7 +359,7 @@ pbus_assign_bus_resources(struct pci_bus *bus, struct pci_sys_data *root)
* pcibios_fixup_bus - Called after each bus is probed,
* but before its children are examined.
*/
void __init pcibios_fixup_bus(struct pci_bus *bus)
void __devinit pcibios_fixup_bus(struct pci_bus *bus)
{
struct pci_sys_data *root = bus->sysdata;
struct list_head *walk;
......@@ -428,7 +428,7 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
/*
* Convert from Linux-centric to bus-centric addresses for bridge devices.
*/
void __init
void __devinit
pcibios_fixup_pbus_ranges(struct pci_bus *bus, struct pbus_set_ranges_data *ranges)
{
struct pci_sys_data *root = bus->sysdata;
......@@ -587,12 +587,12 @@ char * __init pcibios_setup(char *str)
void pcibios_align_resource(void *data, struct resource *res,
unsigned long size, unsigned long align)
{
if (res->flags & IORESOURCE_IO) {
unsigned long start = res->start;
if (start & 0x300)
res->start = (start + 0x3ff) & ~0x3ff;
}
if (res->flags & IORESOURCE_IO && start & 0x300)
start = (start + 0x3ff) & ~0x3ff;
res->start = (start + align - 1) & ~(align - 1);
}
/**
......@@ -623,6 +623,13 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
if (r->flags & IORESOURCE_MEM)
cmd |= PCI_COMMAND_MEMORY;
}
/*
* Bridges (eg, cardbus bridges) need to be fully enabled
*/
if ((dev->class >> 16) == PCI_BASE_CLASS_BRIDGE)
cmd |= PCI_COMMAND_IO | PCI_COMMAND_MEMORY;
if (cmd != old_cmd) {
printk("PCI: enabling device %s (%04x -> %04x)\n",
dev->slot_name, old_cmd, cmd);
......
......@@ -26,6 +26,7 @@
* adhering to the above criteria.
*/
#include <linux/config.h>
#include <linux/init.h>
#include "entry-header.S"
.text
......@@ -597,7 +598,7 @@ ENTRY(__switch_to)
* What we need to put into 0-0x1c are branches to branch to the kernel.
*/
.section ".text.init",#alloc,#execinstr
__INIT
.Ljump_addresses:
swi SYS_ERROR0
......
......@@ -14,6 +14,7 @@
* it to save wrong values... Be aware!
*/
#include <linux/config.h>
#include <linux/init.h>
#include "entry-header.S"
#include <asm/thread_info.h>
#include <asm/glue.h>
......@@ -1013,7 +1014,7 @@ ENTRY(__switch_to)
mcr p15, 0, r2, c3, c0 @ Set domain register
ldmib r1, {r4 - sl, fp, sp, pc} @ Load all regs saved previously
.section ".text.init",#alloc,#execinstr
__INIT
/*
* Vector stubs. NOTE that we only align 'vector_IRQ' to a cache line boundary,
* and we rely on each stub being exactly 48 (1.5 cache lines) in size. This
......
......@@ -12,7 +12,7 @@
#endif
.macro zero_fp
#ifndef CONFIG_NO_FRAME_POINTER
#ifdef CONFIG_FRAME_POINTER
mov fp, #0
#endif
.endm
......
......@@ -11,6 +11,7 @@
*/
#include <linux/config.h>
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/assembler.h>
#include <asm/mach-types.h>
......@@ -68,7 +69,7 @@
* crap here - that's what the boot loader (or in extreme, well justified
* circumstances, zImage) is for.
*/
.section ".text.init",#alloc,#execinstr
__INIT
.type stext, #function
ENTRY(stext)
mov r12, r0
......
......@@ -606,6 +606,8 @@ void free_irq(unsigned int irq, void *dev_id)
}
}
static DECLARE_MUTEX(probe_sem);
/* Start the interrupt probing. Unlike other architectures,
* we don't return a mask of interrupts from probe_irq_on,
* but return the number of interrupts enabled for the probe.
......@@ -617,6 +619,8 @@ unsigned long probe_irq_on(void)
unsigned int i, irqs = 0;
unsigned long delay;
down(&probe_sem);
/*
* first snaffle up any unassigned but
* probe-able interrupts
......@@ -656,6 +660,21 @@ unsigned long probe_irq_on(void)
return irqs;
}
unsigned int probe_irq_mask(unsigned long irqs)
{
unsigned int mask = 0, i;
spin_lock_irq(&irq_controller_lock);
for(i = 0; i < 16 && i < NR_IRQS; i++)
if (irq_desc[i].probing && irq_desc[i].triggered)
mask |= 1 << i;
spin_unlock_irq(&irq_controller_lock);
up(&probe_sem);
return mask;
}
/*
* Possible return values:
* >= 0 - interrupt number
......@@ -687,6 +706,8 @@ int probe_irq_off(unsigned long irqs)
out:
spin_unlock_irq(&irq_controller_lock);
up(&probe_sem);
return irq_found;
}
......
......@@ -158,6 +158,8 @@ void show_regs(struct pt_regs * regs)
flags = condition_codes(regs);
print_symbol("PC is at %s\n", instruction_pointer(regs));
print_symbol("LR is at %s\n", regs->ARM_lr);
printk("pc : [<%08lx>] lr : [<%08lx>] %s\n"
"sp : %08lx ip : %08lx fp : %08lx\n",
instruction_pointer(regs),
......
......@@ -170,6 +170,26 @@ static const char *cache_lockdown[16] = {
"undefined 15",
};
static const char *proc_arch[] = {
"undefined/unknown",
"3",
"4",
"4T",
"5",
"5T",
"5TE",
"?(8)",
"?(9)",
"?(10)",
"?(11)",
"?(12)",
"?(13)",
"?(14)",
"?(15)",
"?(16)",
"?(17)",
};
#define CACHE_TYPE(x) (((x) >> 25) & 15)
#define CACHE_S(x) ((x) & (1 << 24))
#define CACHE_DSIZE(x) (((x) >> 12) & 4095) /* only if S=1 */
......@@ -214,6 +234,23 @@ static void __init dump_cpu_info(void)
#define dump_cpu_info() do { } while (0)
#endif
int cpu_architecture(void)
{
int cpu_arch;
if ((processor_id & 0x0000f000) == 0) {
cpu_arch = CPU_ARCH_UNKNOWN;
} else if ((processor_id & 0x0000f000) == 0x00007000) {
cpu_arch = (processor_id & (1 << 23)) ? CPU_ARCH_ARMv4T : CPU_ARCH_ARMv3;
} else {
cpu_arch = (processor_id >> 16) & 15;
if (cpu_arch)
cpu_arch += CPU_ARCH_ARMv3;
}
return cpu_arch;
}
static void __init setup_processor(void)
{
extern struct proc_info_list __proc_info_begin, __proc_info_end;
......@@ -250,9 +287,9 @@ static void __init setup_processor(void)
cpu_user = *list->user;
#endif
printk("CPU: %s %s revision %d\n",
printk("CPU: %s %s revision %d (ARMv%s)\n",
proc_info.manufacturer, proc_info.cpu_name,
(int)processor_id & 15);
(int)processor_id & 15, proc_arch[cpu_architecture()]);
dump_cpu_info();
......@@ -666,25 +703,6 @@ static const char *hwcap_str[] = {
NULL
};
static const char *proc_arch[16] = {
"undefined 0",
"4",
"4T",
"5",
"5T",
"5TE",
"undefined 6",
"undefined 7",
"undefined 8",
"undefined 9",
"undefined 10",
"undefined 11",
"undefined 12",
"undefined 13",
"undefined 14",
"undefined 15"
};
static void
c_show_cache(struct seq_file *m, const char *type, unsigned int cache)
{
......@@ -720,30 +738,23 @@ static int c_show(struct seq_file *m, void *v)
if (elf_hwcap & (1 << i))
seq_printf(m, "%s ", hwcap_str[i]);
seq_puts(m, "\n");
seq_printf(m, "\nCPU implementer\t: 0x%02x\n", processor_id >> 24);
seq_printf(m, "CPU architecture: %s\n", proc_arch[cpu_architecture()]);
if ((processor_id & 0x0000f000) == 0x00000000) {
/* pre-ARM7 */
seq_printf(m, "CPU part\t\t: %07x\n", processor_id >> 4);
} else if ((processor_id & 0x0000f000) == 0x00007000) {
} else {
if ((processor_id & 0x0000f000) == 0x00007000) {
/* ARM7 */
seq_printf(m, "CPU implementor\t: 0x%02x\n"
"CPU architecture: %s\n"
"CPU variant\t: 0x%02x\n"
"CPU part\t: 0x%03x\n",
processor_id >> 24,
processor_id & (1 << 23) ? "4T" : "3",
(processor_id >> 16) & 127,
(processor_id >> 4) & 0xfff);
seq_printf(m, "CPU variant\t: 0x%02x\n",
(processor_id >> 16) & 127);
} else {
/* post-ARM7 */
seq_printf(m, "CPU implementor\t: 0x%02x\n"
"CPU architecture: %s\n"
"CPU variant\t: 0x%x\n"
"CPU part\t: 0x%03x\n",
processor_id >> 24,
proc_arch[(processor_id >> 16) & 15],
(processor_id >> 20) & 15,
seq_printf(m, "CPU variant\t: 0x%x\n",
(processor_id >> 20) & 15);
}
seq_printf(m, "CPU part\t: 0x%03x\n",
(processor_id >> 4) & 0xfff);
}
seq_printf(m, "CPU revision\t: %d\n", processor_id & 15);
......
......@@ -48,6 +48,12 @@ const char *processor_modes[]=
static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" };
void dump_backtrace_entry(unsigned long where, unsigned long from)
{
printk("Function entered at [<%08lx>] from [<%08lx>]\n", where, from);
print_symbol(" %s\n", where);
}
/*
* Stack pointers should always be within the kernels view of
* physical memory. If it is not there, then we can't dump
......@@ -162,6 +168,11 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
c_backtrace(fp, processor_mode(regs));
}
void dump_stack(void)
{
__backtrace();
}
/*
* This is called from SysRq-T (show_task) to display the current call
* trace for each process. This version will also display the running
......@@ -190,6 +201,7 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
console_verbose();
spin_lock_irq(&die_lock);
bust_spinlocks(1);
printk("Internal error: %s: %x\n", str, err);
printk("CPU: %d\n", smp_processor_id());
......@@ -203,6 +215,7 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
dump_instr(regs);
}
bust_spinlocks(0);
spin_unlock_irq(&die_lock);
do_exit(SIGSEGV);
}
......
......@@ -26,12 +26,12 @@ obj-edb7211 := io-acorn.o
obj-y += $(obj-$(MACHINE))
ifeq ($(CONFIG_CPU_32v4),y)
v3 := n
v4 := y
else
ifeq ($(CONFIG_CPU_32v3),y)
v3 := y
v4 := n
else
v3 := n
v4 := y
endif
obj-y += io-readsb.o io-writesb.o
......
......@@ -26,7 +26,7 @@ ENTRY(__backtrace)
ENTRY(c_backtrace)
#ifdef CONFIG_NO_FRAME_POINTER
#ifndef CONFIG_FRAME_POINTER
mov pc, lr
#else
......@@ -62,10 +62,9 @@ ENTRY(c_backtrace)
ldr r3, .Ldsi+4
teq r1, r3
subeq save, save, #4
adr r0, .Lfe
mov r1, save
bic r2, r2, mask
bl printk @ print pc and link register
mov r0, save
bic r1, r2, mask
bl dump_backtrace_entry
ldr r0, [frame, #-8] @ get sp
sub r0, r0, #4
......@@ -140,7 +139,6 @@ ENTRY(c_backtrace)
mov r0, stack
LOADREGS(fd, sp!, {instr, reg, stack, r7, pc})
.Lfe: .asciz "Function entered at [<%p>] from [<%p>]\n"
.Lfp: .asciz " r%d = %08X%c"
.Lcr: .asciz "\n"
.Lbad: .asciz "Backtrace aborted due to bad frame pointer <%p>\n"
......
......@@ -11,6 +11,7 @@
*/
#include <linux/config.h>
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/mach-types.h>
.globl swapper_pg_dir
......@@ -19,7 +20,7 @@
/*
* Entry point.
*/
.section ".text.init",#alloc,#execinstr
__INIT
ENTRY(stext)
__entry: cmp pc, #0x02000000
ldrlt pc, LC0 @ if 0x01800000, call at 0x02080000
......
......@@ -35,7 +35,7 @@ static unsigned long clps711x_gettimeoffset(void)
{
unsigned long hwticks;
hwticks = LATCH - (clps_readl(TC2D) & 0xffff); /* since last underflow */
return (hwticks * tick) / LATCH;
return (hwticks * (tick_nsec / 1000)) / LATCH;
}
void __init clps711x_setup_timer(void)
......
......@@ -10,6 +10,7 @@
* ASM optimised string functions
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/assembler.h>
#include <asm/constants.h>
......@@ -57,7 +58,7 @@ ENTRY(v3_clear_user_page)
bne 1b @ 1
ldr pc, [sp], #4
.section ".text.init", #alloc, #execinstr
__INIT
ENTRY(v3_user_fns)
.long v3_clear_user_page
......
......@@ -10,6 +10,7 @@
* ASM optimised string functions
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/constants.h>
.text
......@@ -70,7 +71,7 @@ ENTRY(v4_mc_clear_user_page)
bne 1b @ 1
ldr pc, [sp], #4
.section ".text.init", #alloc, #execinstr
__INIT
ENTRY(v4_mc_user_fns)
.long v4_mc_clear_user_page
......
......@@ -10,6 +10,7 @@
* ASM optimised string functions
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/constants.h>
.text
......@@ -69,7 +70,7 @@ ENTRY(v4wb_clear_user_page)
mcr p15, 0, r1, c7, c10, 4 @ 1 drain WB
ldr pc, [sp], #4
.section ".text.init", #alloc, #execinstr
__INIT
ENTRY(v4wb_user_fns)
.long v4wb_clear_user_page
......
......@@ -13,6 +13,7 @@
* the only supported cache operation.
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/constants.h>
.text
......@@ -63,7 +64,7 @@ ENTRY(v4wt_clear_user_page)
mcr p15, 0, r2, c7, c7, 0 @ flush ID cache
ldr pc, [sp], #4
.section ".text.init", #alloc, #execinstr
__INIT
ENTRY(v4wt_user_fns)
.long v4wt_clear_user_page
......
......@@ -8,6 +8,7 @@
* published by the Free Software Foundation.
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/constants.h>
/*
......@@ -78,7 +79,7 @@ ENTRY(xscale_mc_clear_user_page)
bne 1b
ldr pc, [sp], #4
.section ".text.init", #alloc, #execinstr
__INIT
ENTRY(xscale_mc_user_fns)
.long xscale_mc_clear_user_page
......
......@@ -169,7 +169,7 @@ alloc_init_section(unsigned long virt, unsigned long phys, int prot)
pmd_t *pmdp, pmd;
pmdp = pmd_offset(pgd_offset_k(virt), virt);
if (virt & (1 << PMD_SHIFT))
if (virt & (1 << 20))
pmdp++;
pmd_val(pmd) = phys | prot;
......@@ -184,7 +184,7 @@ alloc_init_section(unsigned long virt, unsigned long phys, int prot)
* the hardware pte table.
*/
static inline void
alloc_init_page(unsigned long virt, unsigned long phys, int domain, int prot)
alloc_init_page(unsigned long virt, unsigned long phys, unsigned int prot_l1, pgprot_t prot)
{
pmd_t *pmdp, pmd;
pte_t *ptep;
......@@ -195,14 +195,14 @@ alloc_init_page(unsigned long virt, unsigned long phys, int domain, int prot)
ptep = alloc_bootmem_low_pages(2 * PTRS_PER_PTE *
sizeof(pte_t));
pmd_val(pmd) = __pa(ptep) | PMD_TYPE_TABLE | PMD_DOMAIN(domain);
pmd_val(pmd) = __pa(ptep) | prot_l1;
set_pmd(pmdp, pmd);
pmd_val(pmd) += 256 * sizeof(pte_t);
set_pmd(pmdp + 1, pmd);
}
ptep = pte_offset_kernel(pmdp, virt);
set_pte(ptep, pfn_pte(phys >> PAGE_SHIFT, __pgprot(prot)));
set_pte(ptep, pfn_pte(phys >> PAGE_SHIFT, prot));
}
/*
......@@ -217,6 +217,7 @@ static inline void clear_mapping(unsigned long virt)
struct mem_types {
unsigned int prot_pte;
unsigned int prot_l1;
unsigned int prot_sect;
unsigned int domain;
};
......@@ -225,40 +226,82 @@ static struct mem_types mem_types[] __initdata = {
[MT_DEVICE] = {
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
L_PTE_WRITE,
.prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE,
.prot_l1 = PMD_TYPE_TABLE | PMD_BIT4,
.prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_UNCACHED |
PMD_SECT_AP_WRITE,
.domain = DOMAIN_IO,
},
[MT_CACHECLEAN] = {
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
L_PTE_CACHEABLE | L_PTE_BUFFERABLE,
.prot_sect = PMD_TYPE_SECT | PMD_SECT_CACHEABLE |
PMD_SECT_BUFFERABLE,
.prot_l1 = PMD_TYPE_TABLE | PMD_BIT4,
.prot_sect = PMD_TYPE_SECT | PMD_BIT4,
.domain = DOMAIN_KERNEL,
},
[MT_MINICLEAN] = {
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
L_PTE_CACHEABLE,
.prot_sect = PMD_TYPE_SECT | PMD_SECT_CACHEABLE,
.prot_l1 = PMD_TYPE_TABLE | PMD_BIT4,
.prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_MINICACHE,
.domain = DOMAIN_KERNEL,
},
[MT_VECTORS] = {
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
L_PTE_CACHEABLE | L_PTE_BUFFERABLE |
L_PTE_EXEC,
.prot_sect = PMD_TYPE_SECT | PMD_SECT_CACHEABLE |
PMD_SECT_BUFFERABLE,
.prot_l1 = PMD_TYPE_TABLE | PMD_BIT4,
.prot_sect = PMD_TYPE_SECT | PMD_BIT4,
.domain = DOMAIN_USER,
},
[MT_MEMORY] = {
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
L_PTE_CACHEABLE | L_PTE_BUFFERABLE |
L_PTE_EXEC | L_PTE_WRITE,
.prot_sect = PMD_TYPE_SECT | PMD_SECT_CACHEABLE |
PMD_SECT_BUFFERABLE | PMD_SECT_AP_WRITE,
.prot_l1 = PMD_TYPE_TABLE | PMD_BIT4,
.prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_AP_WRITE,
.domain = DOMAIN_KERNEL,
}
};
/*
* Adjust the PMD section entries according to the CPU in use.
*/
static void __init build_mem_type_table(void)
{
int cpu_arch = cpu_architecture();
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
int writethrough = 1;
#else
int writethrough = 0;
#endif
int writealloc = 0, ecc = 0;
if (cpu_arch < CPU_ARCH_ARMv5) {
writealloc = 0;
ecc = 0;
mem_types[MT_MINICACHE].prot_sect &= ~PMD_SECT_TEX(1);
}
if (writethrough) {
mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WT;
mem_types[MT_VECTORS].prot_sect |= PMD_SECT_WT;
mem_types[MT_MEMORY].prot_sect |= PMD_SECT_WT;
} else {
mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WB;
mem_types[MT_VECTORS].prot_sect |= PMD_SECT_WB;
if (writealloc)
mem_types[MT_MEMORY].prot_sect |= PMD_SECT_WBWA;
else
mem_types[MT_MEMORY].prot_sect |= PMD_SECT_WB;
}
if (ecc) {
mem_types[MT_VECTORS].prot_sect |= PMD_PROTECTION;
mem_types[MT_MEMORY].prot_sect |= PMD_PROTECTION;
}
}
/*
* Create the page directory entries and any necessary
* page tables for the mapping specified by `md'. We
......@@ -268,7 +311,8 @@ static struct mem_types mem_types[] __initdata = {
static void __init create_mapping(struct map_desc *md)
{
unsigned long virt, length;
int prot_sect, prot_pte, domain;
int prot_sect, prot_l1, domain;
pgprot_t prot_pte;
long off;
if (md->virtual != vectors_base() && md->virtual < PAGE_OFFSET) {
......@@ -279,7 +323,8 @@ static void __init create_mapping(struct map_desc *md)
}
domain = mem_types[md->type].domain;
prot_pte = mem_types[md->type].prot_pte;
prot_pte = __pgprot(mem_types[md->type].prot_pte);
prot_l1 = mem_types[md->type].prot_l1 | PMD_DOMAIN(domain);
prot_sect = mem_types[md->type].prot_sect | PMD_DOMAIN(domain);
virt = md->virtual;
......@@ -287,7 +332,7 @@ static void __init create_mapping(struct map_desc *md)
length = md->length;
while ((virt & 0xfffff || (virt + off) & 0xfffff) && length >= PAGE_SIZE) {
alloc_init_page(virt, virt + off, domain, prot_pte);
alloc_init_page(virt, virt + off, prot_l1, prot_pte);
virt += PAGE_SIZE;
length -= PAGE_SIZE;
......@@ -301,7 +346,7 @@ static void __init create_mapping(struct map_desc *md)
}
while (length >= PAGE_SIZE) {
alloc_init_page(virt, virt + off, domain, prot_pte);
alloc_init_page(virt, virt + off, prot_l1, prot_pte);
virt += PAGE_SIZE;
length -= PAGE_SIZE;
......@@ -343,6 +388,8 @@ void __init memtable_init(struct meminfo *mi)
unsigned long address = 0;
int i;
build_mem_type_table();
init_maps = p = alloc_bootmem_low_pages(PAGE_SIZE);
for (i = 0; i < mi->nr_banks; i++) {
......
......@@ -26,6 +26,7 @@
*/
#include <linux/linkage.h>
#include <linux/config.h>
#include <linux/init.h>
#include <asm/assembler.h>
#include <asm/constants.h>
#include <asm/procinfo.h>
......@@ -374,11 +375,6 @@ ENTRY(cpu_arm1020_set_pgd)
*/
.align 5
ENTRY(cpu_arm1020_set_pmd)
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
eor r2, r1, #0x0a @ C & Section
tst r2, #0x0b
biceq r1, r1, #4 @ clear bufferable bit
#endif
str r1, [r0]
#ifndef CONFIG_CPU_DCACHE_DISABLE
mcr p15, 0, r0, c7, c10, 4
......@@ -450,7 +446,7 @@ ENTRY(cpu_arm1020_name)
.ascii "\0"
.align
.section ".text.init", #alloc, #execinstr
__INIT
__arm1020_setup:
mov r0, #0
......
......@@ -13,6 +13,7 @@
* and memory functions on ARM2, ARM250 and ARM3 processors.
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/assembler.h>
#include <asm/constants.h>
#include <asm/procinfo.h>
......@@ -280,7 +281,7 @@ _arm2_name: .asciz "ARM 2"
_arm250_name: .asciz "ARM 250"
_arm3_name: .asciz "ARM 3"
.section ".text.init", #alloc, #execinstr
__INIT
/*
* Purpose : Function pointers used to access above functions - all calls
* come through these
......
......@@ -11,6 +11,7 @@
* functions on the ARM610 & ARM710.
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/assembler.h>
#include <asm/constants.h>
#include <asm/procinfo.h>
......@@ -316,7 +317,7 @@ cpu_arm710_name:
.asciz "ARM 710"
.align
.section ".text.init", #alloc, #execinstr
__INIT
__arm6_setup: mov r0, #0
mcr p15, 0, r0, c7, c0 @ flush caches on v3
......
......@@ -31,6 +31,7 @@
* 08-25-2000 DBS Updated for integration of ARM Ltd version.
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/assembler.h>
#include <asm/constants.h>
#include <asm/procinfo.h>
......@@ -177,7 +178,7 @@ cpu_arm720_name:
.asciz "ARM720T"
.align
.section ".text.init", #alloc, #execinstr
__INIT
__arm720_setup: mov r0, #0
mcr p15, 0, r0, c7, c7, 0 @ invalidate caches
......
......@@ -26,6 +26,7 @@
*/
#include <linux/linkage.h>
#include <linux/config.h>
#include <linux/init.h>
#include <asm/assembler.h>
#include <asm/constants.h>
#include <asm/procinfo.h>
......@@ -377,11 +378,6 @@ ENTRY(cpu_arm920_set_pgd)
*/
.align 5
ENTRY(cpu_arm920_set_pmd)
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
eor r2, r1, #0x0a @ C & Section
tst r2, #0x0b
biceq r1, r1, #4 @ clear bufferable bit
#endif
str r1, [r0]
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
mcr p15, 0, r0, c7, c10, 4 @ drain WB
......@@ -443,7 +439,7 @@ ENTRY(cpu_arm920_name)
.ascii "\0"
.align
.section ".text.init", #alloc, #execinstr
__INIT
__arm920_setup:
mov r0, #0
......
......@@ -27,6 +27,7 @@
*/
#include <linux/linkage.h>
#include <linux/config.h>
#include <linux/init.h>
#include <asm/assembler.h>
#include <asm/constants.h>
#include <asm/procinfo.h>
......@@ -378,11 +379,6 @@ ENTRY(cpu_arm922_set_pgd)
*/
.align 5
ENTRY(cpu_arm922_set_pmd)
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
eor r2, r1, #0x0a @ C & Section
tst r2, #0x0b
biceq r1, r1, #4 @ clear bufferable bit
#endif
str r1, [r0]
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
mcr p15, 0, r0, c7, c10, 4 @ drain WB
......@@ -442,7 +438,7 @@ ENTRY(cpu_arm922_name)
.ascii "\0"
.align
.section ".text.init", #alloc, #execinstr
__INIT
__arm922_setup:
mov r0, #0
......
......@@ -26,6 +26,7 @@
*/
#include <linux/linkage.h>
#include <linux/config.h>
#include <linux/init.h>
#include <asm/assembler.h>
#include <asm/constants.h>
#include <asm/procinfo.h>
......@@ -359,11 +360,6 @@ ENTRY(cpu_arm926_set_pgd)
*/
.align 5
ENTRY(cpu_arm926_set_pmd)
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
eor r2, r1, #0x0a @ C & Section
tst r2, #0x0b
biceq r1, r1, #4 @ clear bufferable bit
#endif
str r1, [r0]
#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
......@@ -430,7 +426,7 @@ ENTRY(cpu_arm926_name)
.ascii "\0"
.align
.section ".text.init", #alloc, #execinstr
__INIT
__arm926_setup:
mov r0, #0
......
......@@ -18,6 +18,7 @@
* Flush the read buffer at context switches
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/assembler.h>
#include <asm/constants.h>
#include <asm/procinfo.h>
......@@ -484,7 +485,7 @@ cpu_sa1110_name:
.asciz "StrongARM-1110"
.align
.section ".text.init", #alloc, #execinstr
__INIT
__sa1100_setup: @ Allow read-buffer operations from userland
mcr p15, 0, r0, c9, c0, 5
......
......@@ -21,6 +21,7 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/assembler.h>
#include <asm/constants.h>
#include <asm/procinfo.h>
......@@ -582,11 +583,6 @@ ENTRY(cpu_xscale_set_pgd)
*/
.align 5
ENTRY(cpu_xscale_set_pmd)
#if PMD_CACHE_WRITE_ALLOCATE
and r2, r1, #PMD_TYPE_MASK|PMD_SECT_CACHEABLE|PMD_SECT_BUFFERABLE
cmp r2, #PMD_TYPE_SECT|PMD_SECT_CACHEABLE|PMD_SECT_BUFFERABLE
orreq r1, r1, #PMD_SECT_TEX(1)
#endif
str r1, [r0]
mov ip, #0
mcr p15, 0, r0, c7, c10, 1 @ Clean D cache line
......@@ -668,7 +664,7 @@ cpu_pxa250_name:
.align
.section ".text.init", #alloc, #execinstr
__INIT
__xscale_setup:
mov r0, #PSR_F_BIT|PSR_I_BIT|SVC_MODE
......
......@@ -12,6 +12,7 @@
* Processors: ARM610, ARM710.
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/constants.h>
#include <asm/tlbflush.h>
#include "proc-macros.S"
......@@ -41,7 +42,7 @@ ENTRY(v3_flush_kern_tlb_range)
blo 1b
mov pc, lr
.section ".text.init", #alloc, #execinstr
__INIT
.type v3_tlb_fns, #object
ENTRY(v3_tlb_fns)
......
......@@ -13,6 +13,7 @@
* Processors: ARM720T
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/constants.h>
#include <asm/tlbflush.h>
#include "proc-macros.S"
......@@ -55,7 +56,7 @@ ENTRY(v4_flush_user_tlb_range)
.globl v4_flush_kern_tlb_range
.equ v4_flush_kern_tlb_range, .v4_flush_kern_tlb_range
.section ".text.init", #alloc, #execinstr
__INIT
.type v4_tlb_fns, #object
ENTRY(v4_tlb_fns)
......
......@@ -13,6 +13,7 @@
* Processors: ARM920 ARM922 ARM926 SA110 SA1100 SA1110 XScale
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/constants.h>
#include <asm/tlbflush.h>
#include "proc-macros.S"
......@@ -110,7 +111,7 @@ ENTRY(v4wbi_flush_kern_tlb_range)
blo 1b
mov pc, lr
.section ".text.init", #alloc, #execinstr
__INIT
.type v4wb_tlb_fns, #object
ENTRY(v4wb_tlb_fns)
......
......@@ -11,7 +11,7 @@ SECTIONS
.init : { /* Init code and data */
_stext = .;
__init_begin = .;
*(.text.init)
*(.init.text)
__proc_info_begin = .;
*(.proc.info)
__proc_info_end = .;
......@@ -21,10 +21,10 @@ SECTIONS
__tagtable_begin = .;
*(.taglist)
__tagtable_end = .;
*(.data.init)
*(.init.data)
. = ALIGN(16);
__setup_start = .;
*(.setup.init)
*(.init.setup)
__setup_end = .;
__initcall_start = .;
*(.initcall1.init)
......@@ -44,8 +44,8 @@ SECTIONS
}
/DISCARD/ : { /* Exit code and data */
*(.text.exit)
*(.data.exit)
*(.exit.text)
*(.exit.data)
*(.exitcall.exit)
}
......
......@@ -11,7 +11,7 @@ SECTIONS
.init : { /* Init code and data */
_stext = .;
__init_begin = .;
*(.text.init)
*(.init.text)
__proc_info_begin = .;
*(.proc.info)
__proc_info_end = .;
......@@ -21,10 +21,10 @@ SECTIONS
__tagtable_begin = .;
*(.taglist)
__tagtable_end = .;
*(.data.init)
*(.init.data)
. = ALIGN(16);
__setup_start = .;
*(.setup.init)
*(.init.setup)
__setup_end = .;
__initcall_start = .;
*(.initcall1.init)
......@@ -40,8 +40,8 @@ SECTIONS
}
/DISCARD/ : { /* Exit code and data */
*(.text.exit)
*(.data.exit)
*(.exit.text)
*(.exit.data)
*(.exitcall.exit)
}
......@@ -74,6 +74,12 @@ SECTIONS
__stop___ksymtab = .;
}
__kallsyms : { /* All kernel symbols */
__start___kallsyms = .;
*(__kallsyms)
__stop___kallsyms = .;
}
. = ALIGN(8192);
.data : {
......
......@@ -133,7 +133,7 @@ extern void cpld_modify(int mask, int set);
#define pcibios_assign_all_busses() 1
#define PCIBIOS_MIN_IO 0x6000
#define PCIBIOS_MIN_MEM 0x40000000
#define PCIBIOS_MIN_IO 0x1000
#define PCIBIOS_MIN_MEM 0x81000000
#endif
......@@ -22,7 +22,6 @@
#ifdef __KERNEL__
#include <linux/config.h>
#include <linux/types.h>
#include <asm/byteorder.h>
#include <asm/memory.h>
......@@ -94,6 +93,8 @@ extern void __readwrite_bug(const char *fn);
* Note that we prevent GCC re-ordering or caching values in expressions
* by introducing sequence points into the in*() definitions. Note that
* __raw_* do not guarantee this behaviour.
*
* The {in,out}[bwl] macros are for emulating x86-style PCI/ISA IO space.
*/
#ifdef __io
#define outb(v,p) __raw_writeb(v,__io(p))
......
......@@ -241,7 +241,7 @@ static inline int pci_dma_supported(struct pci_dev *hwdev, u64 mask)
/* kmem_cache style wrapper around pci_alloc_consistent() */
struct pci_pool *pci_pool_create (const char *name, struct pci_dev *dev,
size_t size, size_t align, size_t allocation, int flags);
size_t size, size_t align, size_t allocation);
void pci_pool_destroy (struct pci_pool *pool);
void *pci_pool_alloc (struct pci_pool *pool, int flags, dma_addr_t *handle);
......
......@@ -38,7 +38,7 @@
#define PMD_TYPE_FAULT (0 << 0)
#define PMD_TYPE_TABLE (1 << 0)
#define PMD_TYPE_SECT (2 << 0)
#define PMD_UPDATABLE (1 << 4)
#define PMD_BIT4 (1 << 4)
#define PMD_DOMAIN(x) ((x) << 5)
#define PMD_PROTECTION (1 << 9) /* v5 */
/*
......@@ -49,6 +49,13 @@
#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_UNCACHED (0)
#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)
/*
* - coarse table (not used)
*/
......@@ -184,6 +191,7 @@ PTE_BIT_FUNC(mkyoung, |= L_PTE_YOUNG);
* Mark the prot value as uncacheable and unbufferable.
*/
#define pgprot_noncached(prot) __pgprot(pgprot_val(prot) & ~(L_PTE_CACHEABLE | L_PTE_BUFFERABLE))
#define pgprot_writecombine(prot) __pgprot(pgprot_val(prot) & ~L_PTE_CACHEABLE)
#define pgtable_cache_init() do { } while (0)
......
......@@ -44,6 +44,16 @@ void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int,
extern asmlinkage void __backtrace(void);
#define CPU_ARCH_UNKNOWN 0
#define CPU_ARCH_ARMv3 1
#define CPU_ARCH_ARMv4 2
#define CPU_ARCH_ARMv4T 3
#define CPU_ARCH_ARMv5 4
#define CPU_ARCH_ARMv5T 5
#define CPU_ARCH_ARMv5TE 6
extern int cpu_architecture(void);
/*
* Include processor dependent parts
*/
......
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