Re: xorg-server-1.5.2 doesn't work because of missing sysfs pci resource files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ralf Baechle <ralf@xxxxxxxxxxxxxx> writes:

Hi,

> Here is a quick'n'dirty solution which I've not tested beyond just
> compiling.  It should work but performance will be bad.  Either way, I'm
> interested in a test report with X.
>
>   Ralf
>
> Signed-off-by: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
>
> diff --git a/arch/mips/include/asm/pci.h b/arch/mips/include/asm/pci.h
> index 5510c53..053e463 100644
> --- a/arch/mips/include/asm/pci.h
> +++ b/arch/mips/include/asm/pci.h
> @@ -79,6 +79,11 @@ static inline void pcibios_penalize_isa_irq(int irq, int active)
>  	/* We don't do dynamic PCI IRQ allocation */
>  }
>  
> +#define HAVE_PCI_MMAP
> +
> +extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
> +	enum pci_mmap_state mmap_state, int write_combine);
> +
>  /*
>   * Dynamic DMA mapping stuff.
>   * MIPS has everything mapped statically.
> diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
> index a377e9d..9233193 100644
> --- a/arch/mips/pci/pci.c
> +++ b/arch/mips/pci/pci.c
> @@ -354,6 +354,22 @@ EXPORT_SYMBOL(PCIBIOS_MIN_IO);
>  EXPORT_SYMBOL(PCIBIOS_MIN_MEM);
>  #endif
>  
> +int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
> +			enum pci_mmap_state mmap_state, int write_combine)
> +{
> +	unsigned long prot;
> +
> +	/*
> +	 * Ignore write-combine; for now only return uncached mappings.
> +	 */
> +	prot = pgprot_val(vma->vm_page_prot);
> +	prot = (prot & ~_CACHE_MASK) | _CACHE_UNCACHED;

What about things like _CACHE_UNCACHED_ACCELERATED ? Is there a way to
use this flag ?


Arnaud


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux