Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
Browse files Browse the repository at this point in the history
* 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
  ...
  • Loading branch information
Linus Torvalds committed Jun 15, 2007
2 parents 08f3dfe + 462b529 commit aba2979
Show file tree
Hide file tree
Showing 38 changed files with 221 additions and 219 deletions.
5 changes: 2 additions & 3 deletions arch/parisc/hpux/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/sched.h>
#include <linux/file.h>
Expand Down Expand Up @@ -69,15 +70,14 @@ struct getdents_callback {
};

#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,
u64 ino, unsigned d_type)
{
struct hpux_dirent __user * dirent;
struct getdents_callback * buf = (struct getdents_callback *) __buf;
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.. */
if (reclen > buf->count)
Expand All @@ -102,7 +102,6 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
}

#undef NAME_OFFSET
#undef ROUND_UP

int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count)
{
Expand Down
40 changes: 3 additions & 37 deletions arch/parisc/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -954,21 +954,6 @@ intr_return:
/* NOTE: Need to enable interrupts incase we schedule. */
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:

/* check for reschedule */
Expand Down Expand Up @@ -2034,10 +2019,9 @@ ENTRY(syscall_exit)
STREG %r28,TASK_PT_GR28(%r1)

#ifdef CONFIG_HPUX

/* <linux/personality.h> cannot be easily included */
#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 */
ldo -PER_HPUX(%r19), %r19
Expand All @@ -2055,24 +2039,6 @@ ENTRY(syscall_exit)
*/
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:

/* check for reschedule */
Expand Down Expand Up @@ -2114,7 +2080,7 @@ syscall_restore:
/* Are we being ptraced? */
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
nop

Expand Down Expand Up @@ -2244,7 +2210,7 @@ syscall_do_resched:
#else
nop
#endif
b syscall_check_bh /* if resched, we start over again */
b syscall_check_resched /* if resched, we start over again */
nop
ENDPROC(syscall_exit)

Expand Down
4 changes: 2 additions & 2 deletions arch/parisc/kernel/firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ EXPORT_SYMBOL(pdc_lan_station_id);
* pdc_stable_read - Read data from Stable Storage.
* @staddr: Stable Storage address to access.
* @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
* and copies count bytes to the memory address memaddr.
Expand All @@ -660,7 +660,7 @@ EXPORT_SYMBOL(pdc_stable_read);
* pdc_stable_write - Write data to Stable Storage.
* @staddr: Stable Storage address to access.
* @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,
* and copies count bytes to the Stable Storage address staddr.
Expand Down
14 changes: 8 additions & 6 deletions arch/parisc/kernel/hardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* 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,0x8,0x4,0x01,"Firefox(825,925)"},
{HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"},
Expand Down Expand Up @@ -1219,7 +1219,7 @@ static struct hp_cpu_type_mask {
unsigned short model;
unsigned short mask;
enum cpu_type cpu;
} hp_cpu_type_mask_list[] __initdata = {
} hp_cpu_type_mask_list[] __devinitdata = {

{ 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */
{ 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */
Expand Down Expand Up @@ -1296,10 +1296,11 @@ static struct hp_cpu_type_mask {
{ 0x05f0, 0x0ff0, pcxw2 }, /* 0x05f0 - 0x05ff */
{ 0x0600, 0x0fe0, pcxl }, /* 0x0600 - 0x061f */
{ 0x0880, 0x0ff0, mako }, /* 0x0880 - 0x088f */
{ 0x0890, 0x0ff0, mako2 }, /* 0x0890 - 0x089f */
{ 0x0000, 0x0000, pcx } /* terminate table */
};

char *cpu_name_version[][2] = {
const char * const cpu_name_version[][2] = {
[pcx] = { "PA7000 (PCX)", "1.0" },
[pcxs] = { "PA7000 (PCX-S)", "1.1a" },
[pcxt] = { "PA7100 (PCX-T)", "1.1b" },
Expand All @@ -1311,10 +1312,11 @@ char *cpu_name_version[][2] = {
[pcxw] = { "PA8500 (PCX-W)", "2.0" },
[pcxw_] = { "PA8600 (PCX-W+)", "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)
{
struct hp_hardware *listptr;
Expand Down Expand Up @@ -1353,7 +1355,7 @@ parisc_hardware_description(struct parisc_device_id *id)


/* 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)
{
struct hp_cpu_type_mask *ptr;
Expand Down
5 changes: 1 addition & 4 deletions arch/parisc/kernel/hpmc.S
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,5 @@ os_hpmc_6:
b .
nop
ENDPROC(os_hpmc)

/* this label used to compute os_hpmc checksum */
ENTRY(os_hpmc_end)

ENTRY(os_hpmc_end) /* this label used to compute os_hpmc checksum */
nop
26 changes: 8 additions & 18 deletions arch/parisc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,10 @@ extern irqreturn_t ipi_interrupt(int, void *);
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
** 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 void cpu_disable_irq(unsigned int irq)
Expand Down Expand Up @@ -94,13 +90,11 @@ void cpu_ack_irq(unsigned int irq)
int cpu = smp_processor_id();

/* 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;
else
global_ack_eiem &= ~mask;
per_cpu(local_ack_eiem, cpu) &= ~mask;

/* 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 */
mtctl(mask, 23);
}
Expand All @@ -111,13 +105,10 @@ void cpu_end_irq(unsigned int irq)
int cpu = smp_processor_id();

/* 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;
else
global_ack_eiem |= mask;
per_cpu(local_ack_eiem, cpu) |= mask;

/* 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
Expand Down Expand Up @@ -354,8 +345,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
local_irq_disable();
irq_enter();

eirr_val = mfctl(23) & cpu_eiem & global_ack_eiem &
per_cpu(local_ack_eiem, cpu);
eirr_val = mfctl(23) & cpu_eiem & per_cpu(local_ack_eiem, cpu);
if (!eirr_val)
goto set_out;
irq = eirr_to_irq(eirr_val);
Expand All @@ -381,7 +371,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
return;

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;
}

Expand Down
94 changes: 53 additions & 41 deletions arch/parisc/kernel/pci-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/mm.h>
#include <linux/pci.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/types.h>
Expand All @@ -34,7 +35,6 @@
#include <asm/tlbflush.h> /* for purge_tlb_*() macros */

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_pages __read_mostly = 0;

Expand Down Expand Up @@ -330,6 +330,54 @@ pcxl_free_range(unsigned long vaddr, size_t size)
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
pcxl_dma_init(void)
{
Expand All @@ -348,9 +396,10 @@ pcxl_dma_init(void)
"pcxl_dma_init: Unable to create gsc /proc dir entry\n");
else {
struct proc_dir_entry* ent;
ent = create_proc_info_entry("pcxl_dma", 0,
proc_gsc_root, pcxl_proc_info);
if (!ent)
ent = create_proc_entry("pcxl_dma", 0, proc_gsc_root);
if (ent)
ent->proc_fops = &proc_pcxl_dma_ops;
else
printk(KERN_WARNING
"pci-dma.c: Unable to create pcxl_dma /proc entry.\n");
}
Expand Down Expand Up @@ -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_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);
}

Loading

0 comments on commit aba2979

Please sign in to comment.