U3 AGP

Jerome Glisse j.glisse at free.fr
Sat Dec 25 03:39:19 EST 2004


Hi,

Still looking in U3 agp i found something strange in
uninorth-agp.c for function

static void uninorth_tlbflush(struct agp_memory *mem)
{
    pci_write_config_dword(agp_bridge->dev, UNI_N_CFG_GART_CTRL,
            UNI_N_CFG_GART_ENABLE | UNI_N_CFG_GART_INVAL);
    pci_write_config_dword(agp_bridge->dev, UNI_N_CFG_GART_CTRL,
            UNI_N_CFG_GART_ENABLE);
    pci_write_config_dword(agp_bridge->dev, UNI_N_CFG_GART_CTRL,
            UNI_N_CFG_GART_ENABLE | UNI_N_CFG_GART_2xRESET);
    pci_write_config_dword(agp_bridge->dev, UNI_N_CFG_GART_CTRL,
            UNI_N_CFG_GART_ENABLE);
}

the arg mem is not used, shouldn't it be used to write something like :

static void uninorth_tlbflush(struct agp_memory *mem)
{
    pci_write_config_dword(agp_bridge->dev, UNI_N_CFG_GART_CTRL,
            UNI_N_CFG_GART_ENABLE | UNI_N_CFG_GART_INVAL);
    pci_write_config_dword(agp_bridge->dev, UNI_N_CFG_GART_CTRL,
            UNI_N_CFG_GART_ENABLE);

    // Here write what is in mem :)

    pci_write_config_dword(agp_bridge->dev, UNI_N_CFG_GART_CTRL,
            UNI_N_CFG_GART_ENABLE | UNI_N_CFG_GART_2xRESET);
    pci_write_config_dword(agp_bridge->dev, UNI_N_CFG_GART_CTRL,
            UNI_N_CFG_GART_ENABLE);
}

Or maybe flush_dcache_range is already doing the job before this
function get called so i guess uninorth_tlbflush do not need to have
any clue of mem.

Moreover it looks like that apple is no more using this way to flush
in lastest darwin AppleMacRISCPCI-2 it is commented out (maybe
they have move it elsewhere).

best,
Jerome Glisse



More information about the Linuxppc64-dev mailing list