Commit d189d057 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://are.twiddle.net/axp-2.5/

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 4a149de8 1c1ee91a
...@@ -22,8 +22,10 @@ ...@@ -22,8 +22,10 @@
static int static int
titan_parse_c_misc(u64 c_misc, int print) titan_parse_c_misc(u64 c_misc, int print)
{ {
#ifdef CONFIG_VERBOSE_MCHECK
char *src; char *src;
int nxs = 0; int nxs = 0;
#endif
int status = MCHK_DISPOSITION_REPORT; int status = MCHK_DISPOSITION_REPORT;
#define TITAN__CCHIP_MISC__NXM (1UL << 28) #define TITAN__CCHIP_MISC__NXM (1UL << 28)
...@@ -263,11 +265,11 @@ titan_parse_p_perror(int which, int port, u64 perror, int print) ...@@ -263,11 +265,11 @@ titan_parse_p_perror(int which, int port, u64 perror, int print)
static int static int
titan_parse_p_agperror(int which, u64 agperror, int print) titan_parse_p_agperror(int which, u64 agperror, int print)
{ {
int status = MCHK_DISPOSITION_REPORT;
#ifdef CONFIG_VERBOSE_MCHECK
int cmd, len; int cmd, len;
unsigned long addr; unsigned long addr;
int status = MCHK_DISPOSITION_REPORT;
#ifdef CONFIG_VERBOSE_MCHECK
char *agperror_cmd[] = { "Read (low-priority)", "Read (high-priority)", char *agperror_cmd[] = { "Read (low-priority)", "Read (high-priority)",
"Write (low-priority)", "Write (low-priority)",
"Write (high-priority)", "Write (high-priority)",
...@@ -575,14 +577,14 @@ titan_register_error_handlers(void) ...@@ -575,14 +577,14 @@ titan_register_error_handlers(void)
static int static int
privateer_process_680_frame(struct el_common *mchk_header, int print) privateer_process_680_frame(struct el_common *mchk_header, int print)
{ {
int status = MCHK_DISPOSITION_UNKNOWN_ERROR;
#ifdef CONFIG_VERBOSE_MCHECK
struct el_PRIVATEER_envdata_mcheck *emchk = struct el_PRIVATEER_envdata_mcheck *emchk =
(struct el_PRIVATEER_envdata_mcheck *) (struct el_PRIVATEER_envdata_mcheck *)
((unsigned long)mchk_header + mchk_header->sys_offset); ((unsigned long)mchk_header + mchk_header->sys_offset);
int status = MCHK_DISPOSITION_UNKNOWN_ERROR;
/* TODO - catagorize errors, for now, no error */ /* TODO - catagorize errors, for now, no error */
#ifdef CONFIG_VERBOSE_MCHECK
if (!print) if (!print)
return status; return status;
......
...@@ -199,7 +199,9 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, ...@@ -199,7 +199,9 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab,
case R_ALPHA_NONE: case R_ALPHA_NONE:
break; break;
case R_ALPHA_REFQUAD: case R_ALPHA_REFQUAD:
*(u64 *)location = value; /* BUG() can produce misaligned relocations. */
((u32 *)location)[0] = value;
((u32 *)location)[1] = value >> 32;
break; break;
case R_ALPHA_GPREL32: case R_ALPHA_GPREL32:
value -= gp; value -= gp;
......
...@@ -285,7 +285,7 @@ common_swizzle(struct pci_dev *dev, u8 *pinp) ...@@ -285,7 +285,7 @@ common_swizzle(struct pci_dev *dev, u8 *pinp)
pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn)); pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn));
/* Move up the chain of bridges. */ /* Move up the chain of bridges. */
dev = dev->bus->self; dev = dev->bus->self;
} while (dev->bus->self); } while (dev->bus->parent);
*pinp = pin; *pinp = pin;
/* The slot is the slot of the last bridge. */ /* The slot is the slot of the last bridge. */
...@@ -410,10 +410,8 @@ common_init_pci(void) ...@@ -410,10 +410,8 @@ common_init_pci(void)
if (pci_probe_only) if (pci_probe_only)
pcibios_claim_console_setup(); pcibios_claim_console_setup();
else /* FIXME: `else' will be removed when
pci_assign_unassigned_resources() is able to work pci_assign_unassigned_resources();
correctly with [partially] allocated PCI tree. */
pci_assign_unassigned_resources();
pci_fixup_irqs(alpha_mv.pci_swizzle, alpha_mv.pci_map_irq); pci_fixup_irqs(alpha_mv.pci_swizzle, alpha_mv.pci_map_irq);
} }
......
...@@ -112,7 +112,7 @@ smp_setup_percpu_timer(int cpuid) ...@@ -112,7 +112,7 @@ smp_setup_percpu_timer(int cpuid)
static void __init static void __init
wait_boot_cpu_to_stop(int cpuid) wait_boot_cpu_to_stop(int cpuid)
{ {
long stop = jiffies + 10*HZ; unsigned long stop = jiffies + 10*HZ;
while (time_before(jiffies, stop)) { while (time_before(jiffies, stop)) {
if (!smp_secondary_alive) if (!smp_secondary_alive)
...@@ -349,7 +349,7 @@ secondary_cpu_start(int cpuid, struct task_struct *idle) ...@@ -349,7 +349,7 @@ secondary_cpu_start(int cpuid, struct task_struct *idle)
{ {
struct percpu_struct *cpu; struct percpu_struct *cpu;
struct pcb_struct *hwpcb, *ipcb; struct pcb_struct *hwpcb, *ipcb;
long timeout; unsigned long timeout;
cpu = (struct percpu_struct *) cpu = (struct percpu_struct *)
((char*)hwrpb ((char*)hwrpb
...@@ -428,7 +428,7 @@ static int __init ...@@ -428,7 +428,7 @@ static int __init
smp_boot_one_cpu(int cpuid) smp_boot_one_cpu(int cpuid)
{ {
struct task_struct *idle; struct task_struct *idle;
long timeout; unsigned long timeout;
/* Cook up an idler for this guy. Note that the address we /* Cook up an idler for this guy. Note that the address we
give to kernel_thread is irrelevant -- it's going to start give to kernel_thread is irrelevant -- it's going to start
...@@ -816,7 +816,7 @@ smp_call_function_on_cpu (void (*func) (void *info), void *info, int retry, ...@@ -816,7 +816,7 @@ smp_call_function_on_cpu (void (*func) (void *info), void *info, int retry,
int wait, unsigned long to_whom) int wait, unsigned long to_whom)
{ {
struct smp_call_struct data; struct smp_call_struct data;
long timeout; unsigned long timeout;
int num_cpus_to_call; int num_cpus_to_call;
data.func = func; data.func = func;
......
...@@ -183,14 +183,17 @@ nautilus_machine_check(unsigned long vector, unsigned long la_ptr, ...@@ -183,14 +183,17 @@ nautilus_machine_check(unsigned long vector, unsigned long la_ptr,
extern void free_reserved_mem(void *, void *); extern void free_reserved_mem(void *, void *);
static struct resource irongate_mem = {
.name = "Irongate PCI MEM",
.flags = IORESOURCE_MEM,
};
void __init void __init
nautilus_init_pci(void) nautilus_init_pci(void)
{ {
struct pci_controller *hose = hose_head; struct pci_controller *hose = hose_head;
struct pci_bus *bus; struct pci_bus *bus;
struct pci_dev *irongate; struct pci_dev *irongate;
unsigned long saved_io_start, saved_io_end;
unsigned long saved_mem_start, saved_mem_end;
unsigned long bus_align, bus_size, pci_mem; unsigned long bus_align, bus_size, pci_mem;
unsigned long memtop = max_low_pfn << PAGE_SHIFT; unsigned long memtop = max_low_pfn << PAGE_SHIFT;
...@@ -199,50 +202,41 @@ nautilus_init_pci(void) ...@@ -199,50 +202,41 @@ nautilus_init_pci(void)
hose->bus = bus; hose->bus = bus;
hose->last_busno = bus->subordinate; hose->last_busno = bus->subordinate;
/* We're going to size the root bus, so we must
- have a non-NULL PCI device associated with the bus
- preserve hose resources. */
irongate = pci_find_slot(0, 0); irongate = pci_find_slot(0, 0);
bus->self = irongate; bus->self = irongate;
saved_io_start = bus->resource[0]->start; bus->resource[1] = &irongate_mem;
saved_io_end = bus->resource[0]->end;
saved_mem_start = bus->resource[1]->start;
saved_mem_end = bus->resource[1]->end;
pci_bus_size_bridges(bus); pci_bus_size_bridges(bus);
/* Don't care about IO. */ /* IO port range. */
bus->resource[0]->start = saved_io_start; bus->resource[0]->start = 0;
bus->resource[0]->end = saved_io_end; bus->resource[0]->end = 0xffff;
/* Set up PCI memory range - limit is hardwired to 0xffffffff,
base must be at aligned to 16Mb. */
bus_align = bus->resource[1]->start; bus_align = bus->resource[1]->start;
bus_size = bus->resource[1]->end + 1 - bus_align; bus_size = bus->resource[1]->end + 1 - bus_align;
/* Align to 16Mb. */
if (bus_align < 0x1000000UL) if (bus_align < 0x1000000UL)
bus_align = 0x1000000UL; bus_align = 0x1000000UL;
/* Restore hose MEM resource. */
bus->resource[1]->start = saved_mem_start;
bus->resource[1]->end = saved_mem_end;
pci_mem = (0x100000000UL - bus_size) & -bus_align; pci_mem = (0x100000000UL - bus_size) & -bus_align;
bus->resource[1]->start = pci_mem;
bus->resource[1]->end = 0xffffffffUL;
if (request_resource(&iomem_resource, bus->resource[1]) < 0)
printk(KERN_ERR "Failed to request MEM on hose 0\n");
if (pci_mem < memtop && pci_mem > alpha_mv.min_mem_address) { if (pci_mem < memtop && pci_mem > alpha_mv.min_mem_address) {
free_reserved_mem(__va(alpha_mv.min_mem_address), free_reserved_mem(__va(alpha_mv.min_mem_address),
__va(pci_mem)); __va(pci_mem));
printk("nautilus_init_arch: %ldk freed\n", printk("nautilus_init_pci: %ldk freed\n",
(pci_mem - alpha_mv.min_mem_address) >> 10); (pci_mem - alpha_mv.min_mem_address) >> 10);
} }
alpha_mv.min_mem_address = pci_mem;
if ((IRONGATE0->dev_vendor >> 16) > 0x7006) /* Albacore? */ if ((IRONGATE0->dev_vendor >> 16) > 0x7006) /* Albacore? */
IRONGATE0->pci_mem = pci_mem; IRONGATE0->pci_mem = pci_mem;
pci_bus_assign_resources(bus); pci_bus_assign_resources(bus);
/* To break the loop in common_swizzle() */
bus->self = NULL;
pci_fixup_irqs(alpha_mv.pci_swizzle, alpha_mv.pci_map_irq); pci_fixup_irqs(alpha_mv.pci_swizzle, alpha_mv.pci_map_irq);
} }
......
...@@ -69,9 +69,6 @@ struct flock { ...@@ -69,9 +69,6 @@ struct flock {
__kernel_pid_t l_pid; __kernel_pid_t l_pid;
}; };
#ifdef __KERNEL__
#define flock64 flock
#endif
#define F_LINUX_SPECIFIC_BASE 1024 #define F_LINUX_SPECIFIC_BASE 1024
#endif #endif
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
/* .. and these are ours ... */ /* .. and these are ours ... */
#define _PAGE_DIRTY 0x20000 #define _PAGE_DIRTY 0x20000
#define _PAGE_ACCESSED 0x40000 #define _PAGE_ACCESSED 0x40000
#define _PAGE_FILE 0x80000 /* pagecache or swap? */
/* /*
* NOTE! The "accessed" bit isn't necessarily exact: it can be kept exactly * NOTE! The "accessed" bit isn't necessarily exact: it can be kept exactly
...@@ -254,6 +255,7 @@ extern inline int pte_write(pte_t pte) { return !(pte_val(pte) & _PAGE_FOW); } ...@@ -254,6 +255,7 @@ extern inline int pte_write(pte_t pte) { return !(pte_val(pte) & _PAGE_FOW); }
extern inline int pte_exec(pte_t pte) { return !(pte_val(pte) & _PAGE_FOE); } extern inline int pte_exec(pte_t pte) { return !(pte_val(pte) & _PAGE_FOE); }
extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
extern inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; }
extern inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) |= _PAGE_FOW; return pte; } extern inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) |= _PAGE_FOW; return pte; }
extern inline pte_t pte_rdprotect(pte_t pte) { pte_val(pte) |= _PAGE_FOR; return pte; } extern inline pte_t pte_rdprotect(pte_t pte) { pte_val(pte) |= _PAGE_FOR; return pte; }
...@@ -311,11 +313,16 @@ extern inline void update_mmu_cache(struct vm_area_struct * vma, ...@@ -311,11 +313,16 @@ extern inline void update_mmu_cache(struct vm_area_struct * vma,
extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset) extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
{ pte_t pte; pte_val(pte) = (type << 32) | (offset << 40); return pte; } { pte_t pte; pte_val(pte) = (type << 32) | (offset << 40); return pte; }
#define __swp_type(x) (((x).val >> 32) & 0xff) #define __swp_type(x) (((x).val >> 32) & 0xff)
#define __swp_offset(x) ((x).val >> 40) #define __swp_offset(x) ((x).val >> 40)
#define __swp_entry(type, offset) ((swp_entry_t) { pte_val(mk_swap_pte((type),(offset))) }) #define __swp_entry(type, off) ((swp_entry_t) { pte_val(mk_swap_pte((type), (off))) })
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
#define __swp_entry_to_pte(x) ((pte_t) { (x).val }) #define __swp_entry_to_pte(x) ((pte_t) { (x).val })
#define pte_to_pgoff(pte) (pte_val(pte) >> 32)
#define pgoff_to_pte(off) ((pte_t) { ((off) << 32) | _PAGE_FILE })
#define PTE_FILE_MAX_BITS 32
#ifndef CONFIG_DISCONTIGMEM #ifndef CONFIG_DISCONTIGMEM
#define kern_addr_valid(addr) (1) #define kern_addr_valid(addr) (1)
......
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