parisc: Avoid ioremap() for same addresss in iosapic_register()
The LBA has already called ioremap() to get it's virtual address, which can be used for the IOSAPIC as well. Avoid calling ioremap() again and just reuse the correct iomem address for the IOSAPIC. Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
98a9d5f07e
commit
8f01caf0c5
|
@ -252,7 +252,7 @@ static inline int agp_mode_mercury(void __iomem *hpa) {
|
|||
** fixup_irq is to initialize PCI IRQ line support and
|
||||
** virtualize pcidev->irq value. To be called by pci_fixup_bus().
|
||||
*/
|
||||
extern void *iosapic_register(unsigned long hpa);
|
||||
extern void *iosapic_register(unsigned long hpa, void __iomem *vaddr);
|
||||
extern int iosapic_fixup_irq(void *obj, struct pci_dev *pcidev);
|
||||
|
||||
#define LBA_FUNC_ID 0x0000 /* function id */
|
||||
|
|
|
@ -890,7 +890,7 @@ iosapic_rd_version(struct iosapic_info *isi)
|
|||
** o allocate and initialize isi_vector[]
|
||||
** o allocate irq region
|
||||
*/
|
||||
void *iosapic_register(unsigned long hpa)
|
||||
void *iosapic_register(unsigned long hpa, void __iomem *vaddr)
|
||||
{
|
||||
struct iosapic_info *isi = NULL;
|
||||
struct irt_entry *irte = irt_cell;
|
||||
|
@ -919,7 +919,7 @@ void *iosapic_register(unsigned long hpa)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
isi->addr = ioremap(hpa, 4096);
|
||||
isi->addr = vaddr;
|
||||
isi->isi_hpa = hpa;
|
||||
isi->isi_version = iosapic_rd_version(isi);
|
||||
isi->isi_num_vectors = IOSAPIC_IRDT_MAX_ENTRY(isi->isi_version) + 1;
|
||||
|
|
|
@ -1535,7 +1535,8 @@ lba_driver_probe(struct parisc_device *dev)
|
|||
}
|
||||
|
||||
/* Tell I/O SAPIC driver we have a IRQ handler/region. */
|
||||
tmp_obj = iosapic_register(dev->hpa.start + LBA_IOSAPIC_BASE);
|
||||
tmp_obj = iosapic_register(dev->hpa.start + LBA_IOSAPIC_BASE,
|
||||
addr + LBA_IOSAPIC_BASE);
|
||||
|
||||
/* NOTE: PCI devices (e.g. 103c:1005 graphics card) which don't
|
||||
** have an IRT entry will get NULL back from iosapic code.
|
||||
|
|
Loading…
Reference in New Issue