On Mon, Dec 04, 2006 at 10:42:47PM +0100, Andi Kleen wrote:
> > > But arch independent code can not call __pa_symbol() as this definition
> > > is local to i386 and x86_64 arches. So is it acceptable to change
> > > symantics of __pa()?
> 
> __pa is by definition architecture dependent. Why should
> architecture independent code want to call it?
>

That's true, but a quick grep in drivers/ dir gave me lots of results. I am
pasting few of them. Looks like __pa() is already being used at many a places
in arch independent code

An stupid question, as __pa() is arch dependent call, how does one
determine the physical addr associated with a kernel text sysmbol or phy
addr associated with a kernel linearly mapped region in in arch independent
code?

 
./base/cpu.c:   addr = __pa(per_cpu_ptr(crash_notes, cpunum));
./char/mbcs.c:                      __pa(soft->gscr_addr) >> PAGE_SHIFT,
./char/mem.c:     && addr >= __pa(high_memory);
./char/mem.c:   return addr >= __pa(high_memory);
./char/mem.c:   if (addr + count > __pa(high_memory))
./char/mmtimer.c:       mmtimer_addr = __pa(RTC_COUNTER_ADDR);
./char/mspec.c:                 nid = 
nasid_to_cnodeid(get_node_number(__pa(addr)));
./char/mspec.c:                         phys = __pa(scratch_page[nid]);
./char/watchdog/wdrtas.c:                          WDRTAS_SP_SPI, (void 
*)__pa(&value), 4);
./char/watchdog/wdrtas.c:                                  (void 
*)__pa(wdrtas_logbuffer),
./char/watchdog/wdrtas.c:                          (void *)__pa(&temperature),
./infiniband/hw/amso1100/c2.c:                  (void *) __pa((unsigned long) 
rxp_hdr));
./media/video/cpia2/cpia2_core.c:       ret = __pa(kva);
./net/fec.c:    bdp->cbd_bufaddr = __pa(skb->data);
./net/fec.c:            bdp->cbd_bufaddr = __pa(fep->tx_bounce[index]);
./net/fec.c:                    bdp->cbd_bufaddr = __pa(mem_addr);
./net/fec.c:    fecp->fec_r_des_start = __pa((uint)(fep->rx_bd_base));
./net/fec.c:    fecp->fec_x_des_start = __pa((uint)(fep->tx_bd_base));
./net/fec.c:    fecp->fec_r_des_start = __pa((uint)(fep->rx_bd_base));
./net/fec.c:    fecp->fec_x_des_start = __pa((uint)(fep->tx_bd_base));

Thanks
Vivek
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot

Reply via email to