Hello. On 10/09/2014 03:53 AM, John Crispin wrote:
These SoCs have a special irq that fires upon an illegal memmory access.
Signed-off-by: John Crispin <blogic@xxxxxxxxxxx> --- arch/mips/ralink/Makefile | 2 + arch/mips/ralink/ill_acc.c | 87 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 arch/mips/ralink/ill_acc.c
[...]
diff --git a/arch/mips/ralink/ill_acc.c b/arch/mips/ralink/ill_acc.c new file mode 100644 index 0000000..e20b02e --- /dev/null +++ b/arch/mips/ralink/ill_acc.c @@ -0,0 +1,87 @@
[...]
+static const char * const ill_acc_ids[] = { + "cpu", "dma", "ppe", "pdma rx", "pdma tx", "pci/e", "wmac", "usb", +}; + +static irqreturn_t ill_acc_irq_handler(int irq, void *_priv) +{ + struct device *dev = (struct device *) _priv; + u32 addr = rt_memc_r32(REG_ILL_ACC_ADDR); + u32 type = rt_memc_r32(REG_ILL_ACC_TYPE); + + dev_err(dev, "illegal %s access from %s - addr:0x%08x offset:%d len:%d\n", + (type & ILL_ACC_WRITE) ? ("write") : ("read"),
Hm, why these () around string literals? Not that the ones before ? are needed too...
WBR, Sergei