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