Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6: (27 commits) parisc: use generic atomic64 on 32-bit parisc: superio: fix build breakage parisc: Fix PCI resource allocation on non-PAT SBA machines parisc: perf: wire up sys_perf_counter_open parisc: add task_pt_regs macro parisc: wire sys_perf_counter_open to sys_ni_syscall parisc: inventory.c, fix bloated stack frame parisc: processor.c, fix bloated stack frame parisc: fix compile warning in mm/init.c parisc: remove dead code from sys_parisc32.c parisc: wire up rt_tgsigqueueinfo parisc: ensure broadcast tlb purge runs single threaded parisc: fix "delay!" timer handling parisc: fix mismatched parenthesis in memcpy.c parisc: Fix gcc 4.4 warning in lba_pci.c parisc: add parameter to read_cr16() parisc: decode_exc.c should include kernel.h parisc: remove obsolete hw_interrupt_type parisc: fix irq compile bugs in arch/parisc/kernel/irq.c parisc: advertise PCI devs after "assign_resources" ... Manually fixed up trivial conflicts in tools/perf/perf.h due to addition of SH vs HPPA perf-counter support.
This commit is contained in:
@@ -16,6 +16,8 @@ config PARISC
|
|||||||
select RTC_DRV_GENERIC
|
select RTC_DRV_GENERIC
|
||||||
select INIT_ALL_POSSIBLE
|
select INIT_ALL_POSSIBLE
|
||||||
select BUG
|
select BUG
|
||||||
|
select HAVE_PERF_COUNTERS
|
||||||
|
select GENERIC_ATOMIC64 if !64BIT
|
||||||
help
|
help
|
||||||
The PA-RISC microprocessor is designed by Hewlett-Packard and used
|
The PA-RISC microprocessor is designed by Hewlett-Packard and used
|
||||||
in many of their workstations & servers (HP9000 700 and 800 series,
|
in many of their workstations & servers (HP9000 700 and 800 series,
|
||||||
|
@@ -222,13 +222,13 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
|
|||||||
|
|
||||||
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
|
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
|
||||||
|
|
||||||
#define atomic_add(i,v) ((void)(__atomic_add_return( ((int)(i)),(v))))
|
#define atomic_add(i,v) ((void)(__atomic_add_return( (i),(v))))
|
||||||
#define atomic_sub(i,v) ((void)(__atomic_add_return(-((int)(i)),(v))))
|
#define atomic_sub(i,v) ((void)(__atomic_add_return(-(i),(v))))
|
||||||
#define atomic_inc(v) ((void)(__atomic_add_return( 1,(v))))
|
#define atomic_inc(v) ((void)(__atomic_add_return( 1,(v))))
|
||||||
#define atomic_dec(v) ((void)(__atomic_add_return( -1,(v))))
|
#define atomic_dec(v) ((void)(__atomic_add_return( -1,(v))))
|
||||||
|
|
||||||
#define atomic_add_return(i,v) (__atomic_add_return( ((int)(i)),(v)))
|
#define atomic_add_return(i,v) (__atomic_add_return( (i),(v)))
|
||||||
#define atomic_sub_return(i,v) (__atomic_add_return(-((int)(i)),(v)))
|
#define atomic_sub_return(i,v) (__atomic_add_return(-(i),(v)))
|
||||||
#define atomic_inc_return(v) (__atomic_add_return( 1,(v)))
|
#define atomic_inc_return(v) (__atomic_add_return( 1,(v)))
|
||||||
#define atomic_dec_return(v) (__atomic_add_return( -1,(v)))
|
#define atomic_dec_return(v) (__atomic_add_return( -1,(v)))
|
||||||
|
|
||||||
@@ -336,7 +336,11 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
|
|||||||
|
|
||||||
#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
|
#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
|
||||||
|
|
||||||
#endif /* CONFIG_64BIT */
|
#else /* CONFIG_64BIT */
|
||||||
|
|
||||||
|
#include <asm-generic/atomic64.h>
|
||||||
|
|
||||||
|
#endif /* !CONFIG_64BIT */
|
||||||
|
|
||||||
#include <asm-generic/atomic-long.h>
|
#include <asm-generic/atomic-long.h>
|
||||||
|
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
/* $Id: dma.h,v 1.2 1999/04/27 00:46:18 deller Exp $
|
/* asm/dma.h: Defines for using and allocating dma channels.
|
||||||
* linux/include/asm/dma.h: Defines for using and allocating dma channels.
|
|
||||||
* Written by Hennus Bergman, 1992.
|
* Written by Hennus Bergman, 1992.
|
||||||
* High DMA channel support & info by Hannu Savolainen
|
* High DMA channel support & info by Hannu Savolainen
|
||||||
* and John Boyd, Nov. 1992.
|
* and John Boyd, Nov. 1992.
|
||||||
|
7
arch/parisc/include/asm/perf_counter.h
Normal file
7
arch/parisc/include/asm/perf_counter.h
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#ifndef __ASM_PARISC_PERF_COUNTER_H
|
||||||
|
#define __ASM_PARISC_PERF_COUNTER_H
|
||||||
|
|
||||||
|
/* parisc only supports software counters through this interface. */
|
||||||
|
static inline void set_perf_counter_pending(void) { }
|
||||||
|
|
||||||
|
#endif /* __ASM_PARISC_PERF_COUNTER_H */
|
@@ -18,6 +18,7 @@
|
|||||||
#include <asm/types.h>
|
#include <asm/types.h>
|
||||||
#include <asm/system.h>
|
#include <asm/system.h>
|
||||||
#include <asm/percpu.h>
|
#include <asm/percpu.h>
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
#define KERNEL_STACK_SIZE (4*PAGE_SIZE)
|
#define KERNEL_STACK_SIZE (4*PAGE_SIZE)
|
||||||
@@ -127,6 +128,8 @@ struct thread_struct {
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define task_pt_regs(tsk) ((struct pt_regs *)&((tsk)->thread.regs))
|
||||||
|
|
||||||
/* Thread struct flags. */
|
/* Thread struct flags. */
|
||||||
#define PARISC_UAC_NOPRINT (1UL << 0) /* see prctl and unaligned.c */
|
#define PARISC_UAC_NOPRINT (1UL << 0) /* see prctl and unaligned.c */
|
||||||
#define PARISC_UAC_SIGBUS (1UL << 1)
|
#define PARISC_UAC_SIGBUS (1UL << 1)
|
||||||
|
@@ -168,8 +168,8 @@ static inline void set_eiem(unsigned long val)
|
|||||||
/* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. */
|
/* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. */
|
||||||
#define __ldcw(a) ({ \
|
#define __ldcw(a) ({ \
|
||||||
unsigned __ret; \
|
unsigned __ret; \
|
||||||
__asm__ __volatile__(__LDCW " 0(%1),%0" \
|
__asm__ __volatile__(__LDCW " 0(%2),%0" \
|
||||||
: "=r" (__ret) : "r" (a)); \
|
: "=r" (__ret), "+m" (*(a)) : "r" (a)); \
|
||||||
__ret; \
|
__ret; \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@@ -12,14 +12,12 @@
|
|||||||
* N class systems, only one PxTLB inter processor broadcast can be
|
* N class systems, only one PxTLB inter processor broadcast can be
|
||||||
* active at any one time on the Merced bus. This tlb purge
|
* active at any one time on the Merced bus. This tlb purge
|
||||||
* synchronisation is fairly lightweight and harmless so we activate
|
* synchronisation is fairly lightweight and harmless so we activate
|
||||||
* it on all SMP systems not just the N class. We also need to have
|
* it on all systems not just the N class.
|
||||||
* preemption disabled on uniprocessor machines, and spin_lock does that
|
|
||||||
* nicely.
|
|
||||||
*/
|
*/
|
||||||
extern spinlock_t pa_tlb_lock;
|
extern spinlock_t pa_tlb_lock;
|
||||||
|
|
||||||
#define purge_tlb_start(x) spin_lock(&pa_tlb_lock)
|
#define purge_tlb_start(flags) spin_lock_irqsave(&pa_tlb_lock, flags)
|
||||||
#define purge_tlb_end(x) spin_unlock(&pa_tlb_lock)
|
#define purge_tlb_end(flags) spin_unlock_irqrestore(&pa_tlb_lock, flags)
|
||||||
|
|
||||||
extern void flush_tlb_all(void);
|
extern void flush_tlb_all(void);
|
||||||
extern void flush_tlb_all_local(void *);
|
extern void flush_tlb_all_local(void *);
|
||||||
@@ -63,14 +61,16 @@ static inline void flush_tlb_mm(struct mm_struct *mm)
|
|||||||
static inline void flush_tlb_page(struct vm_area_struct *vma,
|
static inline void flush_tlb_page(struct vm_area_struct *vma,
|
||||||
unsigned long addr)
|
unsigned long addr)
|
||||||
{
|
{
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
/* For one page, it's not worth testing the split_tlb variable */
|
/* For one page, it's not worth testing the split_tlb variable */
|
||||||
|
|
||||||
mb();
|
mb();
|
||||||
mtsp(vma->vm_mm->context,1);
|
mtsp(vma->vm_mm->context,1);
|
||||||
purge_tlb_start();
|
purge_tlb_start(flags);
|
||||||
pdtlb(addr);
|
pdtlb(addr);
|
||||||
pitlb(addr);
|
pitlb(addr);
|
||||||
purge_tlb_end();
|
purge_tlb_end(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __flush_tlb_range(unsigned long sid,
|
void __flush_tlb_range(unsigned long sid,
|
||||||
|
@@ -807,8 +807,12 @@
|
|||||||
#define __NR_dup3 (__NR_Linux + 312)
|
#define __NR_dup3 (__NR_Linux + 312)
|
||||||
#define __NR_pipe2 (__NR_Linux + 313)
|
#define __NR_pipe2 (__NR_Linux + 313)
|
||||||
#define __NR_inotify_init1 (__NR_Linux + 314)
|
#define __NR_inotify_init1 (__NR_Linux + 314)
|
||||||
|
#define __NR_preadv (__NR_Linux + 315)
|
||||||
|
#define __NR_pwritev (__NR_Linux + 316)
|
||||||
|
#define __NR_rt_tgsigqueueinfo (__NR_Linux + 317)
|
||||||
|
#define __NR_perf_counter_open (__NR_Linux + 318)
|
||||||
|
|
||||||
#define __NR_Linux_syscalls (__NR_inotify_init1 + 1)
|
#define __NR_Linux_syscalls (__NR_perf_counter_open + 1)
|
||||||
|
|
||||||
|
|
||||||
#define __IGNORE_select /* newselect */
|
#define __IGNORE_select /* newselect */
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
/* $Id: cache.c,v 1.4 2000/01/25 00:11:38 prumpf Exp $
|
/*
|
||||||
*
|
|
||||||
* This file is subject to the terms and conditions of the GNU General Public
|
* This file is subject to the terms and conditions of the GNU General Public
|
||||||
* License. See the file "COPYING" in the main directory of this archive
|
* License. See the file "COPYING" in the main directory of this archive
|
||||||
* for more details.
|
* for more details.
|
||||||
@@ -398,12 +397,13 @@ EXPORT_SYMBOL(flush_kernel_icache_range_asm);
|
|||||||
|
|
||||||
void clear_user_page_asm(void *page, unsigned long vaddr)
|
void clear_user_page_asm(void *page, unsigned long vaddr)
|
||||||
{
|
{
|
||||||
|
unsigned long flags;
|
||||||
/* This function is implemented in assembly in pacache.S */
|
/* This function is implemented in assembly in pacache.S */
|
||||||
extern void __clear_user_page_asm(void *page, unsigned long vaddr);
|
extern void __clear_user_page_asm(void *page, unsigned long vaddr);
|
||||||
|
|
||||||
purge_tlb_start();
|
purge_tlb_start(flags);
|
||||||
__clear_user_page_asm(page, vaddr);
|
__clear_user_page_asm(page, vaddr);
|
||||||
purge_tlb_end();
|
purge_tlb_end(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define FLUSH_THRESHOLD 0x80000 /* 0.5MB */
|
#define FLUSH_THRESHOLD 0x80000 /* 0.5MB */
|
||||||
@@ -444,20 +444,24 @@ extern void clear_user_page_asm(void *page, unsigned long vaddr);
|
|||||||
|
|
||||||
void clear_user_page(void *page, unsigned long vaddr, struct page *pg)
|
void clear_user_page(void *page, unsigned long vaddr, struct page *pg)
|
||||||
{
|
{
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
purge_kernel_dcache_page((unsigned long)page);
|
purge_kernel_dcache_page((unsigned long)page);
|
||||||
purge_tlb_start();
|
purge_tlb_start(flags);
|
||||||
pdtlb_kernel(page);
|
pdtlb_kernel(page);
|
||||||
purge_tlb_end();
|
purge_tlb_end(flags);
|
||||||
clear_user_page_asm(page, vaddr);
|
clear_user_page_asm(page, vaddr);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(clear_user_page);
|
EXPORT_SYMBOL(clear_user_page);
|
||||||
|
|
||||||
void flush_kernel_dcache_page_addr(void *addr)
|
void flush_kernel_dcache_page_addr(void *addr)
|
||||||
{
|
{
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
flush_kernel_dcache_page_asm(addr);
|
flush_kernel_dcache_page_asm(addr);
|
||||||
purge_tlb_start();
|
purge_tlb_start(flags);
|
||||||
pdtlb_kernel(addr);
|
pdtlb_kernel(addr);
|
||||||
purge_tlb_end();
|
purge_tlb_end(flags);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(flush_kernel_dcache_page_addr);
|
EXPORT_SYMBOL(flush_kernel_dcache_page_addr);
|
||||||
|
|
||||||
@@ -490,8 +494,10 @@ void __flush_tlb_range(unsigned long sid, unsigned long start,
|
|||||||
if (npages >= 512) /* 2MB of space: arbitrary, should be tuned */
|
if (npages >= 512) /* 2MB of space: arbitrary, should be tuned */
|
||||||
flush_tlb_all();
|
flush_tlb_all();
|
||||||
else {
|
else {
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
mtsp(sid, 1);
|
mtsp(sid, 1);
|
||||||
purge_tlb_start();
|
purge_tlb_start(flags);
|
||||||
if (split_tlb) {
|
if (split_tlb) {
|
||||||
while (npages--) {
|
while (npages--) {
|
||||||
pdtlb(start);
|
pdtlb(start);
|
||||||
@@ -504,7 +510,7 @@ void __flush_tlb_range(unsigned long sid, unsigned long start,
|
|||||||
start += PAGE_SIZE;
|
start += PAGE_SIZE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
purge_tlb_end();
|
purge_tlb_end(flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -170,23 +170,27 @@ static void __init pagezero_memconfig(void)
|
|||||||
static int __init
|
static int __init
|
||||||
pat_query_module(ulong pcell_loc, ulong mod_index)
|
pat_query_module(ulong pcell_loc, ulong mod_index)
|
||||||
{
|
{
|
||||||
pdc_pat_cell_mod_maddr_block_t pa_pdc_cell;
|
pdc_pat_cell_mod_maddr_block_t *pa_pdc_cell;
|
||||||
unsigned long bytecnt;
|
unsigned long bytecnt;
|
||||||
unsigned long temp; /* 64-bit scratch value */
|
unsigned long temp; /* 64-bit scratch value */
|
||||||
long status; /* PDC return value status */
|
long status; /* PDC return value status */
|
||||||
struct parisc_device *dev;
|
struct parisc_device *dev;
|
||||||
|
|
||||||
|
pa_pdc_cell = kmalloc(sizeof (*pa_pdc_cell), GFP_KERNEL);
|
||||||
|
if (!pa_pdc_cell)
|
||||||
|
panic("couldn't allocate memory for PDC_PAT_CELL!");
|
||||||
|
|
||||||
/* return cell module (PA or Processor view) */
|
/* return cell module (PA or Processor view) */
|
||||||
status = pdc_pat_cell_module(&bytecnt, pcell_loc, mod_index,
|
status = pdc_pat_cell_module(&bytecnt, pcell_loc, mod_index,
|
||||||
PA_VIEW, &pa_pdc_cell);
|
PA_VIEW, pa_pdc_cell);
|
||||||
|
|
||||||
if (status != PDC_OK) {
|
if (status != PDC_OK) {
|
||||||
/* no more cell modules or error */
|
/* no more cell modules or error */
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp = pa_pdc_cell.cba;
|
temp = pa_pdc_cell->cba;
|
||||||
dev = alloc_pa_dev(PAT_GET_CBA(temp), &pa_pdc_cell.mod_path);
|
dev = alloc_pa_dev(PAT_GET_CBA(temp), &(pa_pdc_cell->mod_path));
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
return PDC_OK;
|
return PDC_OK;
|
||||||
}
|
}
|
||||||
@@ -203,8 +207,8 @@ pat_query_module(ulong pcell_loc, ulong mod_index)
|
|||||||
|
|
||||||
/* save generic info returned from the call */
|
/* save generic info returned from the call */
|
||||||
/* REVISIT: who is the consumer of this? not sure yet... */
|
/* REVISIT: who is the consumer of this? not sure yet... */
|
||||||
dev->mod_info = pa_pdc_cell.mod_info; /* pass to PAT_GET_ENTITY() */
|
dev->mod_info = pa_pdc_cell->mod_info; /* pass to PAT_GET_ENTITY() */
|
||||||
dev->pmod_loc = pa_pdc_cell.mod_location;
|
dev->pmod_loc = pa_pdc_cell->mod_location;
|
||||||
|
|
||||||
register_parisc_device(dev); /* advertise device */
|
register_parisc_device(dev); /* advertise device */
|
||||||
|
|
||||||
@@ -216,14 +220,14 @@ pat_query_module(ulong pcell_loc, ulong mod_index)
|
|||||||
|
|
||||||
case PAT_ENTITY_PROC:
|
case PAT_ENTITY_PROC:
|
||||||
printk(KERN_DEBUG "PAT_ENTITY_PROC: id_eid 0x%lx\n",
|
printk(KERN_DEBUG "PAT_ENTITY_PROC: id_eid 0x%lx\n",
|
||||||
pa_pdc_cell.mod[0]);
|
pa_pdc_cell->mod[0]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PAT_ENTITY_MEM:
|
case PAT_ENTITY_MEM:
|
||||||
printk(KERN_DEBUG
|
printk(KERN_DEBUG
|
||||||
"PAT_ENTITY_MEM: amount 0x%lx min_gni_base 0x%lx min_gni_len 0x%lx\n",
|
"PAT_ENTITY_MEM: amount 0x%lx min_gni_base 0x%lx min_gni_len 0x%lx\n",
|
||||||
pa_pdc_cell.mod[0], pa_pdc_cell.mod[1],
|
pa_pdc_cell->mod[0], pa_pdc_cell->mod[1],
|
||||||
pa_pdc_cell.mod[2]);
|
pa_pdc_cell->mod[2]);
|
||||||
break;
|
break;
|
||||||
case PAT_ENTITY_CA:
|
case PAT_ENTITY_CA:
|
||||||
printk(KERN_DEBUG "PAT_ENTITY_CA: %ld\n", pcell_loc);
|
printk(KERN_DEBUG "PAT_ENTITY_CA: %ld\n", pcell_loc);
|
||||||
@@ -243,23 +247,26 @@ pat_query_module(ulong pcell_loc, ulong mod_index)
|
|||||||
print_ranges:
|
print_ranges:
|
||||||
pdc_pat_cell_module(&bytecnt, pcell_loc, mod_index,
|
pdc_pat_cell_module(&bytecnt, pcell_loc, mod_index,
|
||||||
IO_VIEW, &io_pdc_cell);
|
IO_VIEW, &io_pdc_cell);
|
||||||
printk(KERN_DEBUG "ranges %ld\n", pa_pdc_cell.mod[1]);
|
printk(KERN_DEBUG "ranges %ld\n", pa_pdc_cell->mod[1]);
|
||||||
for (i = 0; i < pa_pdc_cell.mod[1]; i++) {
|
for (i = 0; i < pa_pdc_cell->mod[1]; i++) {
|
||||||
printk(KERN_DEBUG
|
printk(KERN_DEBUG
|
||||||
" PA_VIEW %ld: 0x%016lx 0x%016lx 0x%016lx\n",
|
" PA_VIEW %ld: 0x%016lx 0x%016lx 0x%016lx\n",
|
||||||
i, pa_pdc_cell.mod[2 + i * 3], /* type */
|
i, pa_pdc_cell->mod[2 + i * 3], /* type */
|
||||||
pa_pdc_cell.mod[3 + i * 3], /* start */
|
pa_pdc_cell->mod[3 + i * 3], /* start */
|
||||||
pa_pdc_cell.mod[4 + i * 3]); /* finish (ie end) */
|
pa_pdc_cell->mod[4 + i * 3]); /* finish (ie end) */
|
||||||
printk(KERN_DEBUG
|
printk(KERN_DEBUG
|
||||||
" IO_VIEW %ld: 0x%016lx 0x%016lx 0x%016lx\n",
|
" IO_VIEW %ld: 0x%016lx 0x%016lx 0x%016lx\n",
|
||||||
i, io_pdc_cell.mod[2 + i * 3], /* type */
|
i, io_pdc_cell->mod[2 + i * 3], /* type */
|
||||||
io_pdc_cell.mod[3 + i * 3], /* start */
|
io_pdc_cell->mod[3 + i * 3], /* start */
|
||||||
io_pdc_cell.mod[4 + i * 3]); /* finish (ie end) */
|
io_pdc_cell->mod[4 + i * 3]); /* finish (ie end) */
|
||||||
}
|
}
|
||||||
printk(KERN_DEBUG "\n");
|
printk(KERN_DEBUG "\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif /* DEBUG_PAT */
|
#endif /* DEBUG_PAT */
|
||||||
|
|
||||||
|
kfree(pa_pdc_cell);
|
||||||
|
|
||||||
return PDC_OK;
|
return PDC_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -120,7 +120,7 @@ int cpu_check_affinity(unsigned int irq, const struct cpumask *dest)
|
|||||||
if (CHECK_IRQ_PER_CPU(irq)) {
|
if (CHECK_IRQ_PER_CPU(irq)) {
|
||||||
/* Bad linux design decision. The mask has already
|
/* Bad linux design decision. The mask has already
|
||||||
* been set; we must reset it */
|
* been set; we must reset it */
|
||||||
cpumask_setall(&irq_desc[irq].affinity);
|
cpumask_setall(irq_desc[irq].affinity);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,13 +138,13 @@ static int cpu_set_affinity_irq(unsigned int irq, const struct cpumask *dest)
|
|||||||
if (cpu_dest < 0)
|
if (cpu_dest < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
cpumask_copy(&irq_desc[irq].affinity, dest);
|
cpumask_copy(irq_desc[irq].affinity, dest);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct hw_interrupt_type cpu_interrupt_type = {
|
static struct irq_chip cpu_interrupt_type = {
|
||||||
.typename = "CPU",
|
.typename = "CPU",
|
||||||
.startup = cpu_startup_irq,
|
.startup = cpu_startup_irq,
|
||||||
.shutdown = cpu_disable_irq,
|
.shutdown = cpu_disable_irq,
|
||||||
@@ -299,7 +299,7 @@ int txn_alloc_irq(unsigned int bits_wide)
|
|||||||
unsigned long txn_affinity_addr(unsigned int irq, int cpu)
|
unsigned long txn_affinity_addr(unsigned int irq, int cpu)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
cpumask_copy(&irq_desc[irq].affinity, cpumask_of(cpu));
|
cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return per_cpu(cpu_data, cpu).txn_addr;
|
return per_cpu(cpu_data, cpu).txn_addr;
|
||||||
@@ -356,7 +356,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
|
|||||||
irq = eirr_to_irq(eirr_val);
|
irq = eirr_to_irq(eirr_val);
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
cpumask_copy(&dest, &irq_desc[irq].affinity);
|
cpumask_copy(&dest, irq_desc[irq].affinity);
|
||||||
if (CHECK_IRQ_PER_CPU(irq_desc[irq].status) &&
|
if (CHECK_IRQ_PER_CPU(irq_desc[irq].status) &&
|
||||||
!cpu_isset(smp_processor_id(), dest)) {
|
!cpu_isset(smp_processor_id(), dest)) {
|
||||||
int cpu = first_cpu(dest);
|
int cpu = first_cpu(dest);
|
||||||
|
@@ -90,12 +90,14 @@ static inline int map_pte_uncached(pte_t * pte,
|
|||||||
if (end > PMD_SIZE)
|
if (end > PMD_SIZE)
|
||||||
end = PMD_SIZE;
|
end = PMD_SIZE;
|
||||||
do {
|
do {
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
if (!pte_none(*pte))
|
if (!pte_none(*pte))
|
||||||
printk(KERN_ERR "map_pte_uncached: page already exists\n");
|
printk(KERN_ERR "map_pte_uncached: page already exists\n");
|
||||||
set_pte(pte, __mk_pte(*paddr_ptr, PAGE_KERNEL_UNC));
|
set_pte(pte, __mk_pte(*paddr_ptr, PAGE_KERNEL_UNC));
|
||||||
purge_tlb_start();
|
purge_tlb_start(flags);
|
||||||
pdtlb_kernel(orig_vaddr);
|
pdtlb_kernel(orig_vaddr);
|
||||||
purge_tlb_end();
|
purge_tlb_end(flags);
|
||||||
vaddr += PAGE_SIZE;
|
vaddr += PAGE_SIZE;
|
||||||
orig_vaddr += PAGE_SIZE;
|
orig_vaddr += PAGE_SIZE;
|
||||||
(*paddr_ptr) += PAGE_SIZE;
|
(*paddr_ptr) += PAGE_SIZE;
|
||||||
@@ -168,11 +170,13 @@ static inline void unmap_uncached_pte(pmd_t * pmd, unsigned long vaddr,
|
|||||||
if (end > PMD_SIZE)
|
if (end > PMD_SIZE)
|
||||||
end = PMD_SIZE;
|
end = PMD_SIZE;
|
||||||
do {
|
do {
|
||||||
|
unsigned long flags;
|
||||||
pte_t page = *pte;
|
pte_t page = *pte;
|
||||||
|
|
||||||
pte_clear(&init_mm, vaddr, pte);
|
pte_clear(&init_mm, vaddr, pte);
|
||||||
purge_tlb_start();
|
purge_tlb_start(flags);
|
||||||
pdtlb_kernel(orig_vaddr);
|
pdtlb_kernel(orig_vaddr);
|
||||||
purge_tlb_end();
|
purge_tlb_end(flags);
|
||||||
vaddr += PAGE_SIZE;
|
vaddr += PAGE_SIZE;
|
||||||
orig_vaddr += PAGE_SIZE;
|
orig_vaddr += PAGE_SIZE;
|
||||||
pte++;
|
pte++;
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
/* $Id: pci.c,v 1.6 2000/01/29 00:12:05 grundler Exp $
|
/*
|
||||||
*
|
|
||||||
* This file is subject to the terms and conditions of the GNU General Public
|
* This file is subject to the terms and conditions of the GNU General Public
|
||||||
* License. See the file "COPYING" in the main directory of this archive
|
* License. See the file "COPYING" in the main directory of this archive
|
||||||
* for more details.
|
* for more details.
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
/* $Id: processor.c,v 1.1 2002/07/20 16:27:06 rhirst Exp $
|
/*
|
||||||
*
|
|
||||||
* Initial setup-routines for HP 9000 based hardware.
|
* Initial setup-routines for HP 9000 based hardware.
|
||||||
*
|
*
|
||||||
* Copyright (C) 1991, 1992, 1995 Linus Torvalds
|
* Copyright (C) 1991, 1992, 1995 Linus Torvalds
|
||||||
@@ -121,22 +120,28 @@ static int __cpuinit processor_probe(struct parisc_device *dev)
|
|||||||
if (is_pdc_pat()) {
|
if (is_pdc_pat()) {
|
||||||
ulong status;
|
ulong status;
|
||||||
unsigned long bytecnt;
|
unsigned long bytecnt;
|
||||||
pdc_pat_cell_mod_maddr_block_t pa_pdc_cell;
|
pdc_pat_cell_mod_maddr_block_t *pa_pdc_cell;
|
||||||
#undef USE_PAT_CPUID
|
#undef USE_PAT_CPUID
|
||||||
#ifdef USE_PAT_CPUID
|
#ifdef USE_PAT_CPUID
|
||||||
struct pdc_pat_cpu_num cpu_info;
|
struct pdc_pat_cpu_num cpu_info;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
pa_pdc_cell = kmalloc(sizeof (*pa_pdc_cell), GFP_KERNEL);
|
||||||
|
if (!pa_pdc_cell)
|
||||||
|
panic("couldn't allocate memory for PDC_PAT_CELL!");
|
||||||
|
|
||||||
status = pdc_pat_cell_module(&bytecnt, dev->pcell_loc,
|
status = pdc_pat_cell_module(&bytecnt, dev->pcell_loc,
|
||||||
dev->mod_index, PA_VIEW, &pa_pdc_cell);
|
dev->mod_index, PA_VIEW, pa_pdc_cell);
|
||||||
|
|
||||||
BUG_ON(PDC_OK != status);
|
BUG_ON(PDC_OK != status);
|
||||||
|
|
||||||
/* verify it's the same as what do_pat_inventory() found */
|
/* verify it's the same as what do_pat_inventory() found */
|
||||||
BUG_ON(dev->mod_info != pa_pdc_cell.mod_info);
|
BUG_ON(dev->mod_info != pa_pdc_cell->mod_info);
|
||||||
BUG_ON(dev->pmod_loc != pa_pdc_cell.mod_location);
|
BUG_ON(dev->pmod_loc != pa_pdc_cell->mod_location);
|
||||||
|
|
||||||
txn_addr = pa_pdc_cell.mod[0]; /* id_eid for IO sapic */
|
txn_addr = pa_pdc_cell->mod[0]; /* id_eid for IO sapic */
|
||||||
|
|
||||||
|
kfree(pa_pdc_cell);
|
||||||
|
|
||||||
#ifdef USE_PAT_CPUID
|
#ifdef USE_PAT_CPUID
|
||||||
/* We need contiguous numbers for cpuid. Firmware's notion
|
/* We need contiguous numbers for cpuid. Firmware's notion
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
/* $Id: setup.c,v 1.8 2000/02/02 04:42:38 prumpf Exp $
|
/*
|
||||||
*
|
|
||||||
* Initial setup-routines for HP 9000 based hardware.
|
* Initial setup-routines for HP 9000 based hardware.
|
||||||
*
|
*
|
||||||
* Copyright (C) 1991, 1992, 1995 Linus Torvalds
|
* Copyright (C) 1991, 1992, 1995 Linus Torvalds
|
||||||
|
@@ -174,68 +174,6 @@ asmlinkage long sys32_sched_rr_get_interval(pid_t pid,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*** copied from mips64 ***/
|
|
||||||
/*
|
|
||||||
* Ooo, nasty. We need here to frob 32-bit unsigned longs to
|
|
||||||
* 64-bit unsigned longs.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static inline int
|
|
||||||
get_fd_set32(unsigned long n, u32 *ufdset, unsigned long *fdset)
|
|
||||||
{
|
|
||||||
n = (n + 8*sizeof(u32) - 1) / (8*sizeof(u32));
|
|
||||||
if (ufdset) {
|
|
||||||
unsigned long odd;
|
|
||||||
|
|
||||||
if (!access_ok(VERIFY_WRITE, ufdset, n*sizeof(u32)))
|
|
||||||
return -EFAULT;
|
|
||||||
|
|
||||||
odd = n & 1UL;
|
|
||||||
n &= ~1UL;
|
|
||||||
while (n) {
|
|
||||||
unsigned long h, l;
|
|
||||||
__get_user(l, ufdset);
|
|
||||||
__get_user(h, ufdset+1);
|
|
||||||
ufdset += 2;
|
|
||||||
*fdset++ = h << 32 | l;
|
|
||||||
n -= 2;
|
|
||||||
}
|
|
||||||
if (odd)
|
|
||||||
__get_user(*fdset, ufdset);
|
|
||||||
} else {
|
|
||||||
/* Tricky, must clear full unsigned long in the
|
|
||||||
* kernel fdset at the end, this makes sure that
|
|
||||||
* actually happens.
|
|
||||||
*/
|
|
||||||
memset(fdset, 0, ((n + 1) & ~1)*sizeof(u32));
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
set_fd_set32(unsigned long n, u32 *ufdset, unsigned long *fdset)
|
|
||||||
{
|
|
||||||
unsigned long odd;
|
|
||||||
n = (n + 8*sizeof(u32) - 1) / (8*sizeof(u32));
|
|
||||||
|
|
||||||
if (!ufdset)
|
|
||||||
return;
|
|
||||||
|
|
||||||
odd = n & 1UL;
|
|
||||||
n &= ~1UL;
|
|
||||||
while (n) {
|
|
||||||
unsigned long h, l;
|
|
||||||
l = *fdset++;
|
|
||||||
h = l >> 32;
|
|
||||||
__put_user(l, ufdset);
|
|
||||||
__put_user(h, ufdset+1);
|
|
||||||
ufdset += 2;
|
|
||||||
n -= 2;
|
|
||||||
}
|
|
||||||
if (odd)
|
|
||||||
__put_user(*fdset, ufdset);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct msgbuf32 {
|
struct msgbuf32 {
|
||||||
int mtype;
|
int mtype;
|
||||||
char mtext[1];
|
char mtext[1];
|
||||||
|
@@ -413,6 +413,10 @@
|
|||||||
ENTRY_SAME(dup3)
|
ENTRY_SAME(dup3)
|
||||||
ENTRY_SAME(pipe2)
|
ENTRY_SAME(pipe2)
|
||||||
ENTRY_SAME(inotify_init1)
|
ENTRY_SAME(inotify_init1)
|
||||||
|
ENTRY_COMP(preadv) /* 315 */
|
||||||
|
ENTRY_COMP(pwritev)
|
||||||
|
ENTRY_COMP(rt_tgsigqueueinfo)
|
||||||
|
ENTRY_SAME(perf_counter_open)
|
||||||
|
|
||||||
/* Nothing yet */
|
/* Nothing yet */
|
||||||
|
|
||||||
|
@@ -56,9 +56,9 @@ static unsigned long clocktick __read_mostly; /* timer cycles per tick */
|
|||||||
*/
|
*/
|
||||||
irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id)
|
irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
unsigned long now;
|
unsigned long now, now2;
|
||||||
unsigned long next_tick;
|
unsigned long next_tick;
|
||||||
unsigned long cycles_elapsed, ticks_elapsed;
|
unsigned long cycles_elapsed, ticks_elapsed = 1;
|
||||||
unsigned long cycles_remainder;
|
unsigned long cycles_remainder;
|
||||||
unsigned int cpu = smp_processor_id();
|
unsigned int cpu = smp_processor_id();
|
||||||
struct cpuinfo_parisc *cpuinfo = &per_cpu(cpu_data, cpu);
|
struct cpuinfo_parisc *cpuinfo = &per_cpu(cpu_data, cpu);
|
||||||
@@ -71,44 +71,24 @@ irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id)
|
|||||||
/* Initialize next_tick to the expected tick time. */
|
/* Initialize next_tick to the expected tick time. */
|
||||||
next_tick = cpuinfo->it_value;
|
next_tick = cpuinfo->it_value;
|
||||||
|
|
||||||
/* Get current interval timer.
|
/* Get current cycle counter (Control Register 16). */
|
||||||
* CR16 reads as 64 bits in CPU wide mode.
|
|
||||||
* CR16 reads as 32 bits in CPU narrow mode.
|
|
||||||
*/
|
|
||||||
now = mfctl(16);
|
now = mfctl(16);
|
||||||
|
|
||||||
cycles_elapsed = now - next_tick;
|
cycles_elapsed = now - next_tick;
|
||||||
|
|
||||||
if ((cycles_elapsed >> 5) < cpt) {
|
if ((cycles_elapsed >> 6) < cpt) {
|
||||||
/* use "cheap" math (add/subtract) instead
|
/* use "cheap" math (add/subtract) instead
|
||||||
* of the more expensive div/mul method
|
* of the more expensive div/mul method
|
||||||
*/
|
*/
|
||||||
cycles_remainder = cycles_elapsed;
|
cycles_remainder = cycles_elapsed;
|
||||||
ticks_elapsed = 1;
|
|
||||||
while (cycles_remainder > cpt) {
|
while (cycles_remainder > cpt) {
|
||||||
cycles_remainder -= cpt;
|
cycles_remainder -= cpt;
|
||||||
ticks_elapsed++;
|
ticks_elapsed++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
/* TODO: Reduce this to one fdiv op */
|
||||||
cycles_remainder = cycles_elapsed % cpt;
|
cycles_remainder = cycles_elapsed % cpt;
|
||||||
ticks_elapsed = 1 + cycles_elapsed / cpt;
|
ticks_elapsed += cycles_elapsed / cpt;
|
||||||
}
|
|
||||||
|
|
||||||
/* Can we differentiate between "early CR16" (aka Scenario 1) and
|
|
||||||
* "long delay" (aka Scenario 3)? I don't think so.
|
|
||||||
*
|
|
||||||
* We expected timer_interrupt to be delivered at least a few hundred
|
|
||||||
* cycles after the IT fires. But it's arbitrary how much time passes
|
|
||||||
* before we call it "late". I've picked one second.
|
|
||||||
*/
|
|
||||||
if (unlikely(ticks_elapsed > HZ)) {
|
|
||||||
/* Scenario 3: very long delay? bad in any case */
|
|
||||||
printk (KERN_CRIT "timer_interrupt(CPU %d): delayed!"
|
|
||||||
" cycles %lX rem %lX "
|
|
||||||
" next/now %lX/%lX\n",
|
|
||||||
cpu,
|
|
||||||
cycles_elapsed, cycles_remainder,
|
|
||||||
next_tick, now );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* convert from "division remainder" to "remainder of clock tick" */
|
/* convert from "division remainder" to "remainder of clock tick" */
|
||||||
@@ -122,18 +102,56 @@ irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id)
|
|||||||
|
|
||||||
cpuinfo->it_value = next_tick;
|
cpuinfo->it_value = next_tick;
|
||||||
|
|
||||||
/* Skip one clocktick on purpose if we are likely to miss next_tick.
|
/* Program the IT when to deliver the next interrupt.
|
||||||
* We want to avoid the new next_tick being less than CR16.
|
* Only bottom 32-bits of next_tick are writable in CR16!
|
||||||
* If that happened, itimer wouldn't fire until CR16 wrapped.
|
|
||||||
* We'll catch the tick we missed on the tick after that.
|
|
||||||
*/
|
*/
|
||||||
if (!(cycles_remainder >> 13))
|
|
||||||
next_tick += cpt;
|
|
||||||
|
|
||||||
/* Program the IT when to deliver the next interrupt. */
|
|
||||||
/* Only bottom 32-bits of next_tick are written to cr16. */
|
|
||||||
mtctl(next_tick, 16);
|
mtctl(next_tick, 16);
|
||||||
|
|
||||||
|
/* Skip one clocktick on purpose if we missed next_tick.
|
||||||
|
* The new CR16 must be "later" than current CR16 otherwise
|
||||||
|
* itimer would not fire until CR16 wrapped - e.g 4 seconds
|
||||||
|
* later on a 1Ghz processor. We'll account for the missed
|
||||||
|
* tick on the next timer interrupt.
|
||||||
|
*
|
||||||
|
* "next_tick - now" will always give the difference regardless
|
||||||
|
* if one or the other wrapped. If "now" is "bigger" we'll end up
|
||||||
|
* with a very large unsigned number.
|
||||||
|
*/
|
||||||
|
now2 = mfctl(16);
|
||||||
|
if (next_tick - now2 > cpt)
|
||||||
|
mtctl(next_tick+cpt, 16);
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
/*
|
||||||
|
* GGG: DEBUG code for how many cycles programming CR16 used.
|
||||||
|
*/
|
||||||
|
if (unlikely(now2 - now > 0x3000)) /* 12K cycles */
|
||||||
|
printk (KERN_CRIT "timer_interrupt(CPU %d): SLOW! 0x%lx cycles!"
|
||||||
|
" cyc %lX rem %lX "
|
||||||
|
" next/now %lX/%lX\n",
|
||||||
|
cpu, now2 - now, cycles_elapsed, cycles_remainder,
|
||||||
|
next_tick, now );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Can we differentiate between "early CR16" (aka Scenario 1) and
|
||||||
|
* "long delay" (aka Scenario 3)? I don't think so.
|
||||||
|
*
|
||||||
|
* Timer_interrupt will be delivered at least a few hundred cycles
|
||||||
|
* after the IT fires. But it's arbitrary how much time passes
|
||||||
|
* before we call it "late". I've picked one second.
|
||||||
|
*
|
||||||
|
* It's important NO printk's are between reading CR16 and
|
||||||
|
* setting up the next value. May introduce huge variance.
|
||||||
|
*/
|
||||||
|
if (unlikely(ticks_elapsed > HZ)) {
|
||||||
|
/* Scenario 3: very long delay? bad in any case */
|
||||||
|
printk (KERN_CRIT "timer_interrupt(CPU %d): delayed!"
|
||||||
|
" cycles %lX rem %lX "
|
||||||
|
" next/now %lX/%lX\n",
|
||||||
|
cpu,
|
||||||
|
cycles_elapsed, cycles_remainder,
|
||||||
|
next_tick, now );
|
||||||
|
}
|
||||||
|
|
||||||
/* Done mucking with unreliable delivery of interrupts.
|
/* Done mucking with unreliable delivery of interrupts.
|
||||||
* Go do system house keeping.
|
* Go do system house keeping.
|
||||||
@@ -173,7 +191,7 @@ EXPORT_SYMBOL(profile_pc);
|
|||||||
|
|
||||||
/* clock source code */
|
/* clock source code */
|
||||||
|
|
||||||
static cycle_t read_cr16(void)
|
static cycle_t read_cr16(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return get_cycles();
|
return get_cycles();
|
||||||
}
|
}
|
||||||
|
@@ -13,8 +13,6 @@
|
|||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation; either version
|
* as published by the Free Software Foundation; either version
|
||||||
* 2 of the License, or (at your option) any later version.
|
* 2 of the License, or (at your option) any later version.
|
||||||
*
|
|
||||||
* $Id: checksum.c,v 1.3 1997/12/01 17:57:34 ralf Exp $
|
|
||||||
*/
|
*/
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
|
@@ -405,7 +405,7 @@ byte_copy:
|
|||||||
|
|
||||||
unaligned_copy:
|
unaligned_copy:
|
||||||
/* possibly we are aligned on a word, but not on a double... */
|
/* possibly we are aligned on a word, but not on a double... */
|
||||||
if (likely(t1 & (sizeof(unsigned int)-1)) == 0) {
|
if (likely((t1 & (sizeof(unsigned int)-1)) == 0)) {
|
||||||
t2 = src & (sizeof(unsigned int) - 1);
|
t2 = src & (sizeof(unsigned int) - 1);
|
||||||
|
|
||||||
if (unlikely(t2 != 0)) {
|
if (unlikely(t2 != 0)) {
|
||||||
|
@@ -40,7 +40,7 @@
|
|||||||
* END_DESC
|
* END_DESC
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <linux/kernel.h>
|
||||||
#include "float.h"
|
#include "float.h"
|
||||||
#include "sgl_float.h"
|
#include "sgl_float.h"
|
||||||
#include "dbl_float.h"
|
#include "dbl_float.h"
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
/* $Id: fault.c,v 1.5 2000/01/26 16:20:29 jsm Exp $
|
/*
|
||||||
*
|
|
||||||
* This file is subject to the terms and conditions of the GNU General Public
|
* This file is subject to the terms and conditions of the GNU General Public
|
||||||
* License. See the file "COPYING" in the main directory of this archive
|
* License. See the file "COPYING" in the main directory of this archive
|
||||||
* for more details.
|
* for more details.
|
||||||
|
@@ -370,34 +370,22 @@ static void __init setup_bootmem(void)
|
|||||||
|
|
||||||
void free_initmem(void)
|
void free_initmem(void)
|
||||||
{
|
{
|
||||||
unsigned long addr, init_begin, init_end;
|
unsigned long addr;
|
||||||
|
unsigned long init_begin = (unsigned long)__init_begin;
|
||||||
printk(KERN_INFO "Freeing unused kernel memory: ");
|
unsigned long init_end = (unsigned long)__init_end;
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_KERNEL
|
#ifdef CONFIG_DEBUG_KERNEL
|
||||||
/* Attempt to catch anyone trying to execute code here
|
/* Attempt to catch anyone trying to execute code here
|
||||||
* by filling the page with BRK insns.
|
* by filling the page with BRK insns.
|
||||||
*
|
|
||||||
* If we disable interrupts for all CPUs, then IPI stops working.
|
|
||||||
* Kinda breaks the global cache flushing.
|
|
||||||
*/
|
*/
|
||||||
local_irq_disable();
|
memset((void *)init_begin, 0x00, init_end - init_begin);
|
||||||
|
flush_icache_range(init_begin, init_end);
|
||||||
memset(__init_begin, 0x00,
|
|
||||||
(unsigned long)__init_end - (unsigned long)__init_begin);
|
|
||||||
|
|
||||||
flush_data_cache();
|
|
||||||
asm volatile("sync" : : );
|
|
||||||
flush_icache_range((unsigned long)__init_begin, (unsigned long)__init_end);
|
|
||||||
asm volatile("sync" : : );
|
|
||||||
|
|
||||||
local_irq_enable();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* align __init_begin and __init_end to page size,
|
/* align __init_begin and __init_end to page size,
|
||||||
ignoring linker script where we might have tried to save RAM */
|
ignoring linker script where we might have tried to save RAM */
|
||||||
init_begin = PAGE_ALIGN((unsigned long)(__init_begin));
|
init_begin = PAGE_ALIGN(init_begin);
|
||||||
init_end = PAGE_ALIGN((unsigned long)(__init_end));
|
init_end = PAGE_ALIGN(init_end);
|
||||||
for (addr = init_begin; addr < init_end; addr += PAGE_SIZE) {
|
for (addr = init_begin; addr < init_end; addr += PAGE_SIZE) {
|
||||||
ClearPageReserved(virt_to_page(addr));
|
ClearPageReserved(virt_to_page(addr));
|
||||||
init_page_count(virt_to_page(addr));
|
init_page_count(virt_to_page(addr));
|
||||||
@@ -409,7 +397,8 @@ void free_initmem(void)
|
|||||||
/* set up a new led state on systems shipped LED State panel */
|
/* set up a new led state on systems shipped LED State panel */
|
||||||
pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BCOMPLETE);
|
pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BCOMPLETE);
|
||||||
|
|
||||||
printk("%luk freed\n", (init_end - init_begin) >> 10);
|
printk(KERN_INFO "Freeing unused kernel memory: %luk freed\n",
|
||||||
|
(init_end - init_begin) >> 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1134,7 +1134,7 @@ static const struct file_operations ccio_proc_bitmap_fops = {
|
|||||||
.llseek = seq_lseek,
|
.llseek = seq_lseek,
|
||||||
.release = single_release,
|
.release = single_release,
|
||||||
};
|
};
|
||||||
#endif
|
#endif /* CONFIG_PROC_FS */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ccio_find_ioc - Find the ioc in the ioc_list
|
* ccio_find_ioc - Find the ioc in the ioc_list
|
||||||
@@ -1569,13 +1569,14 @@ static int __init ccio_probe(struct parisc_device *dev)
|
|||||||
BUG_ON(dev->dev.platform_data == NULL);
|
BUG_ON(dev->dev.platform_data == NULL);
|
||||||
HBA_DATA(dev->dev.platform_data)->iommu = ioc;
|
HBA_DATA(dev->dev.platform_data)->iommu = ioc;
|
||||||
|
|
||||||
|
#ifdef CONFIG_PROC_FS
|
||||||
if (ioc_count == 0) {
|
if (ioc_count == 0) {
|
||||||
proc_create(MODULE_NAME, 0, proc_runway_root,
|
proc_create(MODULE_NAME, 0, proc_runway_root,
|
||||||
&ccio_proc_info_fops);
|
&ccio_proc_info_fops);
|
||||||
proc_create(MODULE_NAME"-bitmap", 0, proc_runway_root,
|
proc_create(MODULE_NAME"-bitmap", 0, proc_runway_root,
|
||||||
&ccio_proc_bitmap_fops);
|
&ccio_proc_bitmap_fops);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
ioc_count++;
|
ioc_count++;
|
||||||
|
|
||||||
parisc_has_iommu();
|
parisc_has_iommu();
|
||||||
|
@@ -353,7 +353,7 @@ static unsigned int dino_startup_irq(unsigned int irq)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct hw_interrupt_type dino_interrupt_type = {
|
static struct irq_chip dino_interrupt_type = {
|
||||||
.typename = "GSC-PCI",
|
.typename = "GSC-PCI",
|
||||||
.startup = dino_startup_irq,
|
.startup = dino_startup_irq,
|
||||||
.shutdown = dino_disable_irq,
|
.shutdown = dino_disable_irq,
|
||||||
@@ -1019,22 +1019,22 @@ static int __init dino_probe(struct parisc_device *dev)
|
|||||||
** It's not used to avoid chicken/egg problems
|
** It's not used to avoid chicken/egg problems
|
||||||
** with configuration accessor functions.
|
** with configuration accessor functions.
|
||||||
*/
|
*/
|
||||||
bus = pci_scan_bus_parented(&dev->dev, dino_current_bus,
|
dino_dev->hba.hba_bus = bus = pci_scan_bus_parented(&dev->dev,
|
||||||
&dino_cfg_ops, NULL);
|
dino_current_bus, &dino_cfg_ops, NULL);
|
||||||
|
|
||||||
if(bus) {
|
if(bus) {
|
||||||
pci_bus_add_devices(bus);
|
|
||||||
/* This code *depends* on scanning being single threaded
|
/* This code *depends* on scanning being single threaded
|
||||||
* if it isn't, this global bus number count will fail
|
* if it isn't, this global bus number count will fail
|
||||||
*/
|
*/
|
||||||
dino_current_bus = bus->subordinate + 1;
|
dino_current_bus = bus->subordinate + 1;
|
||||||
pci_bus_assign_resources(bus);
|
pci_bus_assign_resources(bus);
|
||||||
|
pci_bus_add_devices(bus);
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_ERR "ERROR: failed to scan PCI bus on %s (probably duplicate bus number %d)\n",
|
printk(KERN_ERR "ERROR: failed to scan PCI bus on %s (duplicate bus number %d?)\n",
|
||||||
dev_name(&dev->dev), dino_current_bus);
|
dev_name(&dev->dev), dino_current_bus);
|
||||||
/* increment the bus number in case of duplicates */
|
/* increment the bus number in case of duplicates */
|
||||||
dino_current_bus++;
|
dino_current_bus++;
|
||||||
}
|
}
|
||||||
dino_dev->hba.hba_bus = bus;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -188,7 +188,7 @@ static unsigned int eisa_startup_irq(unsigned int irq)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct hw_interrupt_type eisa_interrupt_type = {
|
static struct irq_chip eisa_interrupt_type = {
|
||||||
.typename = "EISA",
|
.typename = "EISA",
|
||||||
.startup = eisa_startup_irq,
|
.startup = eisa_startup_irq,
|
||||||
.shutdown = eisa_disable_irq,
|
.shutdown = eisa_disable_irq,
|
||||||
|
@@ -148,7 +148,7 @@ static unsigned int gsc_asic_startup_irq(unsigned int irq)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct hw_interrupt_type gsc_asic_interrupt_type = {
|
static struct irq_chip gsc_asic_interrupt_type = {
|
||||||
.typename = "GSC-ASIC",
|
.typename = "GSC-ASIC",
|
||||||
.startup = gsc_asic_startup_irq,
|
.startup = gsc_asic_startup_irq,
|
||||||
.shutdown = gsc_asic_disable_irq,
|
.shutdown = gsc_asic_disable_irq,
|
||||||
@@ -158,7 +158,7 @@ static struct hw_interrupt_type gsc_asic_interrupt_type = {
|
|||||||
.end = no_end_irq,
|
.end = no_end_irq,
|
||||||
};
|
};
|
||||||
|
|
||||||
int gsc_assign_irq(struct hw_interrupt_type *type, void *data)
|
int gsc_assign_irq(struct irq_chip *type, void *data)
|
||||||
{
|
{
|
||||||
static int irq = GSC_IRQ_BASE;
|
static int irq = GSC_IRQ_BASE;
|
||||||
struct irq_desc *desc;
|
struct irq_desc *desc;
|
||||||
|
@@ -38,7 +38,7 @@ struct gsc_asic {
|
|||||||
int gsc_common_setup(struct parisc_device *parent, struct gsc_asic *gsc_asic);
|
int gsc_common_setup(struct parisc_device *parent, struct gsc_asic *gsc_asic);
|
||||||
int gsc_alloc_irq(struct gsc_irq *dev); /* dev needs an irq */
|
int gsc_alloc_irq(struct gsc_irq *dev); /* dev needs an irq */
|
||||||
int gsc_claim_irq(struct gsc_irq *dev, int irq); /* dev needs this irq */
|
int gsc_claim_irq(struct gsc_irq *dev, int irq); /* dev needs this irq */
|
||||||
int gsc_assign_irq(struct hw_interrupt_type *type, void *data);
|
int gsc_assign_irq(struct irq_chip *type, void *data);
|
||||||
int gsc_find_local_irq(unsigned int irq, int *global_irq, int limit);
|
int gsc_find_local_irq(unsigned int irq, int *global_irq, int limit);
|
||||||
void gsc_fixup_irqs(struct parisc_device *parent, void *ctrl,
|
void gsc_fixup_irqs(struct parisc_device *parent, void *ctrl,
|
||||||
void (*choose)(struct parisc_device *child, void *ctrl));
|
void (*choose)(struct parisc_device *child, void *ctrl));
|
||||||
|
@@ -729,7 +729,7 @@ static int iosapic_set_affinity_irq(unsigned int irq,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct hw_interrupt_type iosapic_interrupt_type = {
|
static struct irq_chip iosapic_interrupt_type = {
|
||||||
.typename = "IO-SAPIC-level",
|
.typename = "IO-SAPIC-level",
|
||||||
.startup = iosapic_startup_irq,
|
.startup = iosapic_startup_irq,
|
||||||
.shutdown = iosapic_disable_irq,
|
.shutdown = iosapic_disable_irq,
|
||||||
|
@@ -980,28 +980,38 @@ static void
|
|||||||
lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
|
lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
|
||||||
{
|
{
|
||||||
unsigned long bytecnt;
|
unsigned long bytecnt;
|
||||||
pdc_pat_cell_mod_maddr_block_t pa_pdc_cell; /* PA_VIEW */
|
|
||||||
pdc_pat_cell_mod_maddr_block_t io_pdc_cell; /* IO_VIEW */
|
|
||||||
long io_count;
|
long io_count;
|
||||||
long status; /* PDC return status */
|
long status; /* PDC return status */
|
||||||
long pa_count;
|
long pa_count;
|
||||||
|
pdc_pat_cell_mod_maddr_block_t *pa_pdc_cell; /* PA_VIEW */
|
||||||
|
pdc_pat_cell_mod_maddr_block_t *io_pdc_cell; /* IO_VIEW */
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
pa_pdc_cell = kzalloc(sizeof(pdc_pat_cell_mod_maddr_block_t), GFP_KERNEL);
|
||||||
|
if (!pa_pdc_cell)
|
||||||
|
return;
|
||||||
|
|
||||||
|
io_pdc_cell = kzalloc(sizeof(pdc_pat_cell_mod_maddr_block_t), GFP_KERNEL);
|
||||||
|
if (!pa_pdc_cell) {
|
||||||
|
kfree(pa_pdc_cell);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* return cell module (IO view) */
|
/* return cell module (IO view) */
|
||||||
status = pdc_pat_cell_module(&bytecnt, pa_dev->pcell_loc, pa_dev->mod_index,
|
status = pdc_pat_cell_module(&bytecnt, pa_dev->pcell_loc, pa_dev->mod_index,
|
||||||
PA_VIEW, & pa_pdc_cell);
|
PA_VIEW, pa_pdc_cell);
|
||||||
pa_count = pa_pdc_cell.mod[1];
|
pa_count = pa_pdc_cell->mod[1];
|
||||||
|
|
||||||
status |= pdc_pat_cell_module(&bytecnt, pa_dev->pcell_loc, pa_dev->mod_index,
|
status |= pdc_pat_cell_module(&bytecnt, pa_dev->pcell_loc, pa_dev->mod_index,
|
||||||
IO_VIEW, &io_pdc_cell);
|
IO_VIEW, io_pdc_cell);
|
||||||
io_count = io_pdc_cell.mod[1];
|
io_count = io_pdc_cell->mod[1];
|
||||||
|
|
||||||
/* We've already done this once for device discovery...*/
|
/* We've already done this once for device discovery...*/
|
||||||
if (status != PDC_OK) {
|
if (status != PDC_OK) {
|
||||||
panic("pdc_pat_cell_module() call failed for LBA!\n");
|
panic("pdc_pat_cell_module() call failed for LBA!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PAT_GET_ENTITY(pa_pdc_cell.mod_info) != PAT_ENTITY_LBA) {
|
if (PAT_GET_ENTITY(pa_pdc_cell->mod_info) != PAT_ENTITY_LBA) {
|
||||||
panic("pdc_pat_cell_module() entity returned != PAT_ENTITY_LBA!\n");
|
panic("pdc_pat_cell_module() entity returned != PAT_ENTITY_LBA!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1016,8 +1026,8 @@ lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
|
|||||||
} *p, *io;
|
} *p, *io;
|
||||||
struct resource *r;
|
struct resource *r;
|
||||||
|
|
||||||
p = (void *) &(pa_pdc_cell.mod[2+i*3]);
|
p = (void *) &(pa_pdc_cell->mod[2+i*3]);
|
||||||
io = (void *) &(io_pdc_cell.mod[2+i*3]);
|
io = (void *) &(io_pdc_cell->mod[2+i*3]);
|
||||||
|
|
||||||
/* Convert the PAT range data to PCI "struct resource" */
|
/* Convert the PAT range data to PCI "struct resource" */
|
||||||
switch(p->type & 0xff) {
|
switch(p->type & 0xff) {
|
||||||
@@ -1096,6 +1106,9 @@ lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kfree(pa_pdc_cell);
|
||||||
|
kfree(io_pdc_cell);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
/* keep compiler from complaining about missing declarations */
|
/* keep compiler from complaining about missing declarations */
|
||||||
@@ -1509,10 +1522,6 @@ lba_driver_probe(struct parisc_device *dev)
|
|||||||
lba_bus = lba_dev->hba.hba_bus =
|
lba_bus = lba_dev->hba.hba_bus =
|
||||||
pci_scan_bus_parented(&dev->dev, lba_dev->hba.bus_num.start,
|
pci_scan_bus_parented(&dev->dev, lba_dev->hba.bus_num.start,
|
||||||
cfg_ops, NULL);
|
cfg_ops, NULL);
|
||||||
if (lba_bus) {
|
|
||||||
lba_next_bus = lba_bus->subordinate + 1;
|
|
||||||
pci_bus_add_devices(lba_bus);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This is in lieu of calling pci_assign_unassigned_resources() */
|
/* This is in lieu of calling pci_assign_unassigned_resources() */
|
||||||
if (is_pdc_pat()) {
|
if (is_pdc_pat()) {
|
||||||
@@ -1533,7 +1542,6 @@ lba_driver_probe(struct parisc_device *dev)
|
|||||||
}
|
}
|
||||||
pci_enable_bridges(lba_bus);
|
pci_enable_bridges(lba_bus);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Once PCI register ops has walked the bus, access to config
|
** Once PCI register ops has walked the bus, access to config
|
||||||
** space is restricted. Avoids master aborts on config cycles.
|
** space is restricted. Avoids master aborts on config cycles.
|
||||||
@@ -1543,6 +1551,11 @@ lba_driver_probe(struct parisc_device *dev)
|
|||||||
lba_dev->flags |= LBA_FLAG_SKIP_PROBE;
|
lba_dev->flags |= LBA_FLAG_SKIP_PROBE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lba_bus) {
|
||||||
|
lba_next_bus = lba_bus->subordinate + 1;
|
||||||
|
pci_bus_add_devices(lba_bus);
|
||||||
|
}
|
||||||
|
|
||||||
/* Whew! Finally done! Tell services we got this one covered. */
|
/* Whew! Finally done! Tell services we got this one covered. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -2057,6 +2057,7 @@ void sba_directed_lmmio(struct parisc_device *pci_hba, struct resource *r)
|
|||||||
r->start = (base & ~1UL) | PCI_F_EXTEND;
|
r->start = (base & ~1UL) | PCI_F_EXTEND;
|
||||||
size = ~ READ_REG32(reg + LMMIO_DIRECT0_MASK);
|
size = ~ READ_REG32(reg + LMMIO_DIRECT0_MASK);
|
||||||
r->end = r->start + size;
|
r->end = r->start + size;
|
||||||
|
r->flags = IORESOURCE_MEM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2093,4 +2094,5 @@ void sba_distributed_lmmio(struct parisc_device *pci_hba, struct resource *r )
|
|||||||
size = (~READ_REG32(sba->sba_hpa + LMMIO_DIST_MASK)) / ROPES_PER_IOC;
|
size = (~READ_REG32(sba->sba_hpa + LMMIO_DIST_MASK)) / ROPES_PER_IOC;
|
||||||
r->start += rope * (size + 1); /* adjust base for this rope */
|
r->start += rope * (size + 1); /* adjust base for this rope */
|
||||||
r->end = r->start + size;
|
r->end = r->start + size;
|
||||||
|
r->flags = IORESOURCE_MEM;
|
||||||
}
|
}
|
||||||
|
@@ -325,7 +325,7 @@ static unsigned int superio_startup_irq(unsigned int irq)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct hw_interrupt_type superio_interrupt_type = {
|
static struct irq_chip superio_interrupt_type = {
|
||||||
.typename = SUPERIO,
|
.typename = SUPERIO,
|
||||||
.startup = superio_startup_irq,
|
.startup = superio_startup_irq,
|
||||||
.shutdown = superio_disable_irq,
|
.shutdown = superio_disable_irq,
|
||||||
@@ -434,8 +434,8 @@ static void __init superio_parport_init(void)
|
|||||||
0 /*base_hi*/,
|
0 /*base_hi*/,
|
||||||
PAR_IRQ,
|
PAR_IRQ,
|
||||||
PARPORT_DMA_NONE /* dma */,
|
PARPORT_DMA_NONE /* dma */,
|
||||||
NULL /*struct pci_dev* */),
|
NULL /*struct pci_dev* */,
|
||||||
0 /* shared irq flags */ )
|
0 /* shared irq flags */))
|
||||||
|
|
||||||
printk(KERN_WARNING PFX "Probing parallel port failed.\n");
|
printk(KERN_WARNING PFX "Probing parallel port failed.\n");
|
||||||
#endif /* CONFIG_PARPORT_PC */
|
#endif /* CONFIG_PARPORT_PC */
|
||||||
|
@@ -616,6 +616,8 @@ config FB_STI
|
|||||||
select FB_CFB_FILLRECT
|
select FB_CFB_FILLRECT
|
||||||
select FB_CFB_COPYAREA
|
select FB_CFB_COPYAREA
|
||||||
select FB_CFB_IMAGEBLIT
|
select FB_CFB_IMAGEBLIT
|
||||||
|
select STI_CONSOLE
|
||||||
|
select VT
|
||||||
default y
|
default y
|
||||||
---help---
|
---help---
|
||||||
STI refers to the HP "Standard Text Interface" which is a set of
|
STI refers to the HP "Standard Text Interface" which is a set of
|
||||||
|
@@ -29,6 +29,12 @@
|
|||||||
#define cpu_relax() asm volatile("" ::: "memory")
|
#define cpu_relax() asm volatile("" ::: "memory")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __hppa__
|
||||||
|
#include "../../arch/parisc/include/asm/unistd.h"
|
||||||
|
#define rmb() asm volatile("" ::: "memory")
|
||||||
|
#define cpu_relax() asm volatile("" ::: "memory");
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
Reference in New Issue
Block a user