Commit e6ecef19 authored by Jesse Barnes's avatar Jesse Barnes Committed by Tony Luck

[IA64-SGI] remove redundant macros

This patch removes some redundant nasid conversion macros from arch.h and
updates callers to use the version they were defined to instead.
Signed-off-by: default avatarJesse Barnes <jbarnes@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 0a1869ac
...@@ -136,7 +136,7 @@ static void sn_fixup_ionodes(void) ...@@ -136,7 +136,7 @@ static void sn_fixup_ionodes(void)
for (i = 0; i < numionodes; i++) { for (i = 0; i < numionodes; i++) {
hubdev = (struct hubdev_info *)(NODEPDA(i)->pdinfo); hubdev = (struct hubdev_info *)(NODEPDA(i)->pdinfo);
nasid = COMPACT_TO_NASID_NODEID(i); nasid = cnodeid_to_nasid(i);
status = sal_get_hubdev_info(nasid, (uint64_t) __pa(hubdev)); status = sal_get_hubdev_info(nasid, (uint64_t) __pa(hubdev));
if (status) if (status)
continue; continue;
...@@ -313,7 +313,7 @@ static void sn_pci_controller_fixup(int segment, int busnum) ...@@ -313,7 +313,7 @@ static void sn_pci_controller_fixup(int segment, int busnum)
SN_PCIBUS_BUSSOFT(bus) = provider_soft; SN_PCIBUS_BUSSOFT(bus) = provider_soft;
nasid = NASID_GET(SN_PCIBUS_BUSSOFT(bus)->bs_base); nasid = NASID_GET(SN_PCIBUS_BUSSOFT(bus)->bs_base);
cnode = NASID_TO_COMPACT_NODEID(nasid); cnode = nasid_to_cnodeid(nasid);
hubdev_info = (struct hubdev_info *)(NODEPDA(cnode)->pdinfo); hubdev_info = (struct hubdev_info *)(NODEPDA(cnode)->pdinfo);
SN_PCIBUS_BUSSOFT(bus)->bs_xwidget_info = SN_PCIBUS_BUSSOFT(bus)->bs_xwidget_info =
&(hubdev_info->hdi_xwidget_info[SN_PCIBUS_BUSSOFT(bus)->bs_xid]); &(hubdev_info->hdi_xwidget_info[SN_PCIBUS_BUSSOFT(bus)->bs_xid]);
......
...@@ -226,10 +226,10 @@ void sn_dma_flush(uint64_t addr) ...@@ -226,10 +226,10 @@ void sn_dma_flush(uint64_t addr)
return; return;
nasid = NASID_GET(addr); nasid = NASID_GET(addr);
if (-1 == NASID_TO_COMPACT_NODEID(nasid)) if (-1 == nasid_to_cnodeid(nasid))
return; return;
hubinfo = (NODEPDA(NASID_TO_COMPACT_NODEID(nasid)))->pdinfo; hubinfo = (NODEPDA(nasid_to_cnodeid(nasid)))->pdinfo;
if (!hubinfo) { if (!hubinfo) {
BUG(); BUG();
......
...@@ -98,7 +98,7 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft) ...@@ -98,7 +98,7 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft)
} }
nasid = NASID_GET(soft->pbi_buscommon.bs_base); nasid = NASID_GET(soft->pbi_buscommon.bs_base);
cnode = NASID_TO_COMPACT_NODEID(nasid); cnode = nasid_to_cnodeid(nasid);
hubdev_info = (struct hubdev_info *)(NODEPDA(cnode)->pdinfo); hubdev_info = (struct hubdev_info *)(NODEPDA(cnode)->pdinfo);
if (hubdev_info->hdi_flush_nasid_list.widget_p) { if (hubdev_info->hdi_flush_nasid_list.widget_p) {
......
...@@ -24,9 +24,6 @@ ...@@ -24,9 +24,6 @@
typedef u64 nic_t; typedef u64 nic_t;
#define NASID_TO_COMPACT_NODEID(nasid) (nasid_to_cnodeid(nasid))
#define COMPACT_TO_NASID_NODEID(cnode) (cnodeid_to_nasid(cnode))
extern void sn_flush_all_caches(long addr, long bytes); extern void sn_flush_all_caches(long addr, long bytes);
#endif /* _ASM_IA64_SN_ARCH_H */ #endif /* _ASM_IA64_SN_ARCH_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment