Commit aba29792 authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (30 commits)
  [PARISC] remove global_ack_eiem
  [PARISC] Fix kernel panic in check_ivt
  [PARISC] Fix bug when syscall nr is __NR_Linux_syscalls
  [PARISC] be more defensive in process.c::get_wchan
  [PARISC] fix "reduce size of task_struct on 64-bit machines" fallout
  [PARISC] fix null ptr deref in unwind.c
  [PARISC] fix trivial spelling nit in asm/linkage.h
  [PARISC] remove remnants of parisc-specific softirq code
  [PARISC] fix section mismatch in smp.c
  [PARISC] fix "ENTRY" macro redefinition
  [PARISC] Wire up utimensat/signalfd/timerfd/eventfd syscalls
  [PARISC] fix section mismatch in superio serial drivers
  [PARISC] fix section mismatch in parisc eisa driver
  [PARISC] fix section mismatches in arch/parisc/kernel
  [PARISC] fix section mismatch in ccio-dma
  [PARISC] fix section mismatch in parisc STI video drivers
  [PARISC] fix section mismatch in parport_gsc
  [PARISC] fix lasi_82596 build
  [PARISC] Build fixes for power.c
  [PARISC] kobject is embedded in subsys, not kset
  ...
parents 08f3dfe8 462b529f
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <linux/kernel.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/file.h> #include <linux/file.h>
...@@ -69,7 +70,6 @@ struct getdents_callback { ...@@ -69,7 +70,6 @@ struct getdents_callback {
}; };
#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) #define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
#define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1))
static int filldir(void * __buf, const char * name, int namlen, loff_t offset, static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
u64 ino, unsigned d_type) u64 ino, unsigned d_type)
...@@ -77,7 +77,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, ...@@ -77,7 +77,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
struct hpux_dirent __user * dirent; struct hpux_dirent __user * dirent;
struct getdents_callback * buf = (struct getdents_callback *) __buf; struct getdents_callback * buf = (struct getdents_callback *) __buf;
ino_t d_ino; ino_t d_ino;
int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, sizeof(long));
buf->error = -EINVAL; /* only used if we fail.. */ buf->error = -EINVAL; /* only used if we fail.. */
if (reclen > buf->count) if (reclen > buf->count)
...@@ -102,7 +102,6 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, ...@@ -102,7 +102,6 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
} }
#undef NAME_OFFSET #undef NAME_OFFSET
#undef ROUND_UP
int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count) int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count)
{ {
......
...@@ -954,21 +954,6 @@ intr_return: ...@@ -954,21 +954,6 @@ intr_return:
/* NOTE: Need to enable interrupts incase we schedule. */ /* NOTE: Need to enable interrupts incase we schedule. */
ssm PSW_SM_I, %r0 ssm PSW_SM_I, %r0
/* Check for software interrupts */
.import irq_stat,data
load32 irq_stat,%r19
#ifdef CONFIG_SMP
mfctl %cr30,%r1
ldw TI_CPU(%r1),%r1 /* get cpu # - int */
/* shift left ____cacheline_aligned (aka L1_CACHE_BYTES) amount
** irq_stat[] is defined using ____cacheline_aligned.
*/
SHLREG %r1,L1_CACHE_SHIFT,%r20
add %r19,%r20,%r19 /* now have &irq_stat[smp_processor_id()] */
#endif /* CONFIG_SMP */
intr_check_resched: intr_check_resched:
/* check for reschedule */ /* check for reschedule */
...@@ -2034,10 +2019,9 @@ ENTRY(syscall_exit) ...@@ -2034,10 +2019,9 @@ ENTRY(syscall_exit)
STREG %r28,TASK_PT_GR28(%r1) STREG %r28,TASK_PT_GR28(%r1)
#ifdef CONFIG_HPUX #ifdef CONFIG_HPUX
/* <linux/personality.h> cannot be easily included */ /* <linux/personality.h> cannot be easily included */
#define PER_HPUX 0x10 #define PER_HPUX 0x10
LDREG TASK_PERSONALITY(%r1),%r19 ldw TASK_PERSONALITY(%r1),%r19
/* We can't use "CMPIB<> PER_HPUX" since "im5" field is sign extended */ /* We can't use "CMPIB<> PER_HPUX" since "im5" field is sign extended */
ldo -PER_HPUX(%r19), %r19 ldo -PER_HPUX(%r19), %r19
...@@ -2055,24 +2039,6 @@ ENTRY(syscall_exit) ...@@ -2055,24 +2039,6 @@ ENTRY(syscall_exit)
*/ */
loadgp loadgp
syscall_check_bh:
/* Check for software interrupts */
.import irq_stat,data
load32 irq_stat,%r19
#ifdef CONFIG_SMP
/* sched.h: int processor */
/* %r26 is used as scratch register to index into irq_stat[] */
ldw TI_CPU-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r26 /* cpu # */
/* shift left ____cacheline_aligned (aka L1_CACHE_BYTES) bits */
SHLREG %r26,L1_CACHE_SHIFT,%r20
add %r19,%r20,%r19 /* now have &irq_stat[smp_processor_id()] */
#endif /* CONFIG_SMP */
syscall_check_resched: syscall_check_resched:
/* check for reschedule */ /* check for reschedule */
...@@ -2114,7 +2080,7 @@ syscall_restore: ...@@ -2114,7 +2080,7 @@ syscall_restore:
/* Are we being ptraced? */ /* Are we being ptraced? */
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
LDREG TASK_PTRACE(%r1), %r19 ldw TASK_PTRACE(%r1), %r19
bb,< %r19,31,syscall_restore_rfi bb,< %r19,31,syscall_restore_rfi
nop nop
...@@ -2244,7 +2210,7 @@ syscall_do_resched: ...@@ -2244,7 +2210,7 @@ syscall_do_resched:
#else #else
nop nop
#endif #endif
b syscall_check_bh /* if resched, we start over again */ b syscall_check_resched /* if resched, we start over again */
nop nop
ENDPROC(syscall_exit) ENDPROC(syscall_exit)
......
...@@ -634,7 +634,7 @@ EXPORT_SYMBOL(pdc_lan_station_id); ...@@ -634,7 +634,7 @@ EXPORT_SYMBOL(pdc_lan_station_id);
* pdc_stable_read - Read data from Stable Storage. * pdc_stable_read - Read data from Stable Storage.
* @staddr: Stable Storage address to access. * @staddr: Stable Storage address to access.
* @memaddr: The memory address where Stable Storage data shall be copied. * @memaddr: The memory address where Stable Storage data shall be copied.
* @count: number of bytes to transfert. count is multiple of 4. * @count: number of bytes to transfer. count is multiple of 4.
* *
* This PDC call reads from the Stable Storage address supplied in staddr * This PDC call reads from the Stable Storage address supplied in staddr
* and copies count bytes to the memory address memaddr. * and copies count bytes to the memory address memaddr.
...@@ -660,7 +660,7 @@ EXPORT_SYMBOL(pdc_stable_read); ...@@ -660,7 +660,7 @@ EXPORT_SYMBOL(pdc_stable_read);
* pdc_stable_write - Write data to Stable Storage. * pdc_stable_write - Write data to Stable Storage.
* @staddr: Stable Storage address to access. * @staddr: Stable Storage address to access.
* @memaddr: The memory address where Stable Storage data shall be read from. * @memaddr: The memory address where Stable Storage data shall be read from.
* @count: number of bytes to transfert. count is multiple of 4. * @count: number of bytes to transfer. count is multiple of 4.
* *
* This PDC call reads count bytes from the supplied memaddr address, * This PDC call reads count bytes from the supplied memaddr address,
* and copies count bytes to the Stable Storage address staddr. * and copies count bytes to the Stable Storage address staddr.
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
* so don't reference this table after starting the init process * so don't reference this table after starting the init process
*/ */
static struct hp_hardware hp_hardware_list[] __initdata = { static struct hp_hardware hp_hardware_list[] __devinitdata = {
{HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"}, {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"},
{HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"}, {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"},
{HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"}, {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"},
...@@ -1219,7 +1219,7 @@ static struct hp_cpu_type_mask { ...@@ -1219,7 +1219,7 @@ static struct hp_cpu_type_mask {
unsigned short model; unsigned short model;
unsigned short mask; unsigned short mask;
enum cpu_type cpu; enum cpu_type cpu;
} hp_cpu_type_mask_list[] __initdata = { } hp_cpu_type_mask_list[] __devinitdata = {
{ 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */ { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */
{ 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */ { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */
...@@ -1296,10 +1296,11 @@ static struct hp_cpu_type_mask { ...@@ -1296,10 +1296,11 @@ static struct hp_cpu_type_mask {
{ 0x05f0, 0x0ff0, pcxw2 }, /* 0x05f0 - 0x05ff */ { 0x05f0, 0x0ff0, pcxw2 }, /* 0x05f0 - 0x05ff */
{ 0x0600, 0x0fe0, pcxl }, /* 0x0600 - 0x061f */ { 0x0600, 0x0fe0, pcxl }, /* 0x0600 - 0x061f */
{ 0x0880, 0x0ff0, mako }, /* 0x0880 - 0x088f */ { 0x0880, 0x0ff0, mako }, /* 0x0880 - 0x088f */
{ 0x0890, 0x0ff0, mako2 }, /* 0x0890 - 0x089f */
{ 0x0000, 0x0000, pcx } /* terminate table */ { 0x0000, 0x0000, pcx } /* terminate table */
}; };
char *cpu_name_version[][2] = { const char * const cpu_name_version[][2] = {
[pcx] = { "PA7000 (PCX)", "1.0" }, [pcx] = { "PA7000 (PCX)", "1.0" },
[pcxs] = { "PA7000 (PCX-S)", "1.1a" }, [pcxs] = { "PA7000 (PCX-S)", "1.1a" },
[pcxt] = { "PA7100 (PCX-T)", "1.1b" }, [pcxt] = { "PA7100 (PCX-T)", "1.1b" },
...@@ -1311,10 +1312,11 @@ char *cpu_name_version[][2] = { ...@@ -1311,10 +1312,11 @@ char *cpu_name_version[][2] = {
[pcxw] = { "PA8500 (PCX-W)", "2.0" }, [pcxw] = { "PA8500 (PCX-W)", "2.0" },
[pcxw_] = { "PA8600 (PCX-W+)", "2.0" }, [pcxw_] = { "PA8600 (PCX-W+)", "2.0" },
[pcxw2] = { "PA8700 (PCX-W2)", "2.0" }, [pcxw2] = { "PA8700 (PCX-W2)", "2.0" },
[mako] = { "PA8800 (Mako)", "2.0" } [mako] = { "PA8800 (Mako)", "2.0" },
[mako2] = { "PA8900 (Shortfin)", "2.0" }
}; };
const char * __init const char * __devinit
parisc_hardware_description(struct parisc_device_id *id) parisc_hardware_description(struct parisc_device_id *id)
{ {
struct hp_hardware *listptr; struct hp_hardware *listptr;
...@@ -1353,7 +1355,7 @@ parisc_hardware_description(struct parisc_device_id *id) ...@@ -1353,7 +1355,7 @@ parisc_hardware_description(struct parisc_device_id *id)
/* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */ /* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */
enum cpu_type __init enum cpu_type __cpuinit
parisc_get_cpu_type(unsigned long hversion) parisc_get_cpu_type(unsigned long hversion)
{ {
struct hp_cpu_type_mask *ptr; struct hp_cpu_type_mask *ptr;
......
...@@ -295,8 +295,5 @@ os_hpmc_6: ...@@ -295,8 +295,5 @@ os_hpmc_6:
b . b .
nop nop
ENDPROC(os_hpmc) ENDPROC(os_hpmc)
ENTRY(os_hpmc_end) /* this label used to compute os_hpmc checksum */
/* this label used to compute os_hpmc checksum */
ENTRY(os_hpmc_end)
nop nop
...@@ -46,14 +46,10 @@ extern irqreturn_t ipi_interrupt(int, void *); ...@@ -46,14 +46,10 @@ extern irqreturn_t ipi_interrupt(int, void *);
static volatile unsigned long cpu_eiem = 0; static volatile unsigned long cpu_eiem = 0;
/* /*
** ack bitmap ... habitually set to 1, but reset to zero ** local ACK bitmap ... habitually set to 1, but reset to zero
** between ->ack() and ->end() of the interrupt to prevent ** between ->ack() and ->end() of the interrupt to prevent
** re-interruption of a processing interrupt. ** re-interruption of a processing interrupt.
*/ */
static volatile unsigned long global_ack_eiem = ~0UL;
/*
** Local bitmap, same as above but for per-cpu interrupts
*/
static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL; static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL;
static void cpu_disable_irq(unsigned int irq) static void cpu_disable_irq(unsigned int irq)
...@@ -94,13 +90,11 @@ void cpu_ack_irq(unsigned int irq) ...@@ -94,13 +90,11 @@ void cpu_ack_irq(unsigned int irq)
int cpu = smp_processor_id(); int cpu = smp_processor_id();
/* Clear in EIEM so we can no longer process */ /* Clear in EIEM so we can no longer process */
if (CHECK_IRQ_PER_CPU(irq_desc[irq].status))
per_cpu(local_ack_eiem, cpu) &= ~mask; per_cpu(local_ack_eiem, cpu) &= ~mask;
else
global_ack_eiem &= ~mask;
/* disable the interrupt */ /* disable the interrupt */
set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu));
/* and now ack it */ /* and now ack it */
mtctl(mask, 23); mtctl(mask, 23);
} }
...@@ -111,13 +105,10 @@ void cpu_end_irq(unsigned int irq) ...@@ -111,13 +105,10 @@ void cpu_end_irq(unsigned int irq)
int cpu = smp_processor_id(); int cpu = smp_processor_id();
/* set it in the eiems---it's no longer in process */ /* set it in the eiems---it's no longer in process */
if (CHECK_IRQ_PER_CPU(irq_desc[irq].status))
per_cpu(local_ack_eiem, cpu) |= mask; per_cpu(local_ack_eiem, cpu) |= mask;
else
global_ack_eiem |= mask;
/* enable the interrupt */ /* enable the interrupt */
set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu));
} }
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
...@@ -354,8 +345,7 @@ void do_cpu_irq_mask(struct pt_regs *regs) ...@@ -354,8 +345,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
local_irq_disable(); local_irq_disable();
irq_enter(); irq_enter();
eirr_val = mfctl(23) & cpu_eiem & global_ack_eiem & eirr_val = mfctl(23) & cpu_eiem & per_cpu(local_ack_eiem, cpu);
per_cpu(local_ack_eiem, cpu);
if (!eirr_val) if (!eirr_val)
goto set_out; goto set_out;
irq = eirr_to_irq(eirr_val); irq = eirr_to_irq(eirr_val);
...@@ -381,7 +371,7 @@ void do_cpu_irq_mask(struct pt_regs *regs) ...@@ -381,7 +371,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
return; return;
set_out: set_out:
set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu));
goto out; goto out;
} }
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/types.h> #include <linux/types.h>
...@@ -34,7 +35,6 @@ ...@@ -34,7 +35,6 @@
#include <asm/tlbflush.h> /* for purge_tlb_*() macros */ #include <asm/tlbflush.h> /* for purge_tlb_*() macros */
static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL; static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL;
static int pcxl_proc_info(char *buffer, char **start, off_t offset, int length);
static unsigned long pcxl_used_bytes __read_mostly = 0; static unsigned long pcxl_used_bytes __read_mostly = 0;
static unsigned long pcxl_used_pages __read_mostly = 0; static unsigned long pcxl_used_pages __read_mostly = 0;
...@@ -330,6 +330,54 @@ pcxl_free_range(unsigned long vaddr, size_t size) ...@@ -330,6 +330,54 @@ pcxl_free_range(unsigned long vaddr, size_t size)
dump_resmap(); dump_resmap();
} }
static int proc_pcxl_dma_show(struct seq_file *m, void *v)
{
#if 0
u_long i = 0;
unsigned long *res_ptr = (u_long *)pcxl_res_map;
#endif
unsigned long total_pages = pcxl_res_size << 3; /* 8 bits per byte */
seq_printf(m, "\nDMA Mapping Area size : %d bytes (%ld pages)\n",
PCXL_DMA_MAP_SIZE, total_pages);
seq_printf(m, "Resource bitmap : %d bytes\n", pcxl_res_size);
seq_puts(m, " total: free: used: % used:\n");
seq_printf(m, "blocks %8d %8ld %8ld %8ld%%\n", pcxl_res_size,
pcxl_res_size - pcxl_used_bytes, pcxl_used_bytes,
(pcxl_used_bytes * 100) / pcxl_res_size);
seq_printf(m, "pages %8ld %8ld %8ld %8ld%%\n", total_pages,
total_pages - pcxl_used_pages, pcxl_used_pages,
(pcxl_used_pages * 100 / total_pages));
#if 0
seq_puts(m, "\nResource bitmap:");
for(; i < (pcxl_res_size / sizeof(u_long)); ++i, ++res_ptr) {
if ((i & 7) == 0)
seq_puts(m,"\n ");
seq_printf(m, "%s %08lx", buf, *res_ptr);
}
#endif
seq_putc(m, '\n');
return 0;
}
static int proc_pcxl_dma_open(struct inode *inode, struct file *file)
{
return single_open(file, proc_pcxl_dma_show, NULL);
}
static const struct file_operations proc_pcxl_dma_ops = {
.owner = THIS_MODULE,
.open = proc_pcxl_dma_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
static int __init static int __init
pcxl_dma_init(void) pcxl_dma_init(void)
{ {
...@@ -348,9 +396,10 @@ pcxl_dma_init(void) ...@@ -348,9 +396,10 @@ pcxl_dma_init(void)
"pcxl_dma_init: Unable to create gsc /proc dir entry\n"); "pcxl_dma_init: Unable to create gsc /proc dir entry\n");
else { else {
struct proc_dir_entry* ent; struct proc_dir_entry* ent;
ent = create_proc_info_entry("pcxl_dma", 0, ent = create_proc_entry("pcxl_dma", 0, proc_gsc_root);
proc_gsc_root, pcxl_proc_info); if (ent)
if (!ent) ent->proc_fops = &proc_pcxl_dma_ops;
else
printk(KERN_WARNING printk(KERN_WARNING
"pci-dma.c: Unable to create pcxl_dma /proc entry.\n"); "pci-dma.c: Unable to create pcxl_dma /proc entry.\n");
} }
...@@ -551,40 +600,3 @@ struct hppa_dma_ops pcx_dma_ops = { ...@@ -551,40 +600,3 @@ struct hppa_dma_ops pcx_dma_ops = {
.dma_sync_sg_for_cpu = pa11_dma_sync_sg_for_cpu, .dma_sync_sg_for_cpu = pa11_dma_sync_sg_for_cpu,
.dma_sync_sg_for_device = pa11_dma_sync_sg_for_device, .dma_sync_sg_for_device = pa11_dma_sync_sg_for_device,
}; };
static int pcxl_proc_info(char *buf, char **start, off_t offset, int len)
{
#if 0
u_long i = 0;
unsigned long *res_ptr = (u_long *)pcxl_res_map;
#endif
unsigned long total_pages = pcxl_res_size << 3; /* 8 bits per byte */
sprintf(buf, "\nDMA Mapping Area size : %d bytes (%ld pages)\n",
PCXL_DMA_MAP_SIZE, total_pages);
sprintf(buf, "%sResource bitmap : %d bytes\n", buf, pcxl_res_size);
strcat(buf, " total: free: used: % used:\n");
sprintf(buf, "%sblocks %8d %8ld %8ld %8ld%%\n", buf, pcxl_res_size,
pcxl_res_size - pcxl_used_bytes, pcxl_used_bytes,
(pcxl_used_bytes * 100) / pcxl_res_size);
sprintf(buf, "%spages %8ld %8ld %8ld %8ld%%\n", buf, total_pages,
total_pages - pcxl_used_pages, pcxl_used_pages,
(pcxl_used_pages * 100 / total_pages));
#if 0
strcat(buf, "\nResource bitmap:");
for(; i < (pcxl_res_size / sizeof(u_long)); ++i, ++res_ptr) {
if ((i & 7) == 0)
strcat(buf,"\n ");
sprintf(buf, "%s %08lx", buf, *res_ptr);
}
#endif
strcat(buf, "\n");
return strlen(buf);
}
...@@ -171,7 +171,7 @@ static const uint64_t perf_bitmasks[] = { ...@@ -171,7 +171,7 @@ static const uint64_t perf_bitmasks[] = {
/* /*
* Write control bitmasks for Pa-8700 processor given * Write control bitmasks for Pa-8700 processor given
* somethings have changed slightly. * some things have changed slightly.
*/ */
static const uint64_t perf_bitmasks_piranha[] = { static const uint64_t perf_bitmasks_piranha[] = {
0x0000000000000000ul, /* first dbl word must be zero */ 0x0000000000000000ul, /* first dbl word must be zero */
...@@ -511,10 +511,12 @@ static int __init perf_init(void) ...@@ -511,10 +511,12 @@ static int __init perf_init(void)
} else if (boot_cpu_data.cpu_type == pcxw || } else if (boot_cpu_data.cpu_type == pcxw ||
boot_cpu_data.cpu_type == pcxw_ || boot_cpu_data.cpu_type == pcxw_ ||
boot_cpu_data.cpu_type == pcxw2 || boot_cpu_data.cpu_type == pcxw2 ||
boot_cpu_data.cpu_type == mako) { boot_cpu_data.cpu_type == mako ||
boot_cpu_data.cpu_type == mako2) {
perf_processor_interface = CUDA_INTF; perf_processor_interface = CUDA_INTF;
if (boot_cpu_data.cpu_type == pcxw2 || if (boot_cpu_data.cpu_type == pcxw2 ||
boot_cpu_data.cpu_type == mako) boot_cpu_data.cpu_type == mako ||
boot_cpu_data.cpu_type == mako2)
bitmask_array = perf_bitmasks_piranha; bitmask_array = perf_bitmasks_piranha;
} else { } else {
perf_processor_interface = UNKNOWN_INTF; perf_processor_interface = UNKNOWN_INTF;
...@@ -574,27 +576,27 @@ static int perf_stop_counters(uint32_t *raddr) ...@@ -574,27 +576,27 @@ static int perf_stop_counters(uint32_t *raddr)
if (!perf_rdr_read_ubuf(16, userbuf)) if (!perf_rdr_read_ubuf(16, userbuf))
return -13; return -13;
/* Counter0 is bits 1398 thru 1429 */ /* Counter0 is bits 1398 to 1429 */
tmp64 = (userbuf[21] << 22) & 0x00000000ffc00000; tmp64 = (userbuf[21] << 22) & 0x00000000ffc00000;
tmp64 |= (userbuf[22] >> 42) & 0x00000000003fffff; tmp64 |= (userbuf[22] >> 42) & 0x00000000003fffff;
/* OR sticky0 (bit 1430) to counter0 bit 32 */ /* OR sticky0 (bit 1430) to counter0 bit 32 */
tmp64 |= (userbuf[22] >> 10) & 0x0000000080000000; tmp64 |= (userbuf[22] >> 10) & 0x0000000080000000;
raddr[0] = (uint32_t)tmp64; raddr[0] = (uint32_t)tmp64;
/* Counter1 is bits 1431 thru 1462 */ /* Counter1 is bits 1431 to 1462 */
tmp64 = (userbuf[22] >> 9) & 0x00000000ffffffff; tmp64 = (userbuf[22] >> 9) & 0x00000000ffffffff;
/* OR sticky1 (bit 1463) to counter1 bit 32 */ /* OR sticky1 (bit 1463) to counter1 bit 32 */
tmp64 |= (userbuf[22] << 23) & 0x0000000080000000; tmp64 |= (userbuf[22] << 23) & 0x0000000080000000;
raddr[1] = (uint32_t)tmp64; raddr[1] = (uint32_t)tmp64;
/* Counter2 is bits 1464 thru 1495 */ /* Counter2 is bits 1464 to 1495 */
tmp64 = (userbuf[22] << 24) & 0x00000000ff000000; tmp64 = (userbuf[22] << 24) & 0x00000000ff000000;
tmp64 |= (userbuf[23] >> 40) & 0x0000000000ffffff; tmp64 |= (userbuf[23] >> 40) & 0x0000000000ffffff;
/* OR sticky2 (bit 1496) to counter2 bit 32 */ /* OR sticky2 (bit 1496) to counter2 bit 32 */
tmp64 |= (userbuf[23] >> 8) & 0x0000000080000000; tmp64 |= (userbuf[23] >> 8) & 0x0000000080000000;
raddr[2] = (uint32_t)tmp64; raddr[2] = (uint32_t)tmp64;
/* Counter3 is bits 1497 thru 1528 */ /* Counter3 is bits 1497 to 1528 */
tmp64 = (userbuf[23] >> 7) & 0x00000000ffffffff; tmp64 = (userbuf[23] >> 7) & 0x00000000ffffffff;
/* OR sticky3 (bit 1529) to counter3 bit 32 */ /* OR sticky3 (bit 1529) to counter3 bit 32 */
tmp64 |= (userbuf[23] << 25) & 0x0000000080000000; tmp64 |= (userbuf[23] << 25) & 0x0000000080000000;
...@@ -616,7 +618,7 @@ static int perf_stop_counters(uint32_t *raddr) ...@@ -616,7 +618,7 @@ static int perf_stop_counters(uint32_t *raddr)
userbuf[23] = 0; userbuf[23] = 0;
/* /*
* Write back the zero'ed bytes + the image given * Write back the zeroed bytes + the image given
* the read was destructive. * the read was destructive.
*/ */
perf_rdr_write(16, userbuf); perf_rdr_write(16, userbuf);
......
...@@ -381,6 +381,10 @@ get_wchan(struct task_struct *p) ...@@ -381,6 +381,10 @@ get_wchan(struct task_struct *p)
struct unwind_frame_info info; struct unwind_frame_info info;
unsigned long ip; unsigned long ip;
int count = 0; int count = 0;
if (!p || p == current || p->state == TASK_RUNNING)
return 0;
/* /*
* These bracket the sleeping functions.. * These bracket the sleeping functions..
*/ */
......
...@@ -63,7 +63,7 @@ extern int update_cr16_clocksource(void); /* from time.c */ ...@@ -63,7 +63,7 @@ extern int update_cr16_clocksource(void); /* from time.c */
** will call register_parisc_driver(&cpu_driver) before calling do_inventory(). ** will call register_parisc_driver(&cpu_driver) before calling do_inventory().
** **
** The goal of consolidating CPU initialization into one place is ** The goal of consolidating CPU initialization into one place is
** to make sure all CPU's get initialized the same way. ** to make sure all CPUs get initialized the same way.
** The code path not shared is how PDC hands control of the CPU to the OS. ** The code path not shared is how PDC hands control of the CPU to the OS.
** The initialization of OS data structures is the same (done below). ** The initialization of OS data structures is the same (done below).
*/ */
...@@ -76,7 +76,7 @@ extern int update_cr16_clocksource(void); /* from time.c */ ...@@ -76,7 +76,7 @@ extern int update_cr16_clocksource(void); /* from time.c */
* (return 1). If so, initialize the chip and tell other partners in crime * (return 1). If so, initialize the chip and tell other partners in crime
* they have work to do. * they have work to do.
*/ */
static int __init processor_probe(struct parisc_device *dev) static int __cpuinit processor_probe(struct parisc_device *dev)
{ {
unsigned long txn_addr; unsigned long txn_addr;
unsigned long cpuid; unsigned long cpuid;
...@@ -166,7 +166,7 @@ static int __init processor_probe(struct parisc_device *dev) ...@@ -166,7 +166,7 @@ static int __init processor_probe(struct parisc_device *dev)
#endif #endif
/* /*
** CONFIG_SMP: init_smp_config() will attempt to get CPU's into ** CONFIG_SMP: init_smp_config() will attempt to get CPUs into
** OS control. RENDEZVOUS is the default state - see mem_set above. ** OS control. RENDEZVOUS is the default state - see mem_set above.
** p->state = STATE_RENDEZVOUS; ** p->state = STATE_RENDEZVOUS;
*/ */
...@@ -334,7 +334,7 @@ int __init init_per_cpu(int cpunum) ...@@ -334,7 +334,7 @@ int __init init_per_cpu(int cpunum)
} }
/* /*
* Display cpu info for all cpu's. * Display CPU info for all CPUs.
*/ */
int int
show_cpuinfo (struct seq_file *m, void *v) show_cpuinfo (struct seq_file *m, void *v)
...@@ -381,19 +381,19 @@ show_cpuinfo (struct seq_file *m, void *v) ...@@ -381,19 +381,19 @@ show_cpuinfo (struct seq_file *m, void *v)
return 0; return 0;
} }
static struct parisc_device_id processor_tbl[] __read_mostly = { static const struct parisc_device_id processor_tbl[] = {
{ HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID }, { HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID },
{ 0, } { 0, }
}; };
static struct parisc_driver cpu_driver __read_mostly = { static struct parisc_driver cpu_driver = {
.name = "CPU", .name = "CPU",
.id_table = processor_tbl, .id_table = processor_tbl,
.probe = processor_probe .probe = processor_probe
}; };
/** /**
* processor_init - Processor initalization procedure. * processor_init - Processor initialization procedure.
* *
* Register this driver. * Register this driver.
*/ */
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/setup.h> #include <asm/setup.h>
char __initdata command_line[COMMAND_LINE_SIZE]; static char __initdata command_line[COMMAND_LINE_SIZE];
/* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */ /* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */
struct proc_dir_entry * proc_runway_root __read_mostly = NULL; struct proc_dir_entry * proc_runway_root __read_mostly = NULL;
...@@ -162,7 +162,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -162,7 +162,7 @@ void __init setup_arch(char **cmdline_p)
} }
/* /*
* Display cpu info for all cpu's. * Display CPU info for all CPUs.
* for parisc this is in processor.c * for parisc this is in processor.c
*/ */
extern int show_cpuinfo (struct seq_file *m, void *v); extern int show_cpuinfo (struct seq_file *m, void *v);
...@@ -225,6 +225,7 @@ static void __init parisc_proc_mkdir(void) ...@@ -225,6 +225,7 @@ static void __init parisc_proc_mkdir(void)
} }
break; break;
case mako: case mako:
case mako2:
if (NULL == proc_mckinley_root) if (NULL == proc_mckinley_root)
{ {
proc_mckinley_root = proc_mkdir("bus/mckinley", NULL); proc_mckinley_root = proc_mkdir("bus/mckinley", NULL);
......
...@@ -113,7 +113,7 @@ int copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from); ...@@ -113,7 +113,7 @@ int copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from);
/* In a deft move of uber-hackery, we decide to carry the top half of all /* In a deft move of uber-hackery, we decide to carry the top half of all
* 64-bit registers in a non-portable, non-ABI, hidden structure. * 64-bit registers in a non-portable, non-ABI, hidden structure.
* Userspace can read the hidden structure if it *wants* but is never * Userspace can read the hidden structure if it *wants* but is never
* guaranteed to be in the same place. Infact the uc_sigmask from the * guaranteed to be in the same place. In fact the uc_sigmask from the
* ucontext_t structure may push the hidden register file downards * ucontext_t structure may push the hidden register file downards
*/ */
struct compat_regfile { struct compat_regfile {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
** Lots of stuff stolen from arch/alpha/kernel/smp.c ** Lots of stuff stolen from arch/alpha/kernel/smp.c
** ...and then parisc stole from arch/ia64/kernel/smp.c. Thanks David! :^) ** ...and then parisc stole from arch/ia64/kernel/smp.c. Thanks David! :^)
** **
** Thanks to John Curry and Ullas Ponnadi. I learned alot from their work. ** Thanks to John Curry and Ullas Ponnadi. I learned a lot from their work.
** -grant (1/12/2001) ** -grant (1/12/2001)
** **
** This program is free software; you can redistribute it and/or modify ** This program is free software; you can redistribute it and/or modify
...@@ -419,7 +419,7 @@ smp_cpu_init(int cpunum) ...@@ -419,7 +419,7 @@ smp_cpu_init(int cpunum)
BUG(); BUG();
enter_lazy_tlb(&init_mm, current); enter_lazy_tlb(&init_mm, current);
init_IRQ(); /* make sure no IRQ's are enabled or pending */ init_IRQ(); /* make sure no IRQs are enabled or pending */
start_cpu_itimer(); start_cpu_itimer();
} }
...@@ -461,7 +461,7 @@ void __init smp_callin(void) ...@@ -461,7 +461,7 @@ void __init smp_callin(void)
/* /*
* Bring one cpu online. * Bring one cpu online.
*/ */
int __init smp_boot_one_cpu(int cpuid) int __cpuinit smp_boot_one_cpu(int cpuid)
{ {
struct task_struct *idle; struct task_struct *idle;
long timeout; long timeout;
...@@ -552,7 +552,7 @@ void __devinit smp_prepare_boot_cpu(void) ...@@ -552,7 +552,7 @@ void __devinit smp_prepare_boot_cpu(void)
/* /*
** inventory.c:do_inventory() hasn't yet been run and thus we ** inventory.c:do_inventory() hasn't yet been run and thus we
** don't 'discover' the additional CPU's until later. ** don't 'discover' the additional CPUs until later.
*/ */
void __init smp_prepare_cpus(unsigned int max_cpus) void __init smp_prepare_cpus(unsigned int max_cpus)
{ {
......
...@@ -311,14 +311,13 @@ struct readdir32_callback { ...@@ -311,14 +311,13 @@ struct readdir32_callback {
int count; int count;
}; };
#define ROUND_UP(x,a) ((__typeof__(x))(((unsigned long)(x) + ((a) - 1)) & ~((a) - 1)))
#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) #define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
static int filldir32 (void *__buf, const char *name, int namlen, static int filldir32 (void *__buf, const char *name, int namlen,
loff_t offset, u64 ino, unsigned int d_type) loff_t offset, u64 ino, unsigned int d_type)
{ {
struct linux32_dirent __user * dirent; struct linux32_dirent __user * dirent;
struct getdents32_callback * buf = (struct getdents32_callback *) __buf; struct getdents32_callback * buf = (struct getdents32_callback *) __buf;
int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1, 4); int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, 4);
u32 d_ino; u32 d_ino;
buf->error = -EINVAL; /* only used if we fail.. */ buf->error = -EINVAL; /* only used if we fail.. */
...@@ -350,6 +349,10 @@ sys32_getdents (unsigned int fd, void __user * dirent, unsigned int count) ...@@ -350,6 +349,10 @@ sys32_getdents (unsigned int fd, void __user * dirent, unsigned int count)
struct getdents32_callback buf; struct getdents32_callback buf;
int error; int error;
error = -EFAULT;
if (!access_ok(VERIFY_WRITE, dirent, count))
goto out;
error = -EBADF; error = -EBADF;
file = fget(fd); file = fget(fd);
if (!file) if (!file)
...@@ -366,7 +369,9 @@ sys32_getdents (unsigned int fd, void __user * dirent, unsigned int count) ...@@ -366,7 +369,9 @@ sys32_getdents (unsigned int fd, void __user * dirent, unsigned int count)
error = buf.error; error = buf.error;
lastdirent = buf.previous; lastdirent = buf.previous;
if (lastdirent) { if (lastdirent) {
put_user(file->f_pos, &lastdirent->d_off); if (put_user(file->f_pos, &lastdirent->d_off))
error = -EFAULT;
else
error = count - buf.count; error = count - buf.count;
} }
......
...@@ -181,7 +181,7 @@ linux_gateway_entry: ...@@ -181,7 +181,7 @@ linux_gateway_entry:
/* Are we being ptraced? */ /* Are we being ptraced? */
mfctl %cr30, %r1 mfctl %cr30, %r1
LDREG TI_TASK(%r1),%r1 LDREG TI_TASK(%r1),%r1
LDREG TASK_PTRACE(%r1), %r1 ldw TASK_PTRACE(%r1), %r1
bb,<,n %r1,31,.Ltracesys bb,<,n %r1,31,.Ltracesys
/* Note! We cannot use the syscall table that is mapped /* Note! We cannot use the syscall table that is mapped
...@@ -198,7 +198,7 @@ linux_gateway_entry: ...@@ -198,7 +198,7 @@ linux_gateway_entry:
ldil L%sys_call_table, %r1 ldil L%sys_call_table, %r1
ldo R%sys_call_table(%r1), %r19 ldo R%sys_call_table(%r1), %r19
#endif #endif
comiclr,>>= __NR_Linux_syscalls, %r20, %r0 comiclr,>> __NR_Linux_syscalls, %r20, %r0
b,n .Lsyscall_nosys b,n .Lsyscall_nosys
LDREGX %r20(%r19), %r19 LDREGX %r20(%r19), %r19
...@@ -501,7 +501,7 @@ lws_compare_and_swap: ...@@ -501,7 +501,7 @@ lws_compare_and_swap:
shlw %r20, 4, %r20 shlw %r20, 4, %r20
add %r20, %r28, %r20 add %r20, %r28, %r20
# ifdef ENABLE_LWS_DEBUG # if ENABLE_LWS_DEBUG
/* /*
DEBUG, check for deadlock! DEBUG, check for deadlock!
If the thread register values are the same If the thread register values are the same
...@@ -550,7 +550,7 @@ cas_wouldblock: ...@@ -550,7 +550,7 @@ cas_wouldblock:
perspective perspective
*/ */
cas_action: cas_action:
#if defined CONFIG_SMP && defined ENABLE_LWS_DEBUG #if defined CONFIG_SMP && ENABLE_LWS_DEBUG
/* DEBUG */ /* DEBUG */
mfctl %cr27, %r1 mfctl %cr27, %r1
stw %r1, 4(%sr2,%r20) stw %r1, 4(%sr2,%r20)
...@@ -562,7 +562,7 @@ cas_action: ...@@ -562,7 +562,7 @@ cas_action:
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* Free lock */ /* Free lock */
stw %r20, 0(%sr2,%r20) stw %r20, 0(%sr2,%r20)
# ifdef ENABLE_LWS_DEBUG # if ENABLE_LWS_DEBUG
/* Clear thread register indicator */ /* Clear thread register indicator */
stw %r0, 4(%sr2,%r20) stw %r0, 4(%sr2,%r20)
# endif # endif
...@@ -576,7 +576,7 @@ cas_action: ...@@ -576,7 +576,7 @@ cas_action:
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* Free lock */ /* Free lock */
stw %r20, 0(%sr2,%r20) stw %r20, 0(%sr2,%r20)
# ifdef ENABLE_LWS_DEBUG # if ENABLE_LWS_DEBUG
stw %r0, 4(%sr2,%r20) stw %r0, 4(%sr2,%r20)
# endif # endif
#endif #endif
......
...@@ -30,11 +30,6 @@ ...@@ -30,11 +30,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#undef ENTRY_SAME
#undef ENTRY_DIFF
#undef ENTRY_UHOH
#undef ENTRY_COMP
#undef ENTRY_OURS
#if defined(CONFIG_64BIT) && !defined(SYSCALL_TABLE_64BIT) #if defined(CONFIG_64BIT) && !defined(SYSCALL_TABLE_64BIT)
/* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and /* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and
* narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific
...@@ -405,5 +400,16 @@ ...@@ -405,5 +400,16 @@
ENTRY_SAME(epoll_pwait) ENTRY_SAME(epoll_pwait)
ENTRY_COMP(statfs64) ENTRY_COMP(statfs64)
ENTRY_COMP(fstatfs64) ENTRY_COMP(fstatfs64)
ENTRY_COMP(kexec_load) /* 300 */
ENTRY_COMP(utimensat)
ENTRY_COMP(signalfd)
ENTRY_COMP(timerfd)
ENTRY_SAME(eventfd)
/* Nothing yet */ /* Nothing yet */
#undef ENTRY_SAME
#undef ENTRY_DIFF
#undef ENTRY_UHOH
#undef ENTRY_COMP
#undef ENTRY_OURS
...@@ -191,7 +191,7 @@ int update_cr16_clocksource(void) ...@@ -191,7 +191,7 @@ int update_cr16_clocksource(void)
{ {
int change = 0; int change = 0;
/* since the cr16 cycle counters are not syncronized across CPUs, /* since the cr16 cycle counters are not synchronized across CPUs,
we'll check if we should switch to a safe clocksource: */ we'll check if we should switch to a safe clocksource: */
if (clocksource_cr16.rating != 0 && num_online_cpus() > 1) { if (clocksource_cr16.rating != 0 && num_online_cpus() > 1) {
clocksource_change_rating(&clocksource_cr16, 0); clocksource_change_rating(&clocksource_cr16, 0);
......
...@@ -615,7 +615,7 @@ void handle_interruption(int code, struct pt_regs *regs) ...@@ -615,7 +615,7 @@ void handle_interruption(int code, struct pt_regs *regs)
case 13: case 13:
/* Conditional Trap /* Conditional Trap
The condition succees in an instruction which traps The condition succeeds in an instruction which traps
on condition */ on condition */
if(user_mode(regs)){ if(user_mode(regs)){
si.si_signo = SIGFPE; si.si_signo = SIGFPE;
...@@ -802,13 +802,14 @@ void handle_interruption(int code, struct pt_regs *regs) ...@@ -802,13 +802,14 @@ void handle_interruption(int code, struct pt_regs *regs)
int __init check_ivt(void *iva) int __init check_ivt(void *iva)
{ {
extern const u32 os_hpmc[];
extern const u32 os_hpmc_end[];
int i; int i;
u32 check = 0; u32 check = 0;
u32 *ivap; u32 *ivap;
u32 *hpmcp; u32 *hpmcp;
u32 length; u32 length;
extern void os_hpmc(void);
extern void os_hpmc_end(void);
if (strcmp((char *)iva, "cows can fly")) if (strcmp((char *)iva, "cows can fly"))
return -1; return -1;
...@@ -820,7 +821,7 @@ int __init check_ivt(void *iva) ...@@ -820,7 +821,7 @@ int __init check_ivt(void *iva)
/* Compute Checksum for HPMC handler */ /* Compute Checksum for HPMC handler */
length = (u32)((unsigned long)os_hpmc_end - (unsigned long)os_hpmc); length = os_hpmc_end - os_hpmc;
ivap[7] = length; ivap[7] = length;
hpmcp = (u32 *)os_hpmc; hpmcp = (u32 *)os_hpmc;
......
...@@ -216,8 +216,10 @@ static void unwind_frame_regs(struct unwind_frame_info *info) ...@@ -216,8 +216,10 @@ static void unwind_frame_regs(struct unwind_frame_info *info)
/* Handle some frequent special cases.... */ /* Handle some frequent special cases.... */
{ {
char symname[KSYM_NAME_LEN+1]; char symname[KSYM_NAME_LEN+1];
char *modname;
kallsyms_lookup(info->ip, NULL, NULL, NULL, symname); kallsyms_lookup(info->ip, NULL, NULL, &modname,
symname);
dbg("info->ip = 0x%lx, name = %s\n", info->ip, symname); dbg("info->ip = 0x%lx, name = %s\n", info->ip, symname);
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
PA header file -- do not include this header file for non-PA builds. PA header file -- do not include this header file for non-PA builds.
#endif #endif
/* 32-bit word grabing functions */ /* 32-bit word grabbing functions */
#define Dbl_firstword(value) Dallp1(value) #define Dbl_firstword(value) Dallp1(value)
#define Dbl_secondword(value) Dallp2(value) #define Dbl_secondword(value) Dallp2(value)
#define Dbl_thirdword(value) dummy_location #define Dbl_thirdword(value) dummy_location
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#define Dbl_allp1(object) Dallp1(object) #define Dbl_allp1(object) Dallp1(object)
#define Dbl_allp2(object) Dallp2(object) #define Dbl_allp2(object) Dallp2(object)
/* dbl_and_signs ands the sign bits of each argument and puts the result /* dbl_and_signs ANDs the sign bits of each argument and puts the result
* into the first argument. dbl_or_signs ors those same sign bits */ * into the first argument. dbl_or_signs ors those same sign bits */
#define Dbl_and_signs( src1dst, src2) \ #define Dbl_and_signs( src1dst, src2) \
Dallp1(src1dst) = (Dallp1(src2)|~((unsigned int)1<<31)) & Dallp1(src1dst) Dallp1(src1dst) = (Dallp1(src2)|~((unsigned int)1<<31)) & Dallp1(src1dst)
......
...@@ -76,7 +76,7 @@ dbl_fsqrt( ...@@ -76,7 +76,7 @@ dbl_fsqrt(
} }
/* /*
* Return quiet NaN or positive infinity. * Return quiet NaN or positive infinity.
* Fall thru to negative test if negative infinity. * Fall through to negative test if negative infinity.
*/ */
if (Dbl_iszero_sign(srcp1) || if (Dbl_iszero_sign(srcp1) ||
Dbl_isnotzero_mantissa(srcp1,srcp2)) { Dbl_isnotzero_mantissa(srcp1,srcp2)) {
......
...@@ -76,7 +76,7 @@ sgl_fsqrt( ...@@ -76,7 +76,7 @@ sgl_fsqrt(
} }
/* /*
* Return quiet NaN or positive infinity. * Return quiet NaN or positive infinity.
* Fall thru to negative test if negative infinity. * Fall through to negative test if negative infinity.
*/ */
if (Sgl_iszero_sign(src) || Sgl_isnotzero_mantissa(src)) { if (Sgl_iszero_sign(src) || Sgl_isnotzero_mantissa(src)) {
*dstptr = src; *dstptr = src;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
PA header file -- do not include this header file for non-PA builds. PA header file -- do not include this header file for non-PA builds.
#endif #endif
/* 32-bit word grabing functions */ /* 32-bit word grabbing functions */
#define Sgl_firstword(value) Sall(value) #define Sgl_firstword(value) Sall(value)
#define Sgl_secondword(value) dummy_location #define Sgl_secondword(value) dummy_location
#define Sgl_thirdword(value) dummy_location #define Sgl_thirdword(value) dummy_location
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#define Sgl_exponentmantissa(object) Sexponentmantissa(object) #define Sgl_exponentmantissa(object) Sexponentmantissa(object)
#define Sgl_all(object) Sall(object) #define Sgl_all(object) Sall(object)
/* sgl_and_signs ands the sign bits of each argument and puts the result /* sgl_and_signs ANDs the sign bits of each argument and puts the result
* into the first argument. sgl_or_signs ors those same sign bits */ * into the first argument. sgl_or_signs ors those same sign bits */
#define Sgl_and_signs( src1dst, src2) \ #define Sgl_and_signs( src1dst, src2) \
Sall(src1dst) = (Sall(src2)|~((unsigned int)1<<31)) & Sall(src1dst) Sall(src1dst) = (Sall(src2)|~((unsigned int)1<<31)) & Sall(src1dst)
......
...@@ -890,7 +890,7 @@ void __init paging_init(void) ...@@ -890,7 +890,7 @@ void __init paging_init(void)
#ifdef CONFIG_PA20 #ifdef CONFIG_PA20
/* /*
* Currently, all PA20 chips have 18 bit protection id's, which is the * Currently, all PA20 chips have 18 bit protection IDs, which is the
* limiting factor (space ids are 32 bits). * limiting factor (space ids are 32 bits).
*/ */
...@@ -899,10 +899,10 @@ void __init paging_init(void) ...@@ -899,10 +899,10 @@ void __init paging_init(void)
#else #else
/* /*
* Currently we have a one-to-one relationship between space id's and * Currently we have a one-to-one relationship between space IDs and
* protection id's. Older parisc chips (PCXS, PCXT, PCXL, PCXL2) only * protection IDs. Older parisc chips (PCXS, PCXT, PCXL, PCXL2) only
* support 15 bit protection id's, so that is the limiting factor. * support 15 bit protection IDs, so that is the limiting factor.
* PCXT' has 18 bit protection id's, but only 16 bit spaceids, so it's * PCXT' has 18 bit protection IDs, but only 16 bit spaceids, so it's
* probably not worth the effort for a special case here. * probably not worth the effort for a special case here.
*/ */
......
...@@ -83,6 +83,7 @@ ...@@ -83,6 +83,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/dma-mapping.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
*/ */
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
...@@ -292,7 +293,6 @@ static int ioc_count; ...@@ -292,7 +293,6 @@ static int ioc_count;
#define PDIR_INDEX(iovp) ((iovp)>>IOVP_SHIFT) #define PDIR_INDEX(iovp) ((iovp)>>IOVP_SHIFT)
#define MKIOVP(pdir_idx) ((long)(pdir_idx) << IOVP_SHIFT) #define MKIOVP(pdir_idx) ((long)(pdir_idx) << IOVP_SHIFT)
#define MKIOVA(iovp,offset) (dma_addr_t)((long)iovp | (long)offset) #define MKIOVA(iovp,offset) (dma_addr_t)((long)iovp | (long)offset)
#define ROUNDUP(x,y) ((x + ((y)-1)) & ~((y)-1))
/* /*
** Don't worry about the 150% average search length on a miss. ** Don't worry about the 150% average search length on a miss.
...@@ -668,7 +668,7 @@ ccio_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt) ...@@ -668,7 +668,7 @@ ccio_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt)
size_t saved_byte_cnt; size_t saved_byte_cnt;
/* round up to nearest page size */ /* round up to nearest page size */
saved_byte_cnt = byte_cnt = ROUNDUP(byte_cnt, IOVP_SIZE); saved_byte_cnt = byte_cnt = ALIGN(byte_cnt, IOVP_SIZE);
while(byte_cnt > 0) { while(byte_cnt > 0) {
/* invalidate one page at a time */ /* invalidate one page at a time */
...@@ -751,7 +751,7 @@ ccio_map_single(struct device *dev, void *addr, size_t size, ...@@ -751,7 +751,7 @@ ccio_map_single(struct device *dev, void *addr, size_t size,
offset = ((unsigned long) addr) & ~IOVP_MASK; offset = ((unsigned long) addr) & ~IOVP_MASK;
/* round up to nearest IOVP_SIZE */ /* round up to nearest IOVP_SIZE */
size = ROUNDUP(size + offset, IOVP_SIZE); size = ALIGN(size + offset, IOVP_SIZE);
spin_lock_irqsave(&ioc->res_lock, flags); spin_lock_irqsave(&ioc->res_lock, flags);
#ifdef CCIO_MAP_STATS #ifdef CCIO_MAP_STATS
...@@ -814,7 +814,7 @@ ccio_unmap_single(struct device *dev, dma_addr_t iova, size_t size, ...@@ -814,7 +814,7 @@ ccio_unmap_single(struct device *dev, dma_addr_t iova, size_t size,
iova ^= offset; /* clear offset bits */ iova ^= offset; /* clear offset bits */
size += offset; size += offset;
size = ROUNDUP(size, IOVP_SIZE); size = ALIGN(size, IOVP_SIZE);
spin_lock_irqsave(&ioc->res_lock, flags); spin_lock_irqsave(&ioc->res_lock, flags);
...@@ -1227,7 +1227,7 @@ ccio_get_iotlb_size(struct parisc_device *dev) ...@@ -1227,7 +1227,7 @@ ccio_get_iotlb_size(struct parisc_device *dev)
#endif /* 0 */ #endif /* 0 */
/* We *can't* support JAVA (T600). Venture there at your own risk. */ /* We *can't* support JAVA (T600). Venture there at your own risk. */
static struct parisc_device_id ccio_tbl[] = { static const struct parisc_device_id ccio_tbl[] = {
{ HPHW_IOA, HVERSION_REV_ANY_ID, U2_IOA_RUNWAY, 0xb }, /* U2 */ { HPHW_IOA, HVERSION_REV_ANY_ID, U2_IOA_RUNWAY, 0xb }, /* U2 */
{ HPHW_IOA, HVERSION_REV_ANY_ID, UTURN_IOA_RUNWAY, 0xb }, /* UTurn */ { HPHW_IOA, HVERSION_REV_ANY_ID, UTURN_IOA_RUNWAY, 0xb }, /* UTurn */
{ 0, } { 0, }
...@@ -1370,7 +1370,7 @@ ccio_ioc_init(struct ioc *ioc) ...@@ -1370,7 +1370,7 @@ ccio_ioc_init(struct ioc *ioc)
} }
} }
static void static void __init
ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr) ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr)
{ {
int result; int result;
...@@ -1537,7 +1537,7 @@ int ccio_request_resource(const struct parisc_device *dev, ...@@ -1537,7 +1537,7 @@ int ccio_request_resource(const struct parisc_device *dev,
* If so, initialize the chip and tell other partners in crime they * If so, initialize the chip and tell other partners in crime they
* have work to do. * have work to do.
*/ */
static int ccio_probe(struct parisc_device *dev) static int __init ccio_probe(struct parisc_device *dev)
{ {
int i; int i;
struct ioc *ioc, **ioc_p = &ioc_list; struct ioc *ioc, **ioc_p = &ioc_list;
......
...@@ -307,7 +307,7 @@ static void init_eisa_pic(void) ...@@ -307,7 +307,7 @@ static void init_eisa_pic(void)
#define is_mongoose(dev) (dev->id.sversion == 0x00076) #define is_mongoose(dev) (dev->id.sversion == 0x00076)
static int __devinit eisa_probe(struct parisc_device *dev) static int __init eisa_probe(struct parisc_device *dev)
{ {
int i, result; int i, result;
...@@ -387,7 +387,7 @@ static int __devinit eisa_probe(struct parisc_device *dev) ...@@ -387,7 +387,7 @@ static int __devinit eisa_probe(struct parisc_device *dev)
return 0; return 0;
} }
static struct parisc_device_id eisa_tbl[] = { static const struct parisc_device_id eisa_tbl[] = {
{ HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00076 }, /* Mongoose */ { HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00076 }, /* Mongoose */
{ HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00090 }, /* Wax EISA */ { HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00090 }, /* Wax EISA */
{ 0, } { 0, }
......
...@@ -138,7 +138,7 @@ iommu_coalesce_chunks(struct ioc *ioc, struct scatterlist *startsg, int nents, ...@@ -138,7 +138,7 @@ iommu_coalesce_chunks(struct ioc *ioc, struct scatterlist *startsg, int nents,
** exceed DMA_CHUNK_SIZE if we coalesce the ** exceed DMA_CHUNK_SIZE if we coalesce the
** next entry. ** next entry.
*/ */
if(unlikely(ROUNDUP(dma_len + dma_offset + startsg->length, if(unlikely(ALIGN(dma_len + dma_offset + startsg->length,
IOVP_SIZE) > DMA_CHUNK_SIZE)) IOVP_SIZE) > DMA_CHUNK_SIZE))
break; break;
...@@ -158,7 +158,7 @@ iommu_coalesce_chunks(struct ioc *ioc, struct scatterlist *startsg, int nents, ...@@ -158,7 +158,7 @@ iommu_coalesce_chunks(struct ioc *ioc, struct scatterlist *startsg, int nents,
** Allocate space for DMA stream. ** Allocate space for DMA stream.
*/ */
sg_dma_len(contig_sg) = dma_len; sg_dma_len(contig_sg) = dma_len;
dma_len = ROUNDUP(dma_len + dma_offset, IOVP_SIZE); dma_len = ALIGN(dma_len + dma_offset, IOVP_SIZE);
sg_dma_address(contig_sg) = sg_dma_address(contig_sg) =
PIDE_FLAG PIDE_FLAG
| (iommu_alloc_range(ioc, dma_len) << IOVP_SHIFT) | (iommu_alloc_range(ioc, dma_len) << IOVP_SHIFT)
......
...@@ -1067,7 +1067,7 @@ pdc_stable_init(void) ...@@ -1067,7 +1067,7 @@ pdc_stable_init(void)
error = subsys_create_file(&stable_subsys, attr); error = subsys_create_file(&stable_subsys, attr);
/* register the paths subsys as a subsystem of stable subsys */ /* register the paths subsys as a subsystem of stable subsys */
kset_set_kset_s(&paths_subsys, stable_subsys); kobj_set_kset_s(&paths_subsys, stable_subsys);
if ((rc = subsystem_register(&paths_subsys))) if ((rc = subsystem_register(&paths_subsys)))
goto fail_subsysreg; goto fail_subsysreg;
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include <linux/reboot.h> #include <linux/reboot.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/kthread.h> #include <linux/kthread.h>
#include <linux/pm.h>
#include <asm/pdc.h> #include <asm/pdc.h>
#include <asm/io.h> #include <asm/io.h>
......
...@@ -113,8 +113,6 @@ module_param(sba_reserve_agpgart, int, 0444); ...@@ -113,8 +113,6 @@ module_param(sba_reserve_agpgart, int, 0444);
MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART"); MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART");
#endif #endif
#define ROUNDUP(x,y) ((x + ((y)-1)) & ~((y)-1))
/************************************ /************************************
** SBA register read and write support ** SBA register read and write support
...@@ -352,7 +350,7 @@ sba_search_bitmap(struct ioc *ioc, unsigned long bits_wanted) ...@@ -352,7 +350,7 @@ sba_search_bitmap(struct ioc *ioc, unsigned long bits_wanted)
** SBA HW features in the unmap path. ** SBA HW features in the unmap path.
*/ */
unsigned long o = 1 << get_order(bits_wanted << PAGE_SHIFT); unsigned long o = 1 << get_order(bits_wanted << PAGE_SHIFT);
uint bitshiftcnt = ROUNDUP(ioc->res_bitshift, o); uint bitshiftcnt = ALIGN(ioc->res_bitshift, o);
unsigned long mask; unsigned long mask;
if (bitshiftcnt >= BITS_PER_LONG) { if (bitshiftcnt >= BITS_PER_LONG) {
...@@ -779,7 +777,7 @@ sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size, ...@@ -779,7 +777,7 @@ sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size,
offset = iova & ~IOVP_MASK; offset = iova & ~IOVP_MASK;
iova ^= offset; /* clear offset bits */ iova ^= offset; /* clear offset bits */
size += offset; size += offset;
size = ROUNDUP(size, IOVP_SIZE); size = ALIGN(size, IOVP_SIZE);
spin_lock_irqsave(&ioc->res_lock, flags); spin_lock_irqsave(&ioc->res_lock, flags);
......
...@@ -389,7 +389,7 @@ int superio_fixup_irq(struct pci_dev *pcidev) ...@@ -389,7 +389,7 @@ int superio_fixup_irq(struct pci_dev *pcidev)
return local_irq; return local_irq;
} }
static void __devinit superio_serial_init(void) static void __init superio_serial_init(void)
{ {
#ifdef CONFIG_SERIAL_8250 #ifdef CONFIG_SERIAL_8250
int retval; int retval;
...@@ -423,7 +423,7 @@ static void __devinit superio_serial_init(void) ...@@ -423,7 +423,7 @@ static void __devinit superio_serial_init(void)
} }
static void __devinit superio_parport_init(void) static void __init superio_parport_init(void)
{ {
#ifdef CONFIG_PARPORT_PC #ifdef CONFIG_PARPORT_PC
if (!parport_pc_probe_port(sio_dev.pp_base, if (!parport_pc_probe_port(sio_dev.pp_base,
...@@ -450,7 +450,7 @@ static void superio_fixup_pci(struct pci_dev *pdev) ...@@ -450,7 +450,7 @@ static void superio_fixup_pci(struct pci_dev *pdev)
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415, superio_fixup_pci); DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415, superio_fixup_pci);
static int __devinit static int __init
superio_probe(struct pci_dev *dev, const struct pci_device_id *id) superio_probe(struct pci_dev *dev, const struct pci_device_id *id)
{ {
struct superio_device *sio = &sio_dev; struct superio_device *sio = &sio_dev;
...@@ -485,7 +485,7 @@ superio_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -485,7 +485,7 @@ superio_probe(struct pci_dev *dev, const struct pci_device_id *id)
return -ENODEV; return -ENODEV;
} }
static struct pci_device_id superio_tbl[] = { static const struct pci_device_id superio_tbl[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_LIO) }, { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_LIO) },
{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_USB) }, { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_USB) },
{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415) }, { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415) },
......
...@@ -350,7 +350,7 @@ struct parport *__devinit parport_gsc_probe_port (unsigned long base, ...@@ -350,7 +350,7 @@ struct parport *__devinit parport_gsc_probe_port (unsigned long base,
#define PARPORT_GSC_OFFSET 0x800 #define PARPORT_GSC_OFFSET 0x800
static int __initdata parport_count; static int __devinitdata parport_count;
static int __devinit parport_init_chip(struct parisc_device *dev) static int __devinit parport_init_chip(struct parisc_device *dev)
{ {
......
...@@ -240,7 +240,7 @@ static void sti_flush(unsigned long from, unsigned long len) ...@@ -240,7 +240,7 @@ static void sti_flush(unsigned long from, unsigned long len)
flush_icache_range(from, from+len); flush_icache_range(from, from+len);
} }
void __init void __devinit
sti_rom_copy(unsigned long base, unsigned long count, void *dest) sti_rom_copy(unsigned long base, unsigned long count, void *dest)
{ {
unsigned long dest_len = count; unsigned long dest_len = count;
...@@ -269,7 +269,7 @@ sti_rom_copy(unsigned long base, unsigned long count, void *dest) ...@@ -269,7 +269,7 @@ sti_rom_copy(unsigned long base, unsigned long count, void *dest)
static char default_sti_path[21] __read_mostly; static char default_sti_path[21] __read_mostly;
#ifndef MODULE #ifndef MODULE
static int __init sti_setup(char *str) static int __devinit sti_setup(char *str)
{ {
if (str) if (str)
strlcpy (default_sti_path, str, sizeof (default_sti_path)); strlcpy (default_sti_path, str, sizeof (default_sti_path));
...@@ -288,12 +288,12 @@ __setup("sti=", sti_setup); ...@@ -288,12 +288,12 @@ __setup("sti=", sti_setup);
static char __initdata *font_name[MAX_STI_ROMS] = { "VGA8x16", }; static char __devinitdata *font_name[MAX_STI_ROMS] = { "VGA8x16", };
static int __initdata font_index[MAX_STI_ROMS], static int __devinitdata font_index[MAX_STI_ROMS],
font_height[MAX_STI_ROMS], font_height[MAX_STI_ROMS],
font_width[MAX_STI_ROMS]; font_width[MAX_STI_ROMS];
#ifndef MODULE #ifndef MODULE
static int __init sti_font_setup(char *str) static int __devinit sti_font_setup(char *str)
{ {
char *x; char *x;
int i = 0; int i = 0;
...@@ -346,7 +346,7 @@ __setup("sti_font=", sti_font_setup); ...@@ -346,7 +346,7 @@ __setup("sti_font=", sti_font_setup);
static void __init static void __devinit
sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, unsigned int sti_mem_request) sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, unsigned int sti_mem_request)
{ {
struct sti_glob_cfg_ext *cfg; struct sti_glob_cfg_ext *cfg;
...@@ -386,7 +386,7 @@ sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, unsigned int sti_mem_request) ...@@ -386,7 +386,7 @@ sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, unsigned int sti_mem_request)
cfg->sti_mem_addr, sti_mem_request)); cfg->sti_mem_addr, sti_mem_request));
} }
static void __init static void __devinit
sti_dump_outptr(struct sti_struct *sti) sti_dump_outptr(struct sti_struct *sti)
{ {
DPRINTK((KERN_INFO DPRINTK((KERN_INFO
...@@ -400,7 +400,7 @@ sti_dump_outptr(struct sti_struct *sti) ...@@ -400,7 +400,7 @@ sti_dump_outptr(struct sti_struct *sti)
sti->outptr.attributes)); sti->outptr.attributes));
} }
static int __init static int __devinit
sti_init_glob_cfg(struct sti_struct *sti, sti_init_glob_cfg(struct sti_struct *sti,
unsigned long rom_address, unsigned long hpa) unsigned long rom_address, unsigned long hpa)
{ {
...@@ -482,7 +482,7 @@ sti_init_glob_cfg(struct sti_struct *sti, ...@@ -482,7 +482,7 @@ sti_init_glob_cfg(struct sti_struct *sti,
} }
#ifdef CONFIG_FB #ifdef CONFIG_FB
struct sti_cooked_font * __init struct sti_cooked_font * __devinit
sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name)
{ {
const struct font_desc *fbfont; const struct font_desc *fbfont;
...@@ -538,14 +538,14 @@ sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) ...@@ -538,14 +538,14 @@ sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name)
return cooked_font; return cooked_font;
} }
#else #else
struct sti_cooked_font * __init struct sti_cooked_font * __devinit
sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name)
{ {
return NULL; return NULL;
} }
#endif #endif
struct sti_cooked_font * __init struct sti_cooked_font * __devinit
sti_select_font(struct sti_cooked_rom *rom, sti_select_font(struct sti_cooked_rom *rom,
int (*search_font_fnc) (struct sti_cooked_rom *,int,int) ) int (*search_font_fnc) (struct sti_cooked_rom *,int,int) )
{ {
...@@ -572,7 +572,7 @@ sti_select_font(struct sti_cooked_rom *rom, ...@@ -572,7 +572,7 @@ sti_select_font(struct sti_cooked_rom *rom,
} }
static void __init static void __devinit
sti_dump_rom(struct sti_rom *rom) sti_dump_rom(struct sti_rom *rom)
{ {
printk(KERN_INFO " id %04x-%04x, conforms to spec rev. %d.%02x\n", printk(KERN_INFO " id %04x-%04x, conforms to spec rev. %d.%02x\n",
...@@ -590,7 +590,7 @@ sti_dump_rom(struct sti_rom *rom) ...@@ -590,7 +590,7 @@ sti_dump_rom(struct sti_rom *rom)
} }
static int __init static int __devinit
sti_cook_fonts(struct sti_cooked_rom *cooked_rom, sti_cook_fonts(struct sti_cooked_rom *cooked_rom,
struct sti_rom *raw_rom) struct sti_rom *raw_rom)
{ {
...@@ -625,7 +625,7 @@ sti_cook_fonts(struct sti_cooked_rom *cooked_rom, ...@@ -625,7 +625,7 @@ sti_cook_fonts(struct sti_cooked_rom *cooked_rom,
} }
static int __init static int __devinit
sti_search_font(struct sti_cooked_rom *rom, int height, int width) sti_search_font(struct sti_cooked_rom *rom, int height, int width)
{ {
struct sti_cooked_font *font; struct sti_cooked_font *font;
...@@ -642,7 +642,7 @@ sti_search_font(struct sti_cooked_rom *rom, int height, int width) ...@@ -642,7 +642,7 @@ sti_search_font(struct sti_cooked_rom *rom, int height, int width)
#define BMODE_RELOCATE(offset) offset = (offset) / 4; #define BMODE_RELOCATE(offset) offset = (offset) / 4;
#define BMODE_LAST_ADDR_OFFS 0x50 #define BMODE_LAST_ADDR_OFFS 0x50
static void * __init static void * __devinit
sti_bmode_font_raw(struct sti_cooked_font *f) sti_bmode_font_raw(struct sti_cooked_font *f)
{ {
unsigned char *n, *p, *q; unsigned char *n, *p, *q;
...@@ -660,7 +660,7 @@ sti_bmode_font_raw(struct sti_cooked_font *f) ...@@ -660,7 +660,7 @@ sti_bmode_font_raw(struct sti_cooked_font *f)
return n + 3; return n + 3;
} }
static void __init static void __devinit
sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest) sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest)
{ {
unsigned long dest_len = count; unsigned long dest_len = count;
...@@ -675,7 +675,7 @@ sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest) ...@@ -675,7 +675,7 @@ sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest)
sti_flush(dest_start, dest_len); sti_flush(dest_start, dest_len);
} }
static struct sti_rom * __init static struct sti_rom * __devinit
sti_get_bmode_rom (unsigned long address) sti_get_bmode_rom (unsigned long address)
{ {
struct sti_rom *raw; struct sti_rom *raw;
...@@ -711,7 +711,7 @@ sti_get_bmode_rom (unsigned long address) ...@@ -711,7 +711,7 @@ sti_get_bmode_rom (unsigned long address)
return raw; return raw;
} }
struct sti_rom * __init struct sti_rom * __devinit
sti_get_wmode_rom (unsigned long address) sti_get_wmode_rom (unsigned long address)
{ {
struct sti_rom *raw; struct sti_rom *raw;
...@@ -727,7 +727,7 @@ sti_get_wmode_rom (unsigned long address) ...@@ -727,7 +727,7 @@ sti_get_wmode_rom (unsigned long address)
return raw; return raw;
} }
int __init int __devinit
sti_read_rom(int wordmode, struct sti_struct *sti, unsigned long address) sti_read_rom(int wordmode, struct sti_struct *sti, unsigned long address)
{ {
struct sti_cooked_rom *cooked; struct sti_cooked_rom *cooked;
...@@ -783,7 +783,7 @@ sti_read_rom(int wordmode, struct sti_struct *sti, unsigned long address) ...@@ -783,7 +783,7 @@ sti_read_rom(int wordmode, struct sti_struct *sti, unsigned long address)
return 0; return 0;
} }
static struct sti_struct * __init static struct sti_struct * __devinit
sti_try_rom_generic(unsigned long address, unsigned long hpa, struct pci_dev *pd) sti_try_rom_generic(unsigned long address, unsigned long hpa, struct pci_dev *pd)
{ {
struct sti_struct *sti; struct sti_struct *sti;
...@@ -898,7 +898,7 @@ sti_try_rom_generic(unsigned long address, unsigned long hpa, struct pci_dev *pd ...@@ -898,7 +898,7 @@ sti_try_rom_generic(unsigned long address, unsigned long hpa, struct pci_dev *pd
return NULL; return NULL;
} }
static void __init sticore_check_for_default_sti(struct sti_struct *sti, char *path) static void __devinit sticore_check_for_default_sti(struct sti_struct *sti, char *path)
{ {
if (strcmp (path, default_sti_path) == 0) if (strcmp (path, default_sti_path) == 0)
default_sti = sti; default_sti = sti;
...@@ -909,7 +909,7 @@ static void __init sticore_check_for_default_sti(struct sti_struct *sti, char *p ...@@ -909,7 +909,7 @@ static void __init sticore_check_for_default_sti(struct sti_struct *sti, char *p
* in the additional address field addr[1] while on * in the additional address field addr[1] while on
* older Systems the PDC stores it in page0->proc_sti * older Systems the PDC stores it in page0->proc_sti
*/ */
static int __init sticore_pa_init(struct parisc_device *dev) static int __devinit sticore_pa_init(struct parisc_device *dev)
{ {
char pa_path[21]; char pa_path[21];
struct sti_struct *sti = NULL; struct sti_struct *sti = NULL;
...@@ -1015,7 +1015,7 @@ static struct parisc_driver pa_sti_driver = { ...@@ -1015,7 +1015,7 @@ static struct parisc_driver pa_sti_driver = {
static int sticore_initialized __read_mostly; static int sticore_initialized __read_mostly;
static void __init sti_init_roms(void) static void __devinit sti_init_roms(void)
{ {
if (sticore_initialized) if (sticore_initialized)
return; return;
......
...@@ -31,10 +31,11 @@ enum cpu_type { ...@@ -31,10 +31,11 @@ enum cpu_type {
pcxw = 8, /* pa8500 pa 2.0 */ pcxw = 8, /* pa8500 pa 2.0 */
pcxw_ = 9, /* pa8600 (w+) pa 2.0 */ pcxw_ = 9, /* pa8600 (w+) pa 2.0 */
pcxw2 = 10, /* pa8700 pa 2.0 */ pcxw2 = 10, /* pa8700 pa 2.0 */
mako = 11 /* pa8800 pa 2.0 */ mako = 11, /* pa8800 pa 2.0 */
mako2 = 12 /* pa8900 pa 2.0 */
}; };
extern char *cpu_name_version[][2]; /* mapping from enum cpu_type to strings */ extern const char * const cpu_name_version[][2]; /* mapping from enum cpu_type to strings */
struct parisc_driver; struct parisc_driver;
......
...@@ -8,8 +8,10 @@ ...@@ -8,8 +8,10 @@
/* /*
* In parisc assembly a semicolon marks a comment while a * In parisc assembly a semicolon marks a comment while a
* exclamation mark is used to seperate independend lines. * exclamation mark is used to seperate independent lines.
*/ */
#ifdef __ASSEMBLY__
#define ENTRY(name) \ #define ENTRY(name) \
.export name !\ .export name !\
ALIGN !\ ALIGN !\
...@@ -24,5 +26,6 @@ ...@@ -24,5 +26,6 @@
END(name) END(name)
#endif #endif
#endif /* __ASSEMBLY__ */
#endif /* __ASM_PARISC_LINKAGE_H */ #endif /* __ASM_PARISC_LINKAGE_H */
...@@ -69,8 +69,8 @@ struct system_cpuinfo_parisc { ...@@ -69,8 +69,8 @@ struct system_cpuinfo_parisc {
char sys_model_name[81]; /* PDC-ROM returnes this model name */ char sys_model_name[81]; /* PDC-ROM returnes this model name */
} pdc; } pdc;
char *cpu_name; /* e.g. "PA7300LC (PCX-L2)" */ const char *cpu_name; /* e.g. "PA7300LC (PCX-L2)" */
char *family_name; /* e.g. "1.1e" */ const char *family_name; /* e.g. "1.1e" */
}; };
...@@ -334,8 +334,8 @@ extern unsigned long get_wchan(struct task_struct *p); ...@@ -334,8 +334,8 @@ extern unsigned long get_wchan(struct task_struct *p);
static inline int parisc_requires_coherency(void) static inline int parisc_requires_coherency(void)
{ {
#ifdef CONFIG_PA8X00 #ifdef CONFIG_PA8X00
/* FIXME: also pa8900 - when we see one */ return (boot_cpu_data.cpu_type == mako) ||
return boot_cpu_data.cpu_type == mako; (boot_cpu_data.cpu_type == mako2);
#else #else
return 0; return 0;
#endif #endif
......
...@@ -792,8 +792,19 @@ ...@@ -792,8 +792,19 @@
#define __NR_epoll_pwait (__NR_Linux + 297) #define __NR_epoll_pwait (__NR_Linux + 297)
#define __NR_statfs64 (__NR_Linux + 298) #define __NR_statfs64 (__NR_Linux + 298)
#define __NR_fstatfs64 (__NR_Linux + 299) #define __NR_fstatfs64 (__NR_Linux + 299)
#define __NR_kexec_load (__NR_Linux + 300)
#define __NR_utimensat (__NR_Linux + 301)
#define __NR_signalfd (__NR_Linux + 302)
#define __NR_timerfd (__NR_Linux + 303)
#define __NR_eventfd (__NR_Linux + 304)
#define __NR_Linux_syscalls (__NR_eventfd + 1)
#define __IGNORE_select /* newselect */
#define __IGNORE_fadvise64 /* fadvise64_64 */
#define __IGNORE_utimes /* utime */
#define __NR_Linux_syscalls (__NR_fstatfs64 + 1)
#define HPUX_GATEWAY_ADDR 0xC0000004 #define HPUX_GATEWAY_ADDR 0xC0000004
#define LINUX_GATEWAY_ADDR 0x100 #define LINUX_GATEWAY_ADDR 0x100
......
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