/* n2_asm.S: Hypervisor calls for NCS support.1*2* Copyright (C) 2009 David S. Miller <[email protected]>3*/45#include <linux/linkage.h>6#include <asm/hypervisor.h>7#include "n2_core.h"89/* o0: queue type10* o1: RA of queue11* o2: num entries in queue12* o3: address of queue handle return13*/14ENTRY(sun4v_ncs_qconf)15mov HV_FAST_NCS_QCONF, %o516ta HV_FAST_TRAP17stx %o1, [%o3]18retl19nop20ENDPROC(sun4v_ncs_qconf)2122/* %o0: queue handle23* %o1: address of queue type return24* %o2: address of queue base address return25* %o3: address of queue num entries return26*/27ENTRY(sun4v_ncs_qinfo)28mov %o1, %g129mov %o2, %g230mov %o3, %g331mov HV_FAST_NCS_QINFO, %o532ta HV_FAST_TRAP33stx %o1, [%g1]34stx %o2, [%g2]35stx %o3, [%g3]36retl37nop38ENDPROC(sun4v_ncs_qinfo)3940/* %o0: queue handle41* %o1: address of head offset return42*/43ENTRY(sun4v_ncs_gethead)44mov %o1, %o245mov HV_FAST_NCS_GETHEAD, %o546ta HV_FAST_TRAP47stx %o1, [%o2]48retl49nop50ENDPROC(sun4v_ncs_gethead)5152/* %o0: queue handle53* %o1: address of tail offset return54*/55ENTRY(sun4v_ncs_gettail)56mov %o1, %o257mov HV_FAST_NCS_GETTAIL, %o558ta HV_FAST_TRAP59stx %o1, [%o2]60retl61nop62ENDPROC(sun4v_ncs_gettail)6364/* %o0: queue handle65* %o1: new tail offset66*/67ENTRY(sun4v_ncs_settail)68mov HV_FAST_NCS_SETTAIL, %o569ta HV_FAST_TRAP70retl71nop72ENDPROC(sun4v_ncs_settail)7374/* %o0: queue handle75* %o1: address of devino return76*/77ENTRY(sun4v_ncs_qhandle_to_devino)78mov %o1, %o279mov HV_FAST_NCS_QHANDLE_TO_DEVINO, %o580ta HV_FAST_TRAP81stx %o1, [%o2]82retl83nop84ENDPROC(sun4v_ncs_qhandle_to_devino)8586/* %o0: queue handle87* %o1: new head offset88*/89ENTRY(sun4v_ncs_sethead_marker)90mov HV_FAST_NCS_SETHEAD_MARKER, %o591ta HV_FAST_TRAP92retl93nop94ENDPROC(sun4v_ncs_sethead_marker)959697