Commit 2063c892 authored by Anton Blanchard's avatar Anton Blanchard

Merge samba.org:/scratch/anton/export into samba.org:/scratch/anton/sfr

parents e9d8920a 628d0dd8
......@@ -52,7 +52,7 @@ o Gnu C 2.95.3 # gcc --version
o Gnu make 3.78 # make --version
o binutils 2.9.5.0.25 # ld -v
o util-linux 2.10o # fdformat --version
o module-init-tools 0.9 # rmmod -V
o module-init-tools 0.9.8 # rmmod -V
o e2fsprogs 1.29 # tune2fs
o jfsutils 1.0.14 # fsck.jfs -V
o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs
......
VERSION = 2
PATCHLEVEL = 5
SUBLEVEL = 58
SUBLEVEL = 59
EXTRAVERSION =
# *DOCUMENTATION*
......
......@@ -65,6 +65,7 @@ choice
LX164 AlphaPC164-LX
Miata Personal Workstation 433a, 433au, 500a,
500au, 600a, or 600au
Marvel AlphaServer ES47 / ES80 / GS1280
Mikasa AS 1000
Noname AXPpci33, UDB (Multia)
Noritake AS 1000A, AS 600A, AS 800
......@@ -75,7 +76,7 @@ choice
Sable AS 2000, AS 2100
Shark DS 20L
Takara Takara
Titan Privateer
Titan AlphaServer ES45 / DS25
Wildfire AlphaServer GS 40/80/160/320
If you don't know what to do, choose "generic".
......@@ -172,6 +173,11 @@ config ALPHA_LX164
A technical overview of this board is available at
<http://www.unix-ag.org/Linux-Alpha/Architectures/LX164.html>.
config ALPHA_MARVEL
bool "Marvel"
help
AlphaServer ES47 / ES80 / GS1280 based on EV7.
config ALPHA_MIATA
bool "Miata"
help
......@@ -238,6 +244,8 @@ config ALPHA_TAKARA
config ALPHA_TITAN
bool "Titan"
help
AlphaServer ES45/DS25 SMP based on EV68 and Titan chipset.
config ALPHA_WILDFIRE
bool "Wildfire"
......@@ -301,6 +309,11 @@ config PCI
information about which PCI hardware does work under Linux and which
doesn't.
config ALPHA_CORE_AGP
bool
depends on ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL
default y
config ALPHA_NONAME
bool
depends on ALPHA_BOOK1 || ALPHA_NONAME_CH
......@@ -387,7 +400,7 @@ config ALPHA_PYXIS
config ALPHA_EV6
bool
depends on ALPHA_NAUTILUS || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_SHARK || ALPHA_DP264 || ALPHA_EIGER
depends on ALPHA_NAUTILUS || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_SHARK || ALPHA_DP264 || ALPHA_EIGER || ALPHA_MARVEL
default y
config ALPHA_TSUNAMI
......@@ -397,11 +410,16 @@ config ALPHA_TSUNAMI
config ALPHA_EV67
bool "EV67 (or later) CPU (speed > 600MHz)?" if ALPHA_DP264 || ALPHA_EIGER
default y if ALPHA_NAUTILUS || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_SHARK
default y if ALPHA_NAUTILUS || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_SHARK || ALPHA_MARVEL
help
Is this a machine based on the EV67 core? If in doubt, select N here
and the machine will be treated as an EV6.
config ALPHA_EV7
bool
depends on ALPHA_MARVEL
default y
config ALPHA_MCPCIA
bool
depends on ALPHA_RAWHIDE
......@@ -419,7 +437,7 @@ config ALPHA_IRONGATE
config ALPHA_SRM
bool "Use SRM as bootloader" if ALPHA_CABRIOLET || ALPHA_AVANTI_CH || ALPHA_EB64P || ALPHA_PC164 || ALPHA_TAKARA || ALPHA_EB164 || ALPHA_ALCOR || ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_NAUTILUS || ALPHA_NONAME
default y if ALPHA_JENSEN || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_NORITAKE || ALPHA_DP264 || ALPHA_RAWHIDE || ALPHA_EIGER || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_SHARK
default y if ALPHA_JENSEN || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_NORITAKE || ALPHA_DP264 || ALPHA_RAWHIDE || ALPHA_EIGER || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_SHARK || ALPHA_MARVEL
---help---
There are two different types of booting firmware on Alphas: SRM,
which is command line driven, and ARC, which uses menus and arrow
......@@ -461,7 +479,7 @@ config ALPHA_BROKEN_IRQ_MASK
config SMP
bool "Symmetric multi-processing support"
depends on ALPHA_SABLE || ALPHA_RAWHIDE || ALPHA_DP264 || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_GENERIC || ALPHA_SHARK
depends on ALPHA_SABLE || ALPHA_RAWHIDE || ALPHA_DP264 || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_GENERIC || ALPHA_SHARK || ALPHA_MARVEL
---help---
This enables support for systems with more than one CPU. If you have
a system with only one CPU, like most personal computers, say N. If
......@@ -535,6 +553,7 @@ config VERBOSE_MCHECK
bool "Verbose Machine Checks"
source "drivers/pci/Kconfig"
source "drivers/eisa/Kconfig"
config HOTPLUG
bool "Support for hot-pluggable devices"
......
......@@ -6,7 +6,7 @@ EXTRA_TARGETS := head.o
EXTRA_AFLAGS := $(CFLAGS)
export-objs := alpha_ksyms.o
export-objs := alpha_ksyms.o core_marvel.o core_titan.o
obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \
irq_alpha.o signal.o setup.o ptrace.o time.o semaphore.o \
......@@ -21,18 +21,19 @@ obj-$(CONFIG_MODULES) += module.o
ifdef CONFIG_ALPHA_GENERIC
obj-y += core_apecs.o core_cia.o core_irongate.o core_lca.o \
core_mcpcia.o core_polaris.o core_t2.o core_tsunami.o \
core_titan.o core_wildfire.o
core_marvel.o core_mcpcia.o core_polaris.o core_t2.o \
core_tsunami.o core_titan.o core_wildfire.o
obj-y += sys_alcor.o sys_cabriolet.o sys_dp264.o sys_eb64p.o sys_eiger.o \
sys_jensen.o sys_miata.o sys_mikasa.o sys_nautilus.o sys_titan.o \
sys_noritake.o sys_rawhide.o sys_ruffian.o sys_rx164.o \
sys_sable.o sys_sio.o sys_sx164.o sys_takara.o \
sys_wildfire.o
sys_jensen.o sys_marvel.o sys_miata.o sys_mikasa.o sys_nautilus.o \
sys_titan.o sys_noritake.o sys_rawhide.o sys_ruffian.o sys_rx164.o \
sys_sable.o sys_sio.o sys_sx164.o sys_takara.o sys_wildfire.o
obj-y += irq_pyxis.o irq_i8259.o irq_srm.o
obj-y += es1888.o smc37c669.o smc37c93x.o ns87312.o
obj-y += err_titan.o err_marvel.o
obj-y += es1888.o smc37c669.o smc37c93x.o ns87312.o gct.o
else
......@@ -41,6 +42,7 @@ obj-$(CONFIG_ALPHA_APECS) += core_apecs.o
obj-$(CONFIG_ALPHA_CIA) += core_cia.o
obj-$(CONFIG_ALPHA_IRONGATE) += core_irongate.o
obj-$(CONFIG_ALPHA_LCA) += core_lca.o
obj-$(CONFIG_ALPHA_MARVEL) += core_marvel.o gct.o
obj-$(CONFIG_ALPHA_MCPCIA) += core_mcpcia.o
obj-$(CONFIG_ALPHA_POLARIS) += core_polaris.o
obj-$(CONFIG_ALPHA_T2) += core_t2.o
......@@ -62,11 +64,13 @@ obj-$(CONFIG_ALPHA_PC164) += sys_cabriolet.o irq_i8259.o irq_srm.o \
smc37c93x.o
obj-$(CONFIG_ALPHA_DP264) += sys_dp264.o irq_i8259.o es1888.o smc37c669.o
obj-$(CONFIG_ALPHA_SHARK) += sys_dp264.o irq_i8259.o es1888.o smc37c669.o
obj-$(CONFIG_ALPHA_TITAN) += sys_titan.o irq_i8259.o smc37c669.o
obj-$(CONFIG_ALPHA_TITAN) += sys_titan.o irq_i8259.o smc37c669.o \
err_titan.o
obj-$(CONFIG_ALPHA_EB64P) += sys_eb64p.o irq_i8259.o
obj-$(CONFIG_ALPHA_EB66) += sys_eb64p.o irq_i8259.o
obj-$(CONFIG_ALPHA_EIGER) += sys_eiger.o irq_i8259.o
obj-$(CONFIG_ALPHA_JENSEN) += sys_jensen.o pci-noop.o irq_i8259.o
obj-$(CONFIG_ALPHA_MARVEL) += sys_marvel.o err_marvel.o
obj-$(CONFIG_ALPHA_MIATA) += sys_miata.o irq_pyxis.o irq_i8259.o \
es1888.o smc37c669.o
obj-$(CONFIG_ALPHA_MIKASA) += sys_mikasa.o irq_i8259.o irq_srm.o
......
This diff is collapsed.
This diff is collapsed.
......@@ -357,7 +357,6 @@ void __init
tsunami_init_arch(void)
{
#ifdef NXM_MACHINE_CHECKS_ON_TSUNAMI
extern asmlinkage void entInt(void);
unsigned long tmp;
/* Ho hum.. init_arch is called before init_IRQ, but we need to be
......
......@@ -146,3 +146,17 @@ extern void cdl_check_console_data_log(void);
extern int cdl_register_subpacket_annotation(struct el_subpacket_annotation *);
extern int cdl_register_subpacket_handler(struct el_subpacket_handler *);
/*
* err_marvel.c
*/
extern void marvel_machine_check(u64, u64, struct pt_regs *);
extern void marvel_register_error_handlers(void);
/*
* err_titan.c
*/
extern int titan_process_logout_frame(struct el_common *, int);
extern void titan_machine_check(u64, u64, struct pt_regs *);
extern void titan_register_error_handlers(void);
extern int privateer_process_logout_frame(struct el_common *, int);
extern void privateer_machine_check(u64, u64, struct pt_regs *);
/*
* linux/arch/alpha/kernel/err_marvel.c
*
* Copyright (C) 2001 Jeff Wiedemeier (Compaq Computer Corporation)
*
*/
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/sched.h>
#include <asm/io.h>
#include <asm/console.h>
#include <asm/core_marvel.h>
#include <asm/hwrpb.h>
#include <asm/smp.h>
#include "err_impl.h"
#include "proto.h"
void
marvel_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
{
struct el_subpacket *el_ptr = (struct el_subpacket *)la_ptr;
/*
* Sync the processor
*/
mb();
draina();
el_process_subpacket(el_ptr);
switch(vector) {
case SCB_Q_SYSEVENT:
printk(KERN_CRIT "MARVEL SYSEVENT %ld\n", vector);
break;
case SCB_Q_SYSMCHK:
case SCB_Q_SYSERR:
printk(KERN_CRIT "MARVEL SYSMCHK/ERR %ld\n", vector);
break;
default:
/* Don't know it - pass it up. */
return ev7_machine_check(vector, la_ptr, regs);
}
/* Release the logout frame. */
wrmces(0x7);
mb();
}
void
marvel_register_error_handlers(void)
{
ev7_register_error_handlers();
}
This diff is collapsed.
/*
* linux/arch/alpha/kernel/gct.c
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <asm/hwrpb.h>
#include <asm/gct.h>
int
gct6_find_nodes(gct6_node *node, gct6_search_struct *search)
{
gct6_search_struct *wanted;
int status = 0;
/* First check the magic number. */
if (node->magic != GCT_NODE_MAGIC) {
printk(KERN_ERR "GCT Node MAGIC incorrect - GCT invalid\n");
return -EINVAL;
}
/* Check against the search struct. */
for (wanted = search;
wanted && (wanted->type | wanted->subtype);
wanted++) {
if (node->type != wanted->type)
continue;
if (node->subtype != wanted->subtype)
continue;
/* Found it -- call out. */
if (wanted->callout)
wanted->callout(node);
}
/* Now walk the tree, siblings first. */
if (node->next)
status |= gct6_find_nodes(GCT_NODE_PTR(node->next), search);
/* Then the children. */
if (node->child)
status |= gct6_find_nodes(GCT_NODE_PTR(node->child), search);
return status;
}
......@@ -362,6 +362,7 @@ register_irq_proc (unsigned int irq)
irq_dir[irq] = proc_mkdir(name, root_irq_dir);
#ifdef CONFIG_SMP
if (irq_desc[irq].handler->set_affinity) {
/* create /proc/irq/1234/smp_affinity */
entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]);
......@@ -371,6 +372,7 @@ register_irq_proc (unsigned int irq)
entry->write_proc = irq_affinity_write_proc;
smp_affinity_entry[irq] = entry;
}
#endif
}
......@@ -398,13 +400,17 @@ init_irq_proc (void)
#endif
/*
* Create entries for all existing IRQs.
* Create entries for all existing IRQs. If the number of IRQs
* is greater the 1/4 the total dynamic inode space for /proc,
* don't pollute the inode space
*/
for (i = 0; i < NR_IRQS; i++) {
if (ACTUAL_NR_IRQS < (PROC_NDYNAMIC / 4)) {
for (i = 0; i < ACTUAL_NR_IRQS; i++) {
if (irq_desc[i].handler == &no_irq_type)
continue;
register_irq_proc(i);
}
}
}
int
......@@ -518,7 +524,7 @@ show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n');
#endif
for (i = 0; i < NR_IRQS; i++) {
for (i = 0; i < ACTUAL_NR_IRQS; i++) {
action = irq_desc[i].action;
if (!action)
continue;
......
......@@ -9,10 +9,12 @@
#include <linux/config.h>
#include <asm/pgalloc.h>
/* Whee. IRONGATE, POLARIS, TSUNAMI, TITAN, and WILDFIRE don't have an HAE.
/* Whee. These systems don't have an HAE:
IRONGATE, MARVEL, POLARIS, TSUNAMI, TITAN, WILDFIRE
Fix things up for the GENERIC kernel by defining the HAE address
to be that of the cache. Now we can read and write it as we like. ;-) */
#define IRONGATE_HAE_ADDRESS (&alpha_mv.hae_cache)
#define MARVEL_HAE_ADDRESS (&alpha_mv.hae_cache)
#define POLARIS_HAE_ADDRESS (&alpha_mv.hae_cache)
#define TSUNAMI_HAE_ADDRESS (&alpha_mv.hae_cache)
#define TITAN_HAE_ADDRESS (&alpha_mv.hae_cache)
......@@ -32,7 +34,6 @@
#define T2_IACK_SC 1
#define WILDFIRE_IACK_SC 1 /* FIXME */
/*
* Some helpful macros for filling in the blanks.
*/
......@@ -63,6 +64,13 @@
mv_flush_tlb_current: ev5_flush_tlb_current, \
mv_flush_tlb_current_page: ev5_flush_tlb_current_page
#define DO_EV7_MMU \
max_asn: EV6_MAX_ASN, \
mv_switch_mm: ev5_switch_mm, \
mv_activate_mm: ev5_activate_mm, \
mv_flush_tlb_current: ev5_flush_tlb_current, \
mv_flush_tlb_current_page: ev5_flush_tlb_current_page
#define IO_LITE(UP,low) \
hae_register: (unsigned long *) CAT(UP,_HAE_ADDRESS), \
iack_sc: CAT(UP,_IACK_SC), \
......@@ -91,6 +99,7 @@
#define DO_CIA_IO IO(CIA,cia)
#define DO_IRONGATE_IO IO(IRONGATE,irongate)
#define DO_LCA_IO IO(LCA,lca)
#define DO_MARVEL_IO IO(MARVEL,marvel)
#define DO_MCPCIA_IO IO(MCPCIA,mcpcia)
#define DO_POLARIS_IO IO(POLARIS,polaris)
#define DO_T2_IO IO(T2,t2)
......@@ -109,6 +118,7 @@
#define DO_CIA_BUS BUS(cia)
#define DO_IRONGATE_BUS BUS(irongate)
#define DO_LCA_BUS BUS(lca)
#define DO_MARVEL_BUS BUS(marvel)
#define DO_MCPCIA_BUS BUS(mcpcia)
#define DO_POLARIS_BUS BUS(polaris)
#define DO_T2_BUS BUS(t2)
......@@ -116,7 +126,6 @@
#define DO_TITAN_BUS BUS(titan)
#define DO_WILDFIRE_BUS BUS(wildfire)
/*
* In a GENERIC kernel, we have lots of these vectors floating about,
* all but one of which we want to go away. In a non-GENERIC kernel,
......
......@@ -825,7 +825,7 @@ extern struct timezone sys_tz;
extern int do_sys_settimeofday(struct timeval *tv, struct timezone *tz);
extern int do_getitimer(int which, struct itimerval *value);
extern int do_setitimer(int which, struct itimerval *, struct itimerval *);
asmlinkage int sys_utimes(char *, struct timeval *);
extern asmlinkage int sys_utimes(char *, struct timeval *);
extern int do_adjtimex(struct timex *);
struct timeval32
......
......@@ -42,6 +42,8 @@ const char *const pci_mem_names[] = {
const char pci_hae0_name[] = "HAE0";
/* Indicate whether we respect the PCI setup left by console. */
int __initdata pci_probe_only;
/*
* The PCI controller list.
......@@ -270,6 +272,10 @@ pcibios_fixup_bus(struct pci_bus *bus)
end = hose->mem_space->start + pci_mem_end;
if (hose->mem_space->end > end)
hose->mem_space->end = end;
} else if (pci_probe_only &&
(dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
pci_read_bridge_bases(bus);
pcibios_fixup_device_resources(dev, bus);
}
for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) {
......@@ -407,6 +413,30 @@ pcibios_set_master(struct pci_dev *dev)
pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64);
}
static void __init
pcibios_claim_console_setup(void)
{
struct list_head *lb;
for(lb = pci_root_buses.next; lb != &pci_root_buses; lb = lb->next) {
struct pci_bus *b = pci_bus_b(lb);
struct list_head *ld;
for (ld = b->devices.next; ld != &b->devices; ld = ld->next) {
struct pci_dev *dev = pci_dev_b(ld);
int i;
for (i = 0; i < PCI_NUM_RESOURCES; i++) {
struct resource *r = &dev->resource[i];
if (r->parent || !r->start || !r->flags)
continue;
pci_claim_resource(dev, i);
}
}
}
}
void __init
common_init_pci(void)
{
......@@ -424,6 +454,11 @@ common_init_pci(void)
next_busno += 1;
}
if (pci_probe_only)
pcibios_claim_console_setup();
else /* FIXME: `else' will be removed when
pci_assign_unassigned_resources() is able to work
correctly with [partially] allocated PCI tree. */
pci_assign_unassigned_resources();
pci_fixup_irqs(alpha_mv.pci_swizzle, alpha_mv.pci_map_irq);
}
......
......@@ -150,6 +150,9 @@ struct pci_iommu_arena
extern struct pci_controller *hose_head, **hose_tail;
extern struct pci_controller *pci_isa_hose;
/* Indicate that we trust the console to configure things properly. */
extern int pci_probe_only;
extern void common_init_pci(void);
extern u8 common_swizzle(struct pci_dev *, u8 *);
extern struct pci_controller *alloc_pci_controller(void);
......
#include <linux/config.h>
/* Prototypes of functions used across modules here in this directory. */
#define vucp volatile unsigned char *
......@@ -41,6 +43,22 @@ extern void lca_init_arch(void);
extern void lca_machine_check(u64, u64, struct pt_regs *);
extern void lca_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
/* core_marvel.c */
extern struct pci_ops marvel_pci_ops;
extern void marvel_init_arch(void);
extern void marvel_kill_arch(int);
extern void marvel_machine_check(u64, u64, struct pt_regs *);
extern void marvel_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
extern int marvel_pa_to_nid(unsigned long);
extern int marvel_cpuid_to_nid(int);
extern unsigned long marvel_node_mem_start(int);
extern unsigned long marvel_node_mem_size(int);
extern int marvel_srmcons_allowed(void);
extern struct _alpha_agp_info *marvel_agp_info(void);
struct io7 *marvel_find_io7(int pe);
struct io7 *marvel_next_io7(struct io7 *prev);
void io7_clear_errors(struct io7 *io7);
/* core_mcpcia.c */
extern struct pci_ops mcpcia_pci_ops;
extern void mcpcia_init_arch(void);
......@@ -68,6 +86,7 @@ extern void titan_init_arch(void);
extern void titan_kill_arch(int);
extern void titan_machine_check(u64, u64, struct pt_regs *);
extern void titan_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
extern struct _alpha_agp_info *titan_agp_info(void);
/* core_tsunami.c */
extern struct pci_ops tsunami_pci_ops;
......@@ -149,10 +168,17 @@ extern int ptrace_cancel_bpt (struct task_struct *child);
extern void dik_show_regs(struct pt_regs *regs, unsigned long *r9_15);
extern void die_if_kernel(char *, struct pt_regs *, long, unsigned long *);
/* sys_titan.c */
extern void titan_dispatch_irqs(u64, struct pt_regs *);
/* ../mm/init.c */
extern void switch_to_system_map(void);
extern void srm_paging_stop(void);
/* ../mm/remap.c */
extern int __alpha_remap_area_pages(unsigned long, unsigned long,
unsigned long, unsigned long);
/* irq.c */
#ifdef CONFIG_SMP
......
......@@ -155,6 +155,7 @@ WEAK(eb66p_mv);
WEAK(eiger_mv);
WEAK(jensen_mv);
WEAK(lx164_mv);
WEAK(marvel_ev7_mv);
WEAK(miata_mv);
WEAK(mikasa_mv);
WEAK(mikasa_primo_mv);
......@@ -174,6 +175,7 @@ WEAK(sable_gamma_mv);
WEAK(shark_mv);
WEAK(sx164_mv);
WEAK(takara_mv);
WEAK(titan_mv);
WEAK(webbrick_mv);
WEAK(wildfire_mv);
WEAK(xl_mv);
......@@ -288,7 +290,7 @@ setup_memory(void *kernel_end)
(hwrpb->mddt_offset + (unsigned long) hwrpb);
for_each_mem_cluster(memdesc, cluster, i) {
printk("memcluster %d, usage %01lx, start %8lu, end %8lu\n",
printk("memcluster %lu, usage %01lx, start %8lu, end %8lu\n",
i, cluster->usage, cluster->start_pfn,
cluster->start_pfn + cluster->numpages);
......@@ -695,7 +697,7 @@ static char systype_names[][16] = {
"Mikasa", "EB64", "EB66", "EB64+", "AlphaBook1",
"Rawhide", "K2", "Lynx", "XL", "EB164", "Noritake",
"Cortex", "29", "Miata", "XXM", "Takara", "Yukon",
"Tsunami", "Wildfire", "CUSCO", "Eiger", "Titan"
"Tsunami", "Wildfire", "CUSCO", "Eiger", "Titan", "Marvel"
};
static char unofficial_names[][8] = {"100", "Ruffian"};
......@@ -714,15 +716,20 @@ static int eb64p_indices[] = {0,0,1,2};
static char eb66_names[][8] = {"EB66", "EB66+"};
static int eb66_indices[] = {0,0,1};
static char marvel_names[][16] = {
"Marvel/EV7"
};
static int marvel_indices[] = { 0 };
static char rawhide_names[][16] = {
"Dodge", "Wrangler", "Durango", "Tincup", "DaVinci"
};
static int rawhide_indices[] = {0,0,0,1,1,2,2,3,3,4,4};
static char titan_names[][16] = {
"0", "Privateer"
"DEFAULT", "Privateer", "Falcon", "Granite"
};
static int titan_indices[] = {0,1};
static int titan_indices[] = {0,1,2,2,3};
static char tsunami_names[][16] = {
"0", "DP264", "Warhol", "Windjammer", "Monet", "Clipper",
......@@ -775,6 +782,7 @@ get_sysvec(unsigned long type, unsigned long variation, unsigned long cpu)
NULL, /* CUSCO */
&eiger_mv, /* Eiger */
NULL, /* Titan */
NULL, /* Marvel */
};
static struct alpha_machine_vector *unofficial_vecs[] __initdata =
......@@ -812,10 +820,17 @@ get_sysvec(unsigned long type, unsigned long variation, unsigned long cpu)
&eb66p_mv
};
static struct alpha_machine_vector *marvel_vecs[] __initdata =
{
&marvel_ev7_mv,
};
static struct alpha_machine_vector *titan_vecs[] __initdata =
{
NULL,
&titan_mv, /* default */
&privateer_mv, /* privateer */
&titan_mv, /* falcon */
&privateer_mv, /* granite */
};
static struct alpha_machine_vector *tsunami_vecs[] __initdata =
......@@ -880,7 +895,12 @@ get_sysvec(unsigned long type, unsigned long variation, unsigned long cpu)
if (member < N(eb66_indices))
vec = eb66_vecs[eb66_indices[member]];
break;
case ST_DEC_MARVEL:
if (member < N(marvel_indices))
vec = marvel_vecs[marvel_indices[member]];
break;
case ST_DEC_TITAN:
vec = titan_vecs[0]; /* default */
if (member < N(titan_indices))
vec = titan_vecs[titan_indices[member]];
break;
......@@ -1019,11 +1039,16 @@ get_sysnames(unsigned long type, unsigned long variation, unsigned long cpu,
if (member < N(eb66_indices))
*variation_name = eb66_names[eb66_indices[member]];
break;
case ST_DEC_MARVEL:
if (member < N(marvel_indices))
*variation_name = marvel_names[marvel_indices[member]];
break;
case ST_DEC_RAWHIDE:
if (member < N(rawhide_indices))
*variation_name = rawhide_names[rawhide_indices[member]];
break;
case ST_DEC_TITAN:
*variation_name = titan_names[0]; /* default */
if (member < N(titan_indices))
*variation_name = titan_names[titan_indices[member]];
break;
......
......@@ -83,7 +83,6 @@ cycles_t cacheflush_time;
unsigned long cache_decay_ticks;
extern void calibrate_delay(void);
extern asmlinkage void entInt(void);
......@@ -151,6 +150,9 @@ smp_callin(void)
/* Get our local ticker going. */
smp_setup_percpu_timer(cpuid);
/* Call platform-specific callin, if specified */
if (alpha_mv.smp_callin) alpha_mv.smp_callin();
/* All kernel threads share the same mm context. */
atomic_inc(&init_mm.mm_count);
current->active_mm = &init_mm;
......
This diff is collapsed.
This diff is collapsed.
......@@ -118,7 +118,7 @@ dik_show_trace(unsigned long *sp)
long i = 0;
printk("Trace:");
while (0x1ff8 & (unsigned long) sp) {
extern unsigned long _stext, _etext;
extern char _stext[], _etext[];
unsigned long tmp = *sp;
sp++;
if (tmp < (unsigned long) &_stext)
......
......@@ -2,6 +2,6 @@
# Makefile for the linux alpha-specific parts of the memory manager.
#
obj-y := init.o fault.o extable.o
obj-y := init.o fault.o extable.o remap.o
obj-$(CONFIG_DISCONTIGMEM) += numa.o
#include <linux/vmalloc.h>
#include <asm/pgalloc.h>
#include <asm/cacheflush.h>
/* called with the page_table_lock held */
static inline void
remap_area_pte(pte_t * pte, unsigned long address, unsigned long size,
unsigned long phys_addr, unsigned long flags)
{
unsigned long end;
unsigned long pfn;
address &= ~PMD_MASK;
end = address + size;
if (end > PMD_SIZE)
end = PMD_SIZE;
if (address >= end)
BUG();
pfn = phys_addr >> PAGE_SHIFT;
do {
if (!pte_none(*pte)) {
printk("remap_area_pte: page already exists\n");
BUG();
}
set_pte(pte, pfn_pte(pfn,
__pgprot(_PAGE_VALID | _PAGE_ASM |
_PAGE_KRE | _PAGE_KWE | flags)));
address += PAGE_SIZE;
pfn++;
pte++;
} while (address && (address < end));
}
/* called with the page_table_lock held */
static inline int
remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size,
unsigned long phys_addr, unsigned long flags)
{
unsigned long end;
address &= ~PGDIR_MASK;
end = address + size;
if (end > PGDIR_SIZE)
end = PGDIR_SIZE;
phys_addr -= address;
if (address >= end)
BUG();
do {
pte_t * pte = pte_alloc_kernel(&init_mm, pmd, address);
if (!pte)
return -ENOMEM;
remap_area_pte(pte, address, end - address,
address + phys_addr, flags);
address = (address + PMD_SIZE) & PMD_MASK;
pmd++;
} while (address && (address < end));
return 0;
}
int
__alpha_remap_area_pages(unsigned long address, unsigned long phys_addr,
unsigned long size, unsigned long flags)
{
pgd_t * dir;
int error = 0;
unsigned long end = address + size;
phys_addr -= address;
dir = pgd_offset(&init_mm, address);
flush_cache_all();
if (address >= end)
BUG();
spin_lock(&init_mm.page_table_lock);
do {
pmd_t *pmd;
pmd = pmd_alloc(&init_mm, dir, address);
error = -ENOMEM;
if (!pmd)
break;
if (remap_area_pmd(pmd, address, end - address,
phys_addr + address, flags))
break;
error = 0;
address = (address + PGDIR_SIZE) & PGDIR_MASK;
dir++;
} while (address && (address < end));
spin_unlock(&init_mm.page_table_lock);
return error;
}
......@@ -21,41 +21,30 @@ SECTIONS
*(.gnu.warning)
} :kernel
_etext = .; /* End of text section */
RODATA
. = ALIGN(16);
__start___ex_table = .; /* Exception table */
__ex_table : { *(__ex_table) }
__stop___ex_table = .;
. = ALIGN(8);
__start___ksymtab = .; /* Kernel symbol table */
__ksymtab : { *(__ksymtab) }
__stop___ksymtab = .;
. = ALIGN(8);
__start___gpl_ksymtab = .; /* kernel symbol table - GPL-only symbols */
__gpl_ksymtab : { *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
. = ALIGN(8);
__start___kallsyms = .; /* All kernel symbols */
__kallsyms : { *(__kallsyms) }
__stop___kallsyms = .;
RODATA
/* Will be freed after init */
. = ALIGN(8192); /* Init code and data */
__init_begin = .;
.init.text : { *(.init.text) }
.init.data : { *(.init.data) }
. = ALIGN(16);
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
. = ALIGN(8);
__start___param = .;
__param : { *(__param) }
__stop___param = .;
. = ALIGN(8);
__initcall_start = .;
.initcall.init : {
......@@ -68,24 +57,23 @@ SECTIONS
*(.initcall7.init)
}
__initcall_end = .;
. = ALIGN(8192);
__initramfs_start = .;
.init.ramfs : { *(.init.ramfs) }
__initramfs_end = .;
. = ALIGN(64);
__per_cpu_start = .;
.data.percpu : { *(.data.percpu) }
__per_cpu_end = .;
. = ALIGN(8192);
. = ALIGN(2*8192);
__init_end = .;
/* Freed after init ends here */
/* writeable */
_data = .;
.data : { /* Data */
*(.data)
CONSTRUCTORS
}
/* Note 2 page alignment above. */
.data.init_thread : { *(.data.init_thread) }
. = ALIGN(8192);
.data.page_aligned : { *(.data.page_aligned) }
......@@ -93,14 +81,17 @@ SECTIONS
. = ALIGN(64);
.data.cacheline_aligned : { *(.data.cacheline_aligned) }
_data = .;
.data : { /* Data */
*(.data)
CONSTRUCTORS
}
.got : { *(.got) }
.sdata : { *(.sdata) }
_edata = .; /* End of data section */
. = ALIGN(2*8192); /* Inititial task and stack */
.data.init_thread : { *(.data.init_thread) }
__bss_start = .;
.sbss : { *(.sbss) *(.scommon) }
.bss : { *(.bss) *(COMMON) }
......@@ -111,7 +102,6 @@ SECTIONS
/* Sections to be discarded */
/DISCARD/ : { *(.exit.text) *(.exit.data) *(.exitcall.exit) }
.mdebug 0 : { *(.mdebug) }
.note 0 : { *(.note) }
.comment 0 : { *(.comment) }
......
......@@ -11,7 +11,7 @@
#include <linux/slab.h>
#include <linux/init.h>
#include <asm/page.h> /* for BUG() */
#include <asm/bug.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
......
......@@ -91,15 +91,16 @@ void default_idle(void)
void cpu_idle(void)
{
/* endless idle loop with no priority at all */
preempt_disable();
while (1) {
void (*idle)(void) = pm_idle;
if (!idle)
idle = default_idle;
preempt_disable();
leds_event(led_idle_start);
while (!need_resched())
idle();
leds_event(led_idle_end);
preempt_enable();
schedule();
}
}
......
......@@ -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: Mon Dec 23 18:49:04 2002
# Last update: Mon Jan 13 22:55:16 2003
#
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
#
......@@ -198,7 +198,7 @@ omaha ARCH_OMAHA OMAHA 186
ta7 ARCH_TA7 TA7 187
nova SA1100_NOVA NOVA 188
hmk ARCH_HMK HMK 189
inphinity ARCH_INPHINITY INPHINITY 190
karo ARCH_KARO KARO 190
fester SA1100_FESTER FESTER 191
gpi ARCH_GPI GPI 192
smdk2410 ARCH_SMDK2410 SMDK2410 193
......@@ -273,3 +273,11 @@ prpmc1100 ARCH_PRPMC1100 PRPMC1100 261
at91rm9200dk ARCH_AT91RM9200DK AT91RM9200DK 262
armstick ARCH_ARMSTICK ARMSTICK 263
armonie ARCH_ARMONIE ARMONIE 264
mport1 ARCH_MPORT1 MPORT1 265
s3c5410 ARCH_S3C5410 S3C5410 266
zcp320a ARCH_ZCP320A ZCP320A 267
i_box ARCH_I_BOX I_BOX 268
stlc1502 ARCH_STLC1502 STLC1502 269
siren ARCH_SIREN SIREN 270
greenlake ARCH_GREENLAKE GREENLAKE 271
argus ARCH_ARGUS ARGUS 272
......@@ -1181,6 +1181,8 @@ config EISA
Otherwise, say N.
source "drivers/eisa/Kconfig"
config MCA
bool "MCA support"
depends on !(X86_VISWS || X86_VOYAGER)
......
......@@ -838,11 +838,6 @@ CONFIG_DUMMY_CONSOLE=y
#
CONFIG_SOUND=y
#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set
#
# Advanced Linux Sound Architecture
#
......@@ -923,6 +918,11 @@ CONFIG_SND_INTEL8X0=y
#
# CONFIG_SND_USB_AUDIO is not set
#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set
#
# USB support
#
......
......@@ -656,6 +656,11 @@ CONFIG_VGA_CONSOLE=y
#
CONFIG_SOUND=y
#
# Advanced Linux Sound Architecture
#
# CONFIG_SND is not set
#
# Open Sound System
#
......@@ -680,11 +685,6 @@ CONFIG_SOUND_CS4281=y
# CONFIG_SOUND_OSS is not set
# CONFIG_SOUND_TVMIXER is not set
#
# Advanced Linux Sound Architecture
#
# CONFIG_SND is not set
#
# USB support
#
......
......@@ -4,6 +4,9 @@
#include <asm/ptrace.h>
#include <asm/system.h>
#define LOAD_OFFSET PAGE_OFFSET
#include <asm-generic/vmlinux.lds.h>
OUTPUT_FORMAT("elf64-ia64-little")
OUTPUT_ARCH(ia64)
ENTRY(phys_start)
......@@ -60,23 +63,6 @@ SECTIONS
machvec_end = .;
#endif
__start___ksymtab = .; /* Kernel symbol table */
__ksymtab : AT(ADDR(__ksymtab) - PAGE_OFFSET)
{ *(__ksymtab) }
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL only */
__gpl_ksymtab : AT(ADDR(__gpl_ksymtab) - PAGE_OFFSET)
{ *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
__kallsyms : AT(ADDR(__kallsyms) - PAGE_OFFSET)
{
__start___kallsyms = .; /* All kernel symbols */
*(__kallsyms)
__stop___kallsyms = .;
}
/* Unwind info & table: */
. = ALIGN(8);
.IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - PAGE_OFFSET)
......@@ -86,12 +72,8 @@ SECTIONS
{ *(.IA_64.unwind*) }
ia64_unw_end = .;
.rodata : AT(ADDR(.rodata) - PAGE_OFFSET)
{ *(.rodata) *(.rodata.*) }
.kstrtab : AT(ADDR(.kstrtab) - PAGE_OFFSET)
{ *(.kstrtab) }
__vermagic : AT(ADDR(__vermagic) - PAGE_OFFSET)
{ *(__vermagic) }
RODATA
.opd : AT(ADDR(.opd) - PAGE_OFFSET)
{ *(.opd) }
......
......@@ -1720,6 +1720,31 @@ config GEN_RTC
tristate "Generic /dev/rtc emulation" if !SUN3
depends on !ATARI
default y if SUN3
---help---
If you say Y here and create a character special file /dev/rtc with
major number 10 and minor number 135 using mknod ("man mknod"), you
will get access to the real time clock (or hardware clock) built
into your computer.
It reports status information via the file /proc/driver/rtc and its
behaviour is set by various ioctls on /dev/rtc. If you enable the
"extended RTC operation" below it will also provide an emulation
for RTC_UIE which is required by some programs and may improve
precision in some cases.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module is called genrtc.o. If you want to compile it as a module,
say M here and read <file:Documentation/modules.txt>. To load the
module automatically add 'alias char-major-10-135 genrtc' to your
/etc/modules.conf
config GEN_RTC_X
bool "Extended RTC operation"
depends on GEN_RTC
help
Provides an emulation for RTC_UIE which is required by some programs
and may improve precision of the generic RTC support in some cases.
config UNIX98_PTYS
bool "Unix98 PTY support"
......
......@@ -540,7 +540,6 @@ static int __init swap_init(void *start_mem, void *swap_data)
p->flags = SWP_USED;
p->swap_file = &fake_dentry;
p->swap_vfsmnt = &fake_vfsmnt;
p->swap_device = 0;
p->swap_map = swap_data;
p->cluster_nr = 0;
p->next = -1;
......@@ -549,8 +548,7 @@ static int __init swap_init(void *start_mem, void *swap_data)
/* call stram_open() directly, avoids at least the overhead in
* constructing a dummy file structure... */
p->swap_device = MKDEV( STRAM_MAJOR, STRAM_MINOR );
swap_inode.i_rdev = p->swap_device;
swap_inode.i_rdev = MKDEV( STRAM_MAJOR, STRAM_MINOR );
stram_open( &swap_inode, MAGIC_FILE_P );
p->max = SWAP_NR(swap_end);
......
......@@ -50,6 +50,9 @@ EXPORT_SYMBOL(kernel_set_cachemode);
#endif /* !CONFIG_SUN3 */
EXPORT_SYMBOL(m68k_debug_device);
EXPORT_SYMBOL(mach_hwclk);
EXPORT_SYMBOL(mach_get_ss);
EXPORT_SYMBOL(mach_get_rtc_pll);
EXPORT_SYMBOL(mach_set_rtc_pll);
EXPORT_SYMBOL(dump_fpu);
EXPORT_SYMBOL(dump_thread);
EXPORT_SYMBOL(strnlen);
......
......@@ -82,6 +82,7 @@ void (*mach_process_int) (int, struct pt_regs *) = NULL;
unsigned long (*mach_gettimeoffset) (void);
int (*mach_hwclk) (int, struct rtc_time*) = NULL;
int (*mach_set_clock_mmss) (unsigned long) = NULL;
unsigned int (*mach_get_ss)(void) = NULL;
int (*mach_get_rtc_pll)(struct rtc_pll_info *) = NULL;
int (*mach_set_rtc_pll)(struct rtc_pll_info *) = NULL;
void (*mach_reset)( void );
......
......@@ -9,8 +9,9 @@
extern const struct exception_table_entry __start___ex_table[];
extern const struct exception_table_entry __stop___ex_table[];
static inline unsigned long
search_one_table(const struct exception_table_entry *first,
/* Simple binary search */
const struct exception_table_entry *
search_extable(const struct exception_table_entry *first,
const struct exception_table_entry *last,
unsigned long value)
{
......@@ -21,41 +22,12 @@ search_one_table(const struct exception_table_entry *first,
mid = (last - first) / 2 + first;
diff = value - mid->insn;
if (diff >= 0 && diff <= 2)
return mid->fixup;
return mid;
else if (diff > 0)
first = mid+1;
else
last = mid-1;
}
return 0;
return NULL;
}
unsigned long
search_exception_table(unsigned long addr)
{
unsigned long ret = 0;
#ifndef CONFIG_MODULES
/* There is only the kernel to search. */
ret = search_one_table(__start___ex_table, __stop___ex_table-1, addr);
return ret;
#else
unsigned long flags;
struct list_head *i;
/* The kernel is the last "module" -- no need to treat it special. */
spin_lock_irqsave(&modlist_lock, flags);
list_for_each(i, &extables) {
struct exception_table *ex
= list_entry(i, struct exception_table, list);
if (ex->num_entries == 0)
continue;
ret = search_one_table(ex->entry,
ex->entry + ex->num_entries - 1, addr);
if (ret)
break;
}
spin_unlock_irqrestore(&modlist_lock, flags);
return ret;
#endif
}
......@@ -9,6 +9,7 @@
#include <linux/kernel.h>
#include <linux/ptrace.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <asm/setup.h>
#include <asm/traps.h>
......@@ -34,10 +35,10 @@ int send_fault_sig(struct pt_regs *regs)
force_sig_info(siginfo.si_signo,
&siginfo, current);
} else {
unsigned long fixup;
const struct exception_table_entry *fixup;
/* Are we prepared to handle this kernel fault? */
if ((fixup = search_exception_table(regs->pc))) {
if ((fixup = search_exception_tables(regs->pc))) {
struct pt_regs *tregs;
/* Create a new four word stack frame, discarding the old
one. */
......@@ -45,7 +46,7 @@ int send_fault_sig(struct pt_regs *regs)
tregs = (struct pt_regs *)((ulong)regs + regs->stkadj);
tregs->vector = regs->vector;
tregs->format = 0;
tregs->pc = fixup;
tregs->pc = fixup->fixup;
tregs->sr = regs->sr;
return -1;
}
......
......@@ -53,7 +53,10 @@ extern void q40_sched_init(void (*handler)(int, void *, struct pt_regs *));
extern unsigned long q40_gettimeoffset (void);
extern int q40_hwclk (int, struct rtc_time *);
extern unsigned int q40_get_ss (void);
extern int q40_set_clock_mmss (unsigned long);
static int q40_get_rtc_pll(struct rtc_pll_info *pll);
static int q40_set_rtc_pll(struct rtc_pll_info *pll);
extern void q40_reset (void);
void q40_halt(void);
extern void q40_waitbut(void);
......@@ -170,6 +173,9 @@ void __init config_q40(void)
mach_init_IRQ = q40_init_IRQ;
mach_gettimeoffset = q40_gettimeoffset;
mach_hwclk = q40_hwclk;
mach_get_ss = q40_get_ss;
mach_get_rtc_pll = q40_get_rtc_pll;
mach_set_rtc_pll = q40_set_rtc_pll;
mach_set_clock_mmss = q40_set_clock_mmss;
mach_reset = q40_reset;
......@@ -290,6 +296,11 @@ int q40_hwclk(int op, struct rtc_time *t)
return 0;
}
unsigned int q40_get_ss()
{
return bcd2bin(Q40_RTC_SECS);
}
/*
* Set the minutes and seconds from seconds value 'nowtime'. Fail if
* clock is out by > 30 minutes. Logic lifted from atari code.
......@@ -321,3 +332,36 @@ int q40_set_clock_mmss (unsigned long nowtime)
return retval;
}
/* get and set PLL calibration of RTC clock */
#define Q40_RTC_PLL_MASK ((1<<5)-1)
#define Q40_RTC_PLL_SIGN (1<<5)
static int q40_get_rtc_pll(struct rtc_pll_info *pll)
{
int tmp=Q40_RTC_CTRL;
pll->pll_value = tmp & Q40_RTC_PLL_MASK;
if (tmp & Q40_RTC_PLL_SIGN)
pll->pll_value = -pll->pll_value;
pll->pll_max=31;
pll->pll_min=-31;
pll->pll_posmult=512;
pll->pll_negmult=256;
pll->pll_clock=125829120;
return 0;
}
static int q40_set_rtc_pll(struct rtc_pll_info *pll)
{
if (!pll->pll_ctrl){
/* the docs are a bit unclear so I am doublesetting */
/* RTC_WRITE here ... */
int tmp = (pll->pll_value & 31) | (pll->pll_value<0 ? 32 : 0) |
Q40_RTC_WRITE;
Q40_RTC_CTRL |= Q40_RTC_WRITE;
Q40_RTC_CTRL = tmp;
Q40_RTC_CTRL &= ~(Q40_RTC_WRITE);
return 0;
} else
return -EINVAL;
}
......@@ -207,7 +207,6 @@ void q40_process_int (int level, struct pt_regs *fp)
int ql_ticks; /* 200Hz ticks since last jiffie */
static int sound_ticks;
short q40rtc_oldsecs;
#define SVOL 45
......@@ -234,7 +233,6 @@ static void (*q40_timer_routine)(int, void *, struct pt_regs *);
static void q40_timer_int (int irq, void * dev, struct pt_regs * regs)
{
#if (HZ==100)
ql_ticks = ql_ticks ? 0 : 1;
if (sound_ticks)
{
......@@ -243,16 +241,9 @@ static void q40_timer_int (int irq, void * dev, struct pt_regs * regs)
*DAC_LEFT=sval;
*DAC_RIGHT=sval;
}
#if defined(CONFIG_Q40RTC) || defined(CONFIG_GEN_RTC)
if (gen_rtc_irq_ctrl && (q40rtc_oldsecs != Q40_RTC_SECS))
{
q40rtc_oldsecs = Q40_RTC_SECS;
gen_rtc_irq_flags = RTC_UIE;
gen_rtc_interrupt(0);
}
#endif
if (ql_ticks) return;
#endif
q40_timer_routine(irq, dev, regs);
}
......@@ -261,30 +252,14 @@ void q40_sched_init (void (*timer_routine)(int, void *, struct pt_regs *))
int timer_irq;
q40_timer_routine = timer_routine;
#if (HZ==10000)
timer_irq=Q40_IRQ_SAMPLE;
#else
timer_irq=Q40_IRQ_FRAME;
#endif
/*printk("registering sched/timer IRQ %d, handler %p\n", timer_irq,q40_timer_int);*/
/*printk("timer routine %p\n",q40_timer_routine);*/
if (request_irq(timer_irq, q40_timer_int, 0,
"timer", q40_timer_int))
panic ("Couldn't register timer int");
#if (HZ==10000)
master_outb(SAMPLE_LOW,SAMPLE_RATE_REG);
master_outb(-1,SAMPLE_CLEAR_REG);
master_outb(1,SAMPLE_ENABLE_REG);
#else
master_outb(-1,FRAME_CLEAR_REG); /* not necessary ? */
#if (HZ==100)
master_outb(-1,FRAME_CLEAR_REG);
master_outb( 1,FRAME_RATE_REG);
#endif
#endif
}
......@@ -297,20 +272,20 @@ void q40_sched_init (void (*timer_routine)(int, void *, struct pt_regs *))
struct IRQ_TABLE{ unsigned mask; int irq ;};
#if 0
static struct IRQ_TABLE iirqs[]={
{IRQ_FRAME_MASK,Q40_IRQ_FRAME},
{IRQ_KEYB_MASK,Q40_IRQ_KEYBOARD},
{Q40_IRQ_FRAME_MASK,Q40_IRQ_FRAME},
{Q40_IRQ_KEYB_MASK,Q40_IRQ_KEYBOARD},
{0,0}};
#endif
static struct IRQ_TABLE eirqs[]={
{IRQ3_MASK,3}, /* ser 1 */
{IRQ4_MASK,4}, /* ser 2 */
{IRQ14_MASK,14}, /* IDE 1 */
{IRQ15_MASK,15}, /* IDE 2 */
{IRQ6_MASK,6}, /* floppy */
{IRQ7_MASK,7}, /* par */
{Q40_IRQ3_MASK,3}, /* ser 1 */
{Q40_IRQ4_MASK,4}, /* ser 2 */
{Q40_IRQ14_MASK,14}, /* IDE 1 */
{Q40_IRQ15_MASK,15}, /* IDE 2 */
{Q40_IRQ6_MASK,6}, /* floppy, handled elsewhere */
{Q40_IRQ7_MASK,7}, /* par */
{IRQ5_MASK,5},
{IRQ10_MASK,10},
{Q40_IRQ5_MASK,5},
{Q40_IRQ10_MASK,10},
......@@ -325,7 +300,7 @@ static int ccleirq=60; /* ISA dev IRQ's*/
#define IRQ_INPROGRESS 1
/*static unsigned short saved_mask;*/
static int do_tint=0;
//static int do_tint=0;
#define DEBUG_Q40INT
/*#define IP_USE_DISABLE *//* would be nice, but crashes ???? */
......@@ -337,25 +312,20 @@ static int aliased_irq=0; /* how many times inside handler ?*/
/* got level 2 interrupt, dispatch to ISA or keyboard/timer IRQs */
void q40_irq2_handler (int vec, void *devname, struct pt_regs *fp)
{
unsigned mir;
unsigned mer;
unsigned mir, mer;
int irq,i;
repeat:
mir=master_inb(IIRQ_REG);
if (mir&IRQ_FRAME_MASK)
{ /* dont loose ticks */
do_tint++;
if (mir&Q40_IRQ_FRAME_MASK) {
irq_tab[Q40_IRQ_FRAME].count++;
irq_tab[Q40_IRQ_FRAME].handler(Q40_IRQ_FRAME,irq_tab[Q40_IRQ_FRAME].dev_id,fp);
master_outb(-1,FRAME_CLEAR_REG);
}
if ((mir&IRQ_SER_MASK) || (mir&IRQ_EXT_MASK))
{
/* some ISA dev caused the int */
if ((mir&Q40_IRQ_SER_MASK) || (mir&Q40_IRQ_EXT_MASK)) {
mer=master_inb(EIRQ_REG);
for (i=0; eirqs[i].mask; i++)
{
if (mer&(eirqs[i].mask))
{
for (i=0; eirqs[i].mask; i++) {
if (mer&(eirqs[i].mask)) {
irq=eirqs[i].irq;
/*
* There is a little mess wrt which IRQ really caused this irq request. The
......@@ -363,19 +333,16 @@ void q40_irq2_handler (int vec, void *devname, struct pt_regs *fp)
* are read - which is long after the request came in. In theory IRQs should
* not just go away but they occassionally do
*/
if (irq>4 && irq<=15 && mext_disabled)
{
if (irq>4 && irq<=15 && mext_disabled) {
/*aliased_irq++;*/
goto iirq;
}
if (irq_tab[irq].handler == q40_defhand )
{
if (irq_tab[irq].handler == q40_defhand ) {
printk("handler for IRQ %d not defined\n",irq);
continue; /* ignore uninited INTs :-( */
}
if ( irq_tab[irq].state & IRQ_INPROGRESS )
{
/* some handlers do local_irq_enable() for irq latency reasons, */
if ( irq_tab[irq].state & IRQ_INPROGRESS ) {
/* some handlers do sti() for irq latency reasons, */
/* however reentering an active irq handler is not permitted */
#ifdef IP_USE_DISABLE
/* in theory this is the better way to do it because it still */
......@@ -398,8 +365,7 @@ void q40_irq2_handler (int vec, void *devname, struct pt_regs *fp)
/* this function will be reentered immediately thus */
/* getting another chance to disable the IRQ */
if ( disabled )
{
if ( disabled ) {
#ifdef IP_USE_DISABLE
if (irq>4){
disabled=0;
......@@ -409,7 +375,8 @@ void q40_irq2_handler (int vec, void *devname, struct pt_regs *fp)
/*printk("reenabling irq %d\n",irq); */
#endif
}
goto repeat; /* return; */
// used to do 'goto repeat;' her, this delayed bh processing too long
return;
}
}
if (mer && ccleirq>0 && !aliased_irq)
......@@ -417,18 +384,7 @@ void q40_irq2_handler (int vec, void *devname, struct pt_regs *fp)
}
iirq:
mir=master_inb(IIRQ_REG);
if (mir&IRQ_FRAME_MASK)
{
do_tint++;
master_outb(-1,FRAME_CLEAR_REG);
}
for(;do_tint>0;do_tint--)
{
irq_tab[Q40_IRQ_FRAME].count++;
irq_tab[Q40_IRQ_FRAME].handler(Q40_IRQ_FRAME,irq_tab[Q40_IRQ_FRAME].dev_id,fp);
}
if (mir&IRQ_KEYB_MASK) /* may handle it even if actually disabled*/
{
if (mir&Q40_IRQ_KEYB_MASK) {
irq_tab[Q40_IRQ_KEYBOARD].count++;
irq_tab[Q40_IRQ_KEYBOARD].handler(Q40_IRQ_KEYBOARD,irq_tab[Q40_IRQ_KEYBOARD].dev_id,fp);
}
......@@ -453,20 +409,11 @@ int show_q40_interrupts (struct seq_file *p, void *v)
static void q40_defhand (int irq, void *dev_id, struct pt_regs *fp)
{
#if 0
printk ("Unknown q40 interrupt 0x%02x\n", irq);
#endif
}
static void sys_default_handler(int lev, void *dev_id, struct pt_regs *regs)
{
#if 0
if (ints_inited)
#endif
printk ("Uninitialised interrupt level %d\n", lev);
#if 0
else
printk ("Interrupt before interrupt initialisation\n");
#endif
}
void (*q40_sys_default_handler[SYS_IRQS]) (int, void *, struct pt_regs *) = {
......@@ -495,8 +442,7 @@ void q40_disable_irq (unsigned int irq)
* Any driver should not attempt to sleep accross disable_irq !!
*/
if ( irq>=5 && irq<=15 )
{
if ( irq>=5 && irq<=15 ) {
master_outb(0,EXT_ENABLE_REG);
mext_disabled++;
if (mext_disabled>1) printk("disable_irq nesting count %d\n",mext_disabled);
......@@ -515,4 +461,5 @@ int q40_probe_irq_off (unsigned long irqs)
/*
* Local variables:
* compile-command: "m68k-linux-gcc -D__KERNEL__ -I/home/rz/lx/linux-2.2.6/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -fno-strength-reduce -ffixed-a2 -m68040 -c -o q40ints.o q40ints.c"
* End:
*/
......@@ -643,14 +643,14 @@ CONFIG_FONT_8x16=y
CONFIG_SOUND=y
#
# Open Sound System
# Advanced Linux Sound Architecture
#
# CONFIG_SOUND_PRIME is not set
# CONFIG_SND is not set
#
# Advanced Linux Sound Architecture
# Open Sound System
#
# CONFIG_SND is not set
# CONFIG_SOUND_PRIME is not set
#
# USB support
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -11,7 +11,7 @@ EXTRA_AFLAGS := -traditional -m32
# cannot use EXTRA_CFLAGS because base CFLAGS contains -mkernel which conflicts with
# -m32
CFLAGS := -m32 -D__KERNEL__ -I$(TOPDIR)/include -O2
CFLAGS := -m32 -D__KERNEL__ -Iinclude -O2
LDFLAGS := -m elf_i386
LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup_32 -m elf_i386
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment