All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaud Patard <apatard@mandriva.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Subject: Re: xorg-server-1.5.2 doesn't work because of missing sysfs pci resource files
Date: Tue, 09 Dec 2008 19:17:13 +0100	[thread overview]
Message-ID: <m3k5a9kyc6.fsf@anduin.mandriva.com> (raw)
In-Reply-To: <20081206102030.GA9410@linux-mips.org> (Ralf Baechle's message of "Sat, 6 Dec 2008 10:20:30 +0000")

Ralf Baechle <ralf@linux-mips.org> 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@linux-mips.org>
>
> 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

  parent reply	other threads:[~2008-12-09 18:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-05 15:43 xorg-server-1.5.2 doesn't work because of missing sysfs pci resource files Zhang Le
2008-12-05 17:59 ` Arnaud Patard
2008-12-05 18:08   ` Ralf Baechle
2008-12-06 10:20 ` Ralf Baechle
2008-12-06 16:47   ` Zhang Le
2008-12-09 17:22     ` Zhang Le
2008-12-09 17:39       ` Zhang Le
2008-12-09 17:57         ` Ralf Baechle
2008-12-09 18:17   ` Arnaud Patard [this message]
2008-12-09 18:36     ` Ralf Baechle
2008-12-09 19:01       ` Arnaud Patard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3k5a9kyc6.fsf@anduin.mandriva.com \
    --to=apatard@mandriva.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.