[Top] [All Lists]

Looking for an idea/workaround for using MIPS ioremap_nocache (__ioremap

To: "" <>
Subject: Looking for an idea/workaround for using MIPS ioremap_nocache (__ioremap) in IRQ
From: Rafał Miłecki <>
Date: Mon, 16 Feb 2015 08:35:23 +0100
Cc: Hauke Mehrtens <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=cIq+TLac34/qqn24SfJytreSnVuM7v2GXXzyNqiQ7gs=; b=pzfvt9lN+KdjKtzKhWR6ODX4lDdVcI+bnxZB36N/Q6ECfVjMnefzWZZjcgGclSABP1 JR48TZJnDnMgp7VNvGh21v6npQWAybb9RyV/5wmYBP1Vxs7Hhdf1+Tm84hjHkRdBGS7w GAdCNMHNvFkpShYaDnR7yB6LK/2FiKFe8AGMnYok7Z+IDhMMjg+OcNYELE2nz+yWbk5m pPMSdDuvBnwKzAdEnGFuBEKdypdzKzH6CD0IBlHMf2dCkCCr7vFfgulFMqWzyH9z3BC9 EYb9svB9fSSZ7/VTAKlmBjkIMqKyfFiwwfMFb5pqKRdReUzgunuBhwlSzGBg3tmsQPBy 98uw==
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
Original-recipient: rfc822;

Once I've hit
when hacking PCI drivers locally on MIPS board. I see the problem but
don't know the solution.

1) I think "read" and "write" of struct pci_ops should be safe to call
in IRQ handler
2) In drivers/bcma/driver_pci_host.c we use ioremap_nocache

This causes a problem for boards with 2 PCI(e) cards. The base address
for the 2nd card is
#define BCMA_SOC_PCI1_CFG               0x44000000U
which doesn't allow MIPS to use KSEG1.

As the result forwardtrace looks like this:
1) ioremap_nocache
2) __ioremap_mode
3) __ioremap
4) get_vm_area
5) __get_vm_area_node
And then we can hit BUG_ON(in_interrupt());

Can you see any solution for this? Currently there isn't any mainline
code triggering this problem, but it would be nice to have everything
working anyway.

As one of workarounds I was thinking about mapping whole space early.
Unfortunately there are many possible registers (0xffff), few PCI
functions (0x30000), many possible PCI devices (0xf80000). It's way to
big space I guess to keep it mapped all the time.


<Prev in Thread] Current Thread [Next in Thread>
  • Looking for an idea/workaround for using MIPS ioremap_nocache (__ioremap) in IRQ, Rafał Miłecki <=