You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
MIPS: APRP: Code formatting clean-ups.
Clean-up code according to the 'checkpatch.pl' script. Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com> Reviewed-by: Qais Yousef <Qais.Yousef@imgtec.com> Patchwork: http://patchwork.linux-mips.org/patch/6097/ Reviewed-by: John Crispin <blogic@openwrt.org>
This commit is contained in:
committed by
Ralf Baechle
parent
1336113a6c
commit
5792bf6438
@@ -1950,7 +1950,6 @@ config MIPS_VPE_LOADER_TOM
|
||||
you to ensure the amount you put in the option and the space your
|
||||
program requires is less or equal to the amount physically present.
|
||||
|
||||
# this should possibly be in drivers/char, but it is rather cpu related. Hmmm
|
||||
config MIPS_VPE_APSP_API
|
||||
bool "Enable support for AP/SP API (RTLX)"
|
||||
depends on MIPS_VPE_LOADER
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
/*
|
||||
* Amon support
|
||||
* 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
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2013 Imagination Technologies Ltd.
|
||||
*
|
||||
* Arbitrary Monitor Support (AMON)
|
||||
*/
|
||||
|
||||
int amon_cpu_avail(int);
|
||||
int amon_cpu_start(int, unsigned long, unsigned long,
|
||||
unsigned long, unsigned long);
|
||||
int amon_cpu_avail(int cpu);
|
||||
int amon_cpu_start(int cpu, unsigned long pc, unsigned long sp,
|
||||
unsigned long gp, unsigned long a0);
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
/*
|
||||
* 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
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2004, 2005 MIPS Technologies, Inc. All rights reserved.
|
||||
* Copyright (C) 2013 Imagination Technologies Ltd.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_RTLX_H_
|
||||
#define __ASM_RTLX_H_
|
||||
|
||||
|
||||
@@ -1,22 +1,11 @@
|
||||
/*
|
||||
* 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
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved.
|
||||
* Copyright (C) 2013 Imagination Technologies Ltd.
|
||||
*
|
||||
* This program is free software; you can distribute it and/or modify it
|
||||
* under the terms of the GNU General Public License (Version 2) as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _ASM_VPE_H
|
||||
#define _ASM_VPE_H
|
||||
|
||||
|
||||
+52
-79
@@ -1,46 +1,23 @@
|
||||
/*
|
||||
* 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
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved.
|
||||
* Copyright (C) 2005, 06 Ralf Baechle (ralf@linux-mips.org)
|
||||
*
|
||||
* This program is free software; you can distribute it and/or modify it
|
||||
* under the terms of the GNU General Public License (Version 2) as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
||||
*
|
||||
* Copyright (C) 2013 Imagination Technologies Ltd.
|
||||
*/
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/init.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/elf.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/syscalls.h>
|
||||
#include <linux/moduleloader.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/poll.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <asm/mipsmtregs.h>
|
||||
#include <asm/mips_mt.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/vpe.h>
|
||||
#include <asm/rtlx.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/vpe.h>
|
||||
|
||||
static int sp_stopping;
|
||||
struct rtlx_info *rtlx;
|
||||
@@ -53,22 +30,22 @@ static void __used dump_rtlx(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
printk("id 0x%lx state %d\n", rtlx->id, rtlx->state);
|
||||
pr_info("id 0x%lx state %d\n", rtlx->id, rtlx->state);
|
||||
|
||||
for (i = 0; i < RTLX_CHANNELS; i++) {
|
||||
struct rtlx_channel *chan = &rtlx->channel[i];
|
||||
|
||||
printk(" rt_state %d lx_state %d buffer_size %d\n",
|
||||
chan->rt_state, chan->lx_state, chan->buffer_size);
|
||||
pr_info(" rt_state %d lx_state %d buffer_size %d\n",
|
||||
chan->rt_state, chan->lx_state, chan->buffer_size);
|
||||
|
||||
printk(" rt_read %d rt_write %d\n",
|
||||
chan->rt_read, chan->rt_write);
|
||||
pr_info(" rt_read %d rt_write %d\n",
|
||||
chan->rt_read, chan->rt_write);
|
||||
|
||||
printk(" lx_read %d lx_write %d\n",
|
||||
chan->lx_read, chan->lx_write);
|
||||
pr_info(" lx_read %d lx_write %d\n",
|
||||
chan->lx_read, chan->lx_write);
|
||||
|
||||
printk(" rt_buffer <%s>\n", chan->rt_buffer);
|
||||
printk(" lx_buffer <%s>\n", chan->lx_buffer);
|
||||
pr_info(" rt_buffer <%s>\n", chan->rt_buffer);
|
||||
pr_info(" lx_buffer <%s>\n", chan->lx_buffer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,8 +53,7 @@ static void __used dump_rtlx(void)
|
||||
static int rtlx_init(struct rtlx_info *rtlxi)
|
||||
{
|
||||
if (rtlxi->id != RTLX_ID) {
|
||||
printk(KERN_ERR "no valid RTLX id at 0x%p 0x%lx\n",
|
||||
rtlxi, rtlxi->id);
|
||||
pr_err("no valid RTLX id at 0x%p 0x%lx\n", rtlxi, rtlxi->id);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@@ -93,7 +69,7 @@ void rtlx_starting(int vpe)
|
||||
sp_stopping = 0;
|
||||
|
||||
/* force a reload of rtlx */
|
||||
rtlx=NULL;
|
||||
rtlx = NULL;
|
||||
|
||||
/* wake up any sleeping rtlx_open's */
|
||||
for (i = 0; i < RTLX_CHANNELS; i++)
|
||||
@@ -118,31 +94,30 @@ int rtlx_open(int index, int can_sleep)
|
||||
int ret = 0;
|
||||
|
||||
if (index >= RTLX_CHANNELS) {
|
||||
printk(KERN_DEBUG "rtlx_open index out of range\n");
|
||||
pr_debug(KERN_DEBUG "rtlx_open index out of range\n");
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
if (atomic_inc_return(&channel_wqs[index].in_open) > 1) {
|
||||
printk(KERN_DEBUG "rtlx_open channel %d already opened\n",
|
||||
index);
|
||||
pr_debug(KERN_DEBUG "rtlx_open channel %d already opened\n", index);
|
||||
ret = -EBUSY;
|
||||
goto out_fail;
|
||||
}
|
||||
|
||||
if (rtlx == NULL) {
|
||||
if( (p = vpe_get_shared(tclimit)) == NULL) {
|
||||
if (can_sleep) {
|
||||
ret = __wait_event_interruptible(
|
||||
p = vpe_get_shared(aprp_cpu_index());
|
||||
if (p == NULL) {
|
||||
if (can_sleep) {
|
||||
ret = __wait_event_interruptible(
|
||||
channel_wqs[index].lx_queue,
|
||||
(p = vpe_get_shared(tclimit)));
|
||||
if (ret)
|
||||
(p = vpe_get_shared(aprp_cpu_index())));
|
||||
if (ret)
|
||||
goto out_fail;
|
||||
} else {
|
||||
pr_debug("No SP program loaded, and device opened with O_NONBLOCK\n");
|
||||
ret = -ENOSYS;
|
||||
goto out_fail;
|
||||
} else {
|
||||
printk(KERN_DEBUG "No SP program loaded, and device "
|
||||
"opened with O_NONBLOCK\n");
|
||||
ret = -ENOSYS;
|
||||
goto out_fail;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
smp_rmb();
|
||||
@@ -164,24 +139,24 @@ int rtlx_open(int index, int can_sleep)
|
||||
ret = -ERESTARTSYS;
|
||||
goto out_fail;
|
||||
}
|
||||
finish_wait(&channel_wqs[index].lx_queue, &wait);
|
||||
finish_wait(&channel_wqs[index].lx_queue,
|
||||
&wait);
|
||||
} else {
|
||||
pr_err(" *vpe_get_shared is NULL. "
|
||||
"Has an SP program been loaded?\n");
|
||||
pr_err(" *vpe_get_shared is NULL. Has an SP program been loaded?\n");
|
||||
ret = -ENOSYS;
|
||||
goto out_fail;
|
||||
}
|
||||
}
|
||||
|
||||
if ((unsigned int)*p < KSEG0) {
|
||||
printk(KERN_WARNING "vpe_get_shared returned an "
|
||||
"invalid pointer maybe an error code %d\n",
|
||||
(int)*p);
|
||||
pr_warn("vpe_get_shared returned an invalid pointer maybe an error code %d\n",
|
||||
(int)*p);
|
||||
ret = -ENOSYS;
|
||||
goto out_fail;
|
||||
}
|
||||
|
||||
if ((ret = rtlx_init(*p)) < 0)
|
||||
ret = rtlx_init(*p);
|
||||
if (ret < 0)
|
||||
goto out_ret;
|
||||
}
|
||||
|
||||
@@ -312,7 +287,7 @@ ssize_t rtlx_write(int index, const void __user *buffer, size_t count)
|
||||
size_t fl;
|
||||
|
||||
if (rtlx == NULL)
|
||||
return(-ENOSYS);
|
||||
return -ENOSYS;
|
||||
|
||||
rt = &rtlx->channel[index];
|
||||
|
||||
@@ -321,8 +296,8 @@ ssize_t rtlx_write(int index, const void __user *buffer, size_t count)
|
||||
rt_read = rt->rt_read;
|
||||
|
||||
/* total number of bytes to copy */
|
||||
count = min(count, (size_t)write_spacefree(rt_read, rt->rt_write,
|
||||
rt->buffer_size));
|
||||
count = min_t(size_t, count, write_spacefree(rt_read, rt->rt_write,
|
||||
rt->buffer_size));
|
||||
|
||||
/* first bit from write pointer to the end of the buffer, or count */
|
||||
fl = min(count, (size_t) rt->buffer_size - rt->rt_write);
|
||||
@@ -332,9 +307,8 @@ ssize_t rtlx_write(int index, const void __user *buffer, size_t count)
|
||||
goto out;
|
||||
|
||||
/* if there's any left copy to the beginning of the buffer */
|
||||
if (count - fl) {
|
||||
if (count - fl)
|
||||
failed = copy_from_user(rt->rt_buffer, buffer + fl, count - fl);
|
||||
}
|
||||
|
||||
out:
|
||||
count -= failed;
|
||||
@@ -360,7 +334,7 @@ static int file_release(struct inode *inode, struct file *filp)
|
||||
return rtlx_release(iminor(inode));
|
||||
}
|
||||
|
||||
static unsigned int file_poll(struct file *file, poll_table * wait)
|
||||
static unsigned int file_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
int minor = iminor(file_inode(file));
|
||||
unsigned int mask = 0;
|
||||
@@ -382,21 +356,20 @@ static unsigned int file_poll(struct file *file, poll_table * wait)
|
||||
return mask;
|
||||
}
|
||||
|
||||
static ssize_t file_read(struct file *file, char __user * buffer, size_t count,
|
||||
loff_t * ppos)
|
||||
static ssize_t file_read(struct file *file, char __user *buffer, size_t count,
|
||||
loff_t *ppos)
|
||||
{
|
||||
int minor = iminor(file_inode(file));
|
||||
|
||||
/* data available? */
|
||||
if (!rtlx_read_poll(minor, (file->f_flags & O_NONBLOCK) ? 0 : 1)) {
|
||||
return 0; // -EAGAIN makes cat whinge
|
||||
}
|
||||
if (!rtlx_read_poll(minor, (file->f_flags & O_NONBLOCK) ? 0 : 1))
|
||||
return 0; /* -EAGAIN makes 'cat' whine */
|
||||
|
||||
return rtlx_read(minor, buffer, count);
|
||||
}
|
||||
|
||||
static ssize_t file_write(struct file *file, const char __user * buffer,
|
||||
size_t count, loff_t * ppos)
|
||||
static ssize_t file_write(struct file *file, const char __user *buffer,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
int minor = iminor(file_inode(file));
|
||||
|
||||
@@ -418,11 +391,11 @@ static ssize_t file_write(struct file *file, const char __user * buffer,
|
||||
|
||||
const struct file_operations rtlx_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = file_open,
|
||||
.open = file_open,
|
||||
.release = file_release,
|
||||
.write = file_write,
|
||||
.read = file_read,
|
||||
.poll = file_poll,
|
||||
.read = file_read,
|
||||
.poll = file_poll,
|
||||
.llseek = noop_llseek,
|
||||
};
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ static int hw_tcs, hw_vpes;
|
||||
int vpe_run(struct vpe *v)
|
||||
{
|
||||
unsigned long flags, val, dmt_flag;
|
||||
struct vpe_notifications *n;
|
||||
struct vpe_notifications *notifier;
|
||||
unsigned int vpeflags;
|
||||
struct tc *t;
|
||||
|
||||
@@ -139,8 +139,8 @@ int vpe_run(struct vpe *v)
|
||||
emt(dmt_flag);
|
||||
local_irq_restore(flags);
|
||||
|
||||
list_for_each_entry(n, &v->notify, list)
|
||||
n->start(VPE_MODULE_MINOR);
|
||||
list_for_each_entry(notifier, &v->notify, list)
|
||||
notifier->start(VPE_MODULE_MINOR);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+111
-139
File diff suppressed because it is too large
Load Diff
@@ -1,30 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) 2007 MIPS Technologies, Inc.
|
||||
* All rights reserved.
|
||||
|
||||
* This program is free software; you can distribute it and/or modify it
|
||||
* under the terms of the GNU General Public License (Version 2) as
|
||||
* published by the Free Software Foundation.
|
||||
* 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
|
||||
* for more details.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
* Copyright (C) 2007 MIPS Technologies, Inc. All rights reserved.
|
||||
* Copyright (C) 2013 Imagination Technologies Ltd.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
||||
*
|
||||
* Arbitrary Monitor interface
|
||||
* Arbitrary Monitor Interface
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/smp.h>
|
||||
|
||||
#include <asm/addrspace.h>
|
||||
#include <asm/mips-boards/launch.h>
|
||||
#include <asm/mipsmtregs.h>
|
||||
#include <asm/mips-boards/launch.h>
|
||||
#include <asm/vpe.h>
|
||||
|
||||
int amon_cpu_avail(int cpu)
|
||||
|
||||
@@ -1,26 +1,16 @@
|
||||
/*
|
||||
* 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
|
||||
* for more details.
|
||||
*
|
||||
* Carsten Langgaard, carstenl@mips.com
|
||||
* Copyright (C) 2000, 2001, 2004 MIPS Technologies, Inc.
|
||||
* Copyright (C) 2001 Ralf Baechle
|
||||
* Copyright (C) 2013 Imagination Technologies Ltd.
|
||||
*
|
||||
* This program is free software; you can distribute it and/or modify it
|
||||
* under the terms of the GNU General Public License (Version 2) as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
||||
*
|
||||
* Routines for generic manipulation of the interrupts found on the MIPS
|
||||
* Malta board.
|
||||
* The interrupt controller is located in the South Bridge a PIIX4 device
|
||||
* with two internal 82C95 interrupt controllers.
|
||||
* Malta board. The interrupt controller is located in the South Bridge
|
||||
* a PIIX4 device with two internal 82C95 interrupt controllers.
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/irq.h>
|
||||
@@ -92,7 +82,7 @@ static inline int mips_pcibios_iack(void)
|
||||
BONITO_PCIMAP_CFG = 0;
|
||||
break;
|
||||
default:
|
||||
printk(KERN_WARNING "Unknown system controller.\n");
|
||||
pr_emerg("Unknown system controller.\n");
|
||||
return -1;
|
||||
}
|
||||
return irq;
|
||||
@@ -156,11 +146,11 @@ static void corehi_irqdispatch(void)
|
||||
unsigned int intrcause, datalo, datahi;
|
||||
struct pt_regs *regs = get_irq_regs();
|
||||
|
||||
printk(KERN_EMERG "CoreHI interrupt, shouldn't happen, we die here!\n");
|
||||
printk(KERN_EMERG "epc : %08lx\nStatus: %08lx\n"
|
||||
"Cause : %08lx\nbadVaddr : %08lx\n",
|
||||
regs->cp0_epc, regs->cp0_status,
|
||||
regs->cp0_cause, regs->cp0_badvaddr);
|
||||
pr_emerg("CoreHI interrupt, shouldn't happen, we die here!\n");
|
||||
pr_emerg("epc : %08lx\nStatus: %08lx\n"
|
||||
"Cause : %08lx\nbadVaddr : %08lx\n",
|
||||
regs->cp0_epc, regs->cp0_status,
|
||||
regs->cp0_cause, regs->cp0_badvaddr);
|
||||
|
||||
/* Read all the registers and then print them as there is a
|
||||
problem with interspersed printk's upsetting the Bonito controller.
|
||||
@@ -178,8 +168,8 @@ static void corehi_irqdispatch(void)
|
||||
intrcause = GT_READ(GT_INTRCAUSE_OFS);
|
||||
datalo = GT_READ(GT_CPUERR_ADDRLO_OFS);
|
||||
datahi = GT_READ(GT_CPUERR_ADDRHI_OFS);
|
||||
printk(KERN_EMERG "GT_INTRCAUSE = %08x\n", intrcause);
|
||||
printk(KERN_EMERG "GT_CPUERR_ADDR = %02x%08x\n",
|
||||
pr_emerg("GT_INTRCAUSE = %08x\n", intrcause);
|
||||
pr_emerg("GT_CPUERR_ADDR = %02x%08x\n",
|
||||
datahi, datalo);
|
||||
break;
|
||||
case MIPS_REVISION_SCON_BONITO:
|
||||
@@ -191,14 +181,14 @@ static void corehi_irqdispatch(void)
|
||||
intedge = BONITO_INTEDGE;
|
||||
intsteer = BONITO_INTSTEER;
|
||||
pcicmd = BONITO_PCICMD;
|
||||
printk(KERN_EMERG "BONITO_INTISR = %08x\n", intisr);
|
||||
printk(KERN_EMERG "BONITO_INTEN = %08x\n", inten);
|
||||
printk(KERN_EMERG "BONITO_INTPOL = %08x\n", intpol);
|
||||
printk(KERN_EMERG "BONITO_INTEDGE = %08x\n", intedge);
|
||||
printk(KERN_EMERG "BONITO_INTSTEER = %08x\n", intsteer);
|
||||
printk(KERN_EMERG "BONITO_PCICMD = %08x\n", pcicmd);
|
||||
printk(KERN_EMERG "BONITO_PCIBADADDR = %08x\n", pcibadaddr);
|
||||
printk(KERN_EMERG "BONITO_PCIMSTAT = %08x\n", pcimstat);
|
||||
pr_emerg("BONITO_INTISR = %08x\n", intisr);
|
||||
pr_emerg("BONITO_INTEN = %08x\n", inten);
|
||||
pr_emerg("BONITO_INTPOL = %08x\n", intpol);
|
||||
pr_emerg("BONITO_INTEDGE = %08x\n", intedge);
|
||||
pr_emerg("BONITO_INTSTEER = %08x\n", intsteer);
|
||||
pr_emerg("BONITO_PCICMD = %08x\n", pcicmd);
|
||||
pr_emerg("BONITO_PCIBADADDR = %08x\n", pcibadaddr);
|
||||
pr_emerg("BONITO_PCIMSTAT = %08x\n", pcimstat);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -377,13 +367,13 @@ static struct irqaction corehi_irqaction = {
|
||||
.flags = IRQF_NO_THREAD,
|
||||
};
|
||||
|
||||
static msc_irqmap_t __initdata msc_irqmap[] = {
|
||||
static msc_irqmap_t msc_irqmap[] __initdata = {
|
||||
{MSC01C_INT_TMR, MSC01_IRQ_EDGE, 0},
|
||||
{MSC01C_INT_PCI, MSC01_IRQ_LEVEL, 0},
|
||||
};
|
||||
static int __initdata msc_nr_irqs = ARRAY_SIZE(msc_irqmap);
|
||||
static int msc_nr_irqs __initdata = ARRAY_SIZE(msc_irqmap);
|
||||
|
||||
static msc_irqmap_t __initdata msc_eicirqmap[] = {
|
||||
static msc_irqmap_t msc_eicirqmap[] __initdata = {
|
||||
{MSC01E_INT_SW0, MSC01_IRQ_LEVEL, 0},
|
||||
{MSC01E_INT_SW1, MSC01_IRQ_LEVEL, 0},
|
||||
{MSC01E_INT_I8259A, MSC01_IRQ_LEVEL, 0},
|
||||
@@ -396,7 +386,7 @@ static msc_irqmap_t __initdata msc_eicirqmap[] = {
|
||||
{MSC01E_INT_CPUCTR, MSC01_IRQ_LEVEL, 0}
|
||||
};
|
||||
|
||||
static int __initdata msc_nr_eicirqs = ARRAY_SIZE(msc_eicirqmap);
|
||||
static int msc_nr_eicirqs __initdata = ARRAY_SIZE(msc_eicirqmap);
|
||||
|
||||
/*
|
||||
* This GIC specific tabular array defines the association between External
|
||||
@@ -443,9 +433,12 @@ int __init gcmp_probe(unsigned long addr, unsigned long size)
|
||||
if (gcmp_present >= 0)
|
||||
return gcmp_present;
|
||||
|
||||
_gcmp_base = (unsigned long) ioremap_nocache(GCMP_BASE_ADDR, GCMP_ADDRSPACE_SZ);
|
||||
_msc01_biu_base = (unsigned long) ioremap_nocache(MSC01_BIU_REG_BASE, MSC01_BIU_ADDRSPACE_SZ);
|
||||
gcmp_present = (GCMPGCB(GCMPB) & GCMP_GCB_GCMPB_GCMPBASE_MSK) == GCMP_BASE_ADDR;
|
||||
_gcmp_base = (unsigned long) ioremap_nocache(GCMP_BASE_ADDR,
|
||||
GCMP_ADDRSPACE_SZ);
|
||||
_msc01_biu_base = (unsigned long) ioremap_nocache(MSC01_BIU_REG_BASE,
|
||||
MSC01_BIU_ADDRSPACE_SZ);
|
||||
gcmp_present = ((GCMPGCB(GCMPB) & GCMP_GCB_GCMPB_GCMPBASE_MSK) ==
|
||||
GCMP_BASE_ADDR);
|
||||
|
||||
if (gcmp_present)
|
||||
pr_debug("GCMP present\n");
|
||||
@@ -455,9 +448,8 @@ int __init gcmp_probe(unsigned long addr, unsigned long size)
|
||||
/* Return the number of IOCU's present */
|
||||
int __init gcmp_niocu(void)
|
||||
{
|
||||
return gcmp_present ?
|
||||
(GCMPGCB(GC) & GCMP_GCB_GC_NUMIOCU_MSK) >> GCMP_GCB_GC_NUMIOCU_SHF :
|
||||
0;
|
||||
return gcmp_present ? ((GCMPGCB(GC) & GCMP_GCB_GC_NUMIOCU_MSK) >>
|
||||
GCMP_GCB_GC_NUMIOCU_SHF) : 0;
|
||||
}
|
||||
|
||||
/* Set GCMP region attributes */
|
||||
@@ -606,11 +598,14 @@ void __init arch_init_irq(void)
|
||||
set_vi_handler(MIPSCPU_INT_IPI1, malta_ipi_irqdispatch);
|
||||
}
|
||||
/* Argh.. this really needs sorting out.. */
|
||||
printk("CPU%d: status register was %08x\n", smp_processor_id(), read_c0_status());
|
||||
pr_info("CPU%d: status register was %08x\n",
|
||||
smp_processor_id(), read_c0_status());
|
||||
write_c0_status(read_c0_status() | STATUSF_IP3 | STATUSF_IP4);
|
||||
printk("CPU%d: status register now %08x\n", smp_processor_id(), read_c0_status());
|
||||
pr_info("CPU%d: status register now %08x\n",
|
||||
smp_processor_id(), read_c0_status());
|
||||
write_c0_status(0x1100dc00);
|
||||
printk("CPU%d: status register frc %08x\n", smp_processor_id(), read_c0_status());
|
||||
pr_info("CPU%d: status register frc %08x\n",
|
||||
smp_processor_id(), read_c0_status());
|
||||
for (i = 0; i < nr_cpu_ids; i++) {
|
||||
arch_init_ipiirq(MIPS_GIC_IRQ_BASE +
|
||||
GIC_RESCHED_INT(i), &irq_resched);
|
||||
@@ -628,11 +623,15 @@ void __init arch_init_irq(void)
|
||||
cpu_ipi_call_irq = MSC01E_INT_SW1;
|
||||
} else {
|
||||
if (cpu_has_vint) {
|
||||
set_vi_handler (MIPS_CPU_IPI_RESCHED_IRQ, ipi_resched_dispatch);
|
||||
set_vi_handler (MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch);
|
||||
set_vi_handler (MIPS_CPU_IPI_RESCHED_IRQ,
|
||||
ipi_resched_dispatch);
|
||||
set_vi_handler (MIPS_CPU_IPI_CALL_IRQ,
|
||||
ipi_call_dispatch);
|
||||
}
|
||||
cpu_ipi_resched_irq = MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_RESCHED_IRQ;
|
||||
cpu_ipi_call_irq = MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_CALL_IRQ;
|
||||
cpu_ipi_resched_irq = MIPS_CPU_IRQ_BASE +
|
||||
MIPS_CPU_IPI_RESCHED_IRQ;
|
||||
cpu_ipi_call_irq = MIPS_CPU_IRQ_BASE +
|
||||
MIPS_CPU_IPI_CALL_IRQ;
|
||||
}
|
||||
arch_init_ipiirq(cpu_ipi_resched_irq, &irq_resched);
|
||||
arch_init_ipiirq(cpu_ipi_call_irq, &irq_call);
|
||||
@@ -642,9 +641,7 @@ void __init arch_init_irq(void)
|
||||
|
||||
void malta_be_init(void)
|
||||
{
|
||||
if (gcmp_present) {
|
||||
/* Could change CM error mask register */
|
||||
}
|
||||
/* Could change CM error mask register. */
|
||||
}
|
||||
|
||||
|
||||
@@ -724,14 +721,14 @@ int malta_be_handler(struct pt_regs *regs, int is_fixup)
|
||||
if (cause < 16) {
|
||||
unsigned long cca_bits = (cm_error >> 15) & 7;
|
||||
unsigned long tr_bits = (cm_error >> 12) & 7;
|
||||
unsigned long mcmd_bits = (cm_error >> 7) & 0x1f;
|
||||
unsigned long cmd_bits = (cm_error >> 7) & 0x1f;
|
||||
unsigned long stag_bits = (cm_error >> 3) & 15;
|
||||
unsigned long sport_bits = (cm_error >> 0) & 7;
|
||||
|
||||
snprintf(buf, sizeof(buf),
|
||||
"CCA=%lu TR=%s MCmd=%s STag=%lu "
|
||||
"SPort=%lu\n",
|
||||
cca_bits, tr[tr_bits], mcmd[mcmd_bits],
|
||||
cca_bits, tr[tr_bits], mcmd[cmd_bits],
|
||||
stag_bits, sport_bits);
|
||||
} else {
|
||||
/* glob state & sresp together */
|
||||
@@ -740,7 +737,7 @@ int malta_be_handler(struct pt_regs *regs, int is_fixup)
|
||||
unsigned long c1_bits = (cm_error >> 12) & 7;
|
||||
unsigned long c0_bits = (cm_error >> 9) & 7;
|
||||
unsigned long sc_bit = (cm_error >> 8) & 1;
|
||||
unsigned long mcmd_bits = (cm_error >> 3) & 0x1f;
|
||||
unsigned long cmd_bits = (cm_error >> 3) & 0x1f;
|
||||
unsigned long sport_bits = (cm_error >> 0) & 7;
|
||||
snprintf(buf, sizeof(buf),
|
||||
"C3=%s C2=%s C1=%s C0=%s SC=%s "
|
||||
@@ -748,16 +745,16 @@ int malta_be_handler(struct pt_regs *regs, int is_fixup)
|
||||
core[c3_bits], core[c2_bits],
|
||||
core[c1_bits], core[c0_bits],
|
||||
sc_bit ? "True" : "False",
|
||||
mcmd[mcmd_bits], sport_bits);
|
||||
mcmd[cmd_bits], sport_bits);
|
||||
}
|
||||
|
||||
ocause = (cm_other & GCMP_GCB_GMEO_ERROR_2ND_MSK) >>
|
||||
GCMP_GCB_GMEO_ERROR_2ND_SHF;
|
||||
|
||||
printk("CM_ERROR=%08lx %s <%s>\n", cm_error,
|
||||
pr_err("CM_ERROR=%08lx %s <%s>\n", cm_error,
|
||||
causes[cause], buf);
|
||||
printk("CM_ADDR =%08lx\n", cm_addr);
|
||||
printk("CM_OTHER=%08lx %s\n", cm_other, causes[ocause]);
|
||||
pr_err("CM_ADDR =%08lx\n", cm_addr);
|
||||
pr_err("CM_OTHER=%08lx %s\n", cm_other, causes[ocause]);
|
||||
|
||||
/* reprime cause register */
|
||||
GCMPGCB(GCMEC) = 0;
|
||||
|
||||
Reference in New Issue
Block a user