Commit 5299b8f7 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk

into ppc970.osdl.org:/home/torvalds/v2.5/linux
parents e004aaa1 cba3066d
ARM Linux 2.4
ARM Linux 2.6
=============
Please check ftp.arm.linux.org.uk:/pub/armlinux for latest updates.
Please check <ftp://ftp.arm.linux.org.uk/pub/armlinux> for
updates.
Compilation of kernel
---------------------
In order to compile ARM Linux, you will need a compiler capable of
generating ARM ELF code with GNU extensions. GCC 2.95.1 and EGCS 1.1.2
are good compilers.
generating ARM ELF code with GNU extensions. GCC 2.95.1, EGCS
1.1.2, and GCC 3.3 are known to be good compilers. Fortunately, you
needn't guess. The kernel will report an error if your compiler is
a recognized offender.
To build ARM Linux natively, you shouldn't have to alter the ARCH = line
in the top level Makefile. However, if you don't have the ARM Linux ELF
......@@ -147,22 +150,49 @@ ST506 hard drives
are welcome.
CONFIG_MACH_ and CONFIG_ARCH_
-----------------------------
A change was made in 2003 to the macro names for new machines.
Historically, CONFIG_ARCH_ was used for the bonafide architecture,
e.g. SA1100, as well as implementations of the architecture,
e.g. Assabet. It was decided to change the implementation macros
to read CONFIG_MACH_ for clarity. Moreover, a retroactive fixup has
not been made because it would complicate patching.
Previous registrations may be found online.
<http://www.arm.linux.org.uk/developer/machines/>
Kernel entry (head-armv.S)
--------------------------
The initial entry into the kernel made via head-armv.S uses architecture
independent code. The architecture is selected by the value of 'r1' on
entry, which must be kept unique. You can register a new architecture
by mailing the following details to rmk@arm.linux.org.uk Please give
the mail a subject of 'Register new architecture':
The initial entry into the kernel is via head-armv.S, which uses machine
independent code. The machine is selected by the value of 'r1' on
entry, which must be kept unique.
Due to the large number of machines which the ARM port of Linux provides
for, we have a method to manage this which ensures that we don't end up
duplicating large amounts of code.
We group machine (or platform) support code into machine classes. A
class typically based around one or more system on a chip devices, and
acts as a natural container around the actual implementations. These
classes are given directories - arch/arm/mach-<class> and
include/asm-arm/arch-<class> - which contain the source files to
support the machine class. This directories also contain any machine
specific supporting code.
For example, the SA1100 class is based upon the SA1100 and SA1110 SoC
devices, and contains the code to support the way the on-board and off-
board devices are used, or the device is setup, and provides that
machine specific "personality."
This fine-grained machine specific selection is controlled by the machine
type ID, which acts both as a run-time and a compile-time code selection
method.
Name: <name of your architecture>
ArchDir: <name of include/asm-arm/arch-* directory>
Type: <MACH_TYPE_* macro name>
Description:
<description of your architecture>
You can register a new machine via the web site at:
Please follow this format - it is an automated system. You should
receive a reply in short order.
<http://www.arm.linux.org.uk/developer/machines/>
---
Russell King (26/01/2001)
Russell King (15/03/2004)
......@@ -657,6 +657,15 @@ config DEBUG_USER
sometimes helpful for debugging but serves no purpose on a
production system. Most people should say N here.
In addition, you need to pass user_debug=N on the kernel command
line to enable this feature. N consists of the sum of:
1 - undefined instruction events
2 - system calls
4 - invalid data aborts
8 - SIGSEGV faults
16 - SIGBUS faults
config DEBUG_INFO
bool "Include GDB debugging information in kernel binary"
help
......
......@@ -88,10 +88,6 @@ EXPORT_SYMBOL_ALIAS(kern_fp_enter,fp_enter);
EXPORT_SYMBOL_ALIAS(fp_printk,printk);
EXPORT_SYMBOL_ALIAS(fp_send_sig,send_sig);
#ifdef CONFIG_VT
EXPORT_SYMBOL(kd_mksound);
#endif
EXPORT_SYMBOL_NOVERS(__do_softirq);
EXPORT_SYMBOL_NOVERS(__backtrace);
......@@ -189,11 +185,6 @@ EXPORT_SYMBOL(__arch_clear_user);
EXPORT_SYMBOL(__arch_strnlen_user);
EXPORT_SYMBOL(__arch_strncpy_from_user);
/* consistent area handling */
EXPORT_SYMBOL(consistent_alloc);
EXPORT_SYMBOL(consistent_free);
EXPORT_SYMBOL(consistent_sync);
EXPORT_SYMBOL_NOVERS(__get_user_1);
EXPORT_SYMBOL_NOVERS(__get_user_2);
EXPORT_SYMBOL_NOVERS(__get_user_4);
......
......@@ -143,6 +143,54 @@ static void dummy_leds_event(led_event_t evt)
void (*leds_event)(led_event_t) = dummy_leds_event;
struct leds_evt_name {
const char name[8];
int on;
int off;
};
static const struct leds_evt_name evt_names[] = {
{ "amber", led_amber_on, led_amber_off },
{ "blue", led_blue_on, led_blue_off },
{ "green", led_green_on, led_green_off },
{ "red", led_red_on, led_red_off },
};
static ssize_t leds_store(struct sys_device *dev, const char *buf, size_t size)
{
int ret = -EINVAL, len = strcspn(buf, " ");
if (len > 0 && buf[len] == '\0')
len--;
if (strncmp(buf, "claim", len) == 0) {
leds_event(led_claim);
ret = size;
} else if (strncmp(buf, "release", len) == 0) {
leds_event(led_release);
ret = size;
} else {
int i;
for (i = 0; i < ARRAY_SIZE(evt_names); i++) {
if (strlen(evt_names[i].name) != len ||
strncmp(buf, evt_names[i].name, len) != 0)
continue;
if (strncmp(buf+len, " on", 3) == 0) {
leds_event(evt_names[i].on);
ret = size;
} else if (strncmp(buf+len, " off", 4) == 0) {
leds_event(evt_names[i].off);
ret = size;
}
break;
}
}
return ret;
}
static SYSDEV_ATTR(event, 0200, NULL, leds_store);
static int leds_suspend(struct sys_device *dev, u32 state)
{
leds_event(led_stop);
......@@ -179,6 +227,8 @@ static int __init leds_init(void)
ret = sysdev_class_register(&leds_sysclass);
if (ret == 0)
ret = sysdev_register(&leds_device);
if (ret == 0)
ret = sysdev_create_file(&leds_device, &attr_event);
return ret;
}
......
......@@ -50,6 +50,17 @@ const char *processor_modes[]=
static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" };
#ifdef CONFIG_DEBUG_USER
unsigned int user_debug;
static int __init user_debug_setup(char *str)
{
get_option(&str, &user_debug);
return 1;
}
__setup("user_debug=", user_debug_setup);
#endif
void dump_backtrace_entry(unsigned long where, unsigned long from)
{
#ifdef CONFIG_KALLSYMS
......@@ -287,9 +298,11 @@ asmlinkage void do_undefinstr(struct pt_regs *regs)
spin_unlock_irq(&undef_lock);
#ifdef CONFIG_DEBUG_USER
if (user_debug & UDBG_UNDEFINED) {
printk(KERN_INFO "%s (%d): undefined instruction: pc=%p\n",
current->comm, current->pid, pc);
dump_instr(regs);
}
#endif
current->thread.error_code = 0;
......@@ -351,9 +364,11 @@ static int bad_syscall(int n, struct pt_regs *regs)
}
#ifdef CONFIG_DEBUG_USER
if (user_debug & UDBG_SYSCALL) {
printk(KERN_ERR "[%d] %s: obsolete system call %08x.\n",
current->pid, current->comm, n);
dump_instr(regs);
}
#endif
info.si_signo = SIGILL;
......@@ -459,12 +474,15 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs)
* experience shows that these seem to indicate that
* something catastrophic has happened
*/
printk("[%d] %s: arm syscall %d\n", current->pid, current->comm, no);
if (user_debug & UDBG_SYSCALL) {
printk("[%d] %s: arm syscall %d\n",
current->pid, current->comm, no);
dump_instr(regs);
if (user_mode(regs)) {
show_regs(regs);
c_backtrace(regs->ARM_fp, processor_mode(regs));
}
}
#endif
info.si_signo = SIGILL;
info.si_errno = 0;
......@@ -495,10 +513,12 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs)
siginfo_t info;
#ifdef CONFIG_DEBUG_USER
if (user_debug & UDBG_BADABORT) {
printk(KERN_ERR "[%d] %s: bad data abort: code %d instr 0x%08lx\n",
current->pid, current->comm, code, instr);
dump_instr(regs);
show_pte(current->mm, addr);
}
#endif
info.si_signo = SIGILL;
......
......@@ -231,6 +231,7 @@ void *consistent_alloc(int gfp, size_t size, dma_addr_t *handle,
no_page:
return ret;
}
EXPORT_SYMBOL(consistent_alloc);
/*
* Since we have the DMA mask available to us here, we could try to do
......@@ -245,7 +246,6 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, int gfp)
return consistent_alloc(gfp, size, handle, 0);
}
EXPORT_SYMBOL(dma_alloc_coherent);
/*
......@@ -312,6 +312,7 @@ void consistent_free(void *vaddr, size_t size, dma_addr_t handle)
"invalid area: %p\n", vaddr);
dump_stack();
}
EXPORT_SYMBOL(consistent_free);
/*
* Initialise the consistent memory allocation.
......@@ -374,3 +375,4 @@ void consistent_sync(void *vaddr, size_t size, int direction)
BUG();
}
}
EXPORT_SYMBOL(consistent_sync);
......@@ -132,10 +132,12 @@ __do_user_fault(struct task_struct *tsk, unsigned long addr,
struct siginfo si;
#ifdef CONFIG_DEBUG_USER
if (user_debug & UDBG_SEGV) {
printk(KERN_DEBUG "%s: unhandled page fault at 0x%08lx, code 0x%03x\n",
tsk->comm, addr, fsr);
show_pte(tsk->mm, addr);
show_regs(regs);
}
#endif
tsk->thread.address = addr;
......@@ -296,8 +298,10 @@ int do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
tsk->thread.trap_no = 14;
force_sig(SIGBUS, tsk);
#ifdef CONFIG_DEBUG_USER
if (user_debug & UDBG_BUS) {
printk(KERN_DEBUG "%s: sigbus at 0x%08lx, pc=0x%08lx\n",
current->comm, addr, instruction_pointer(regs));
}
#endif
/* Kernel mode? Handle exceptions or die */
......
......@@ -6,7 +6,7 @@
# To add an entry into this database, please see Documentation/arm/README,
# or contact rmk@arm.linux.org.uk
#
# Last update: Tue Feb 24 17:17:50 2004
# Last update: Sat Mar 13 14:36:30 2004
#
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
#
......@@ -474,3 +474,14 @@ edb9315 MACH_EDB9315 EDB9315 463
reciva_tt MACH_RECIVA_TT RECIVA_TT 464
cstcb01 MACH_CSTCB01 CSTCB01 465
cstcb1 MACH_CSTCB1 CSTCB1 466
shadwell MACH_SHADWELL SHADWELL 467
goepel263 MACH_GOEPEL263 GOEPEL263 468
acq100 MACH_ACQ100 ACQ100 469
mx1fs2 MACH_MX1FS2 MX1FS2 470
hiptop_g1 MACH_HIPTOP_G1 HIPTOP_G1 471
sparky MACH_SPARKY SPARKY 472
ns9750 MACH_NS9750 NS9750 473
phoenix MACH_PHOENIX PHOENIX 474
vr1000 MACH_VR1000 VR1000 475
deisterpxa MACH_DEISTERPXA DEISTERPXA 476
bcm1160 MACH_BCM1160 BCM1160 477
......@@ -510,6 +510,7 @@ static struct uart_driver serial21285_reg = {
.owner = THIS_MODULE,
.driver_name = "ttyFB",
.dev_name = "ttyFB",
.devfs_name = "ttyFB",
.major = SERIAL_21285_MAJOR,
.minor = SERIAL_21285_MINOR,
.nr = 1,
......
......@@ -4,6 +4,7 @@
#include <linux/config.h>
#include <linux/cache.h>
#include <linux/threads.h>
#include <asm/irq.h>
typedef struct {
unsigned int __softirq_pending;
......
......@@ -93,6 +93,14 @@ extern int cpu_architecture(void);
extern unsigned long cr_no_alignment; /* defined in entry-armv.S */
extern unsigned long cr_alignment; /* defined in entry-armv.S */
#define UDBG_UNDEFINED (1 << 0)
#define UDBG_SYSCALL (1 << 1)
#define UDBG_BADABORT (1 << 2)
#define UDBG_SEGV (1 << 3)
#define UDBG_BUS (1 << 4)
extern unsigned int user_debug;
#if __LINUX_ARM_ARCH__ >= 4
#define vectors_base() ((cr_alignment & CR_V) ? 0xffff0000 : 0)
#else
......
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