Skip to content

Commit 8f01caf

Browse files
committed
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>
1 parent 98a9d5f commit 8f01caf

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

arch/parisc/include/asm/ropes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ static inline int agp_mode_mercury(void __iomem *hpa) {
252252
** fixup_irq is to initialize PCI IRQ line support and
253253
** virtualize pcidev->irq value. To be called by pci_fixup_bus().
254254
*/
255-
extern void *iosapic_register(unsigned long hpa);
255+
extern void *iosapic_register(unsigned long hpa, void __iomem *vaddr);
256256
extern int iosapic_fixup_irq(void *obj, struct pci_dev *pcidev);
257257

258258
#define LBA_FUNC_ID 0x0000 /* function id */

drivers/parisc/iosapic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ iosapic_rd_version(struct iosapic_info *isi)
890890
** o allocate and initialize isi_vector[]
891891
** o allocate irq region
892892
*/
893-
void *iosapic_register(unsigned long hpa)
893+
void *iosapic_register(unsigned long hpa, void __iomem *vaddr)
894894
{
895895
struct iosapic_info *isi = NULL;
896896
struct irt_entry *irte = irt_cell;
@@ -919,7 +919,7 @@ void *iosapic_register(unsigned long hpa)
919919
return NULL;
920920
}
921921

922-
isi->addr = ioremap(hpa, 4096);
922+
isi->addr = vaddr;
923923
isi->isi_hpa = hpa;
924924
isi->isi_version = iosapic_rd_version(isi);
925925
isi->isi_num_vectors = IOSAPIC_IRDT_MAX_ENTRY(isi->isi_version) + 1;

drivers/parisc/lba_pci.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1535,7 +1535,8 @@ lba_driver_probe(struct parisc_device *dev)
15351535
}
15361536

15371537
/* Tell I/O SAPIC driver we have a IRQ handler/region. */
1538-
tmp_obj = iosapic_register(dev->hpa.start + LBA_IOSAPIC_BASE);
1538+
tmp_obj = iosapic_register(dev->hpa.start + LBA_IOSAPIC_BASE,
1539+
addr + LBA_IOSAPIC_BASE);
15391540

15401541
/* NOTE: PCI devices (e.g. 103c:1005 graphics card) which don't
15411542
** have an IRT entry will get NULL back from iosapic code.

0 commit comments

Comments
 (0)