public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: long <tlnguyen@snoqualmie.dp.intel.com>
Cc: linux-kernel@vger.kernel.org,
	pcihpd-discuss@lists.sourceforge.net, jun.nakajima@intel.com,
	tom.l.nguyen@intel.com
Subject: Re: Updated MSI Patches
Date: Thu, 7 Aug 2003 15:14:12 -0700	[thread overview]
Message-ID: <20030807221411.GA13363@kroah.com> (raw)
In-Reply-To: <200308072125.h77LPKUN024461@snoqualmie.dp.intel.com>

pcihpd-discuss?  Don't you mean the linux-pci mailing list instead?

A few initial comments on your patch:
 - Is there any way to dynamically detect if hardware can support MSI?
 - If you enable this option, will boxes that do not support it stop
   working?

A driver has to be modified to use this option, right?  Do you have any
drivers that have been modified?  Without that, I don't think we can
test this patch out, right?


> diff -X excludes -urN linux-2.6.0-test2/arch/i386/kernel/io_apic.c linux-2.6.0-test2-create-vectorbase/arch/i386/kernel/io_apic.c
> --- linux-2.6.0-test2/arch/i386/kernel/io_apic.c	2003-07-27 13:00:21.000000000 -0400
> +++ linux-2.6.0-test2-create-vectorbase/arch/i386/kernel/io_apic.c	2003-08-05 09:25:54.000000000 -0400

You are cluttering up this file with a lot of #ifdefs.  Is there any way
you can not do this?

Does this break the summit and/or NUMA builds?

> diff -X excludes -urN linux-2.6.0-test2/include/asm-i386/mach-default/irq_vectors.h linux-2.6.0-test2-create-vectorbase/include/asm-i386/mach-default/irq_vectors.h
> --- linux-2.6.0-test2/include/asm-i386/mach-default/irq_vectors.h	2003-07-27 12:58:54.000000000 -0400
> +++ linux-2.6.0-test2-create-vectorbase/include/asm-i386/mach-default/irq_vectors.h	2003-08-05 09:25:54.000000000 -0400
> @@ -76,9 +76,14 @@
>   * Since vectors 0x00-0x1f are used/reserved for the CPU,
>   * the usable vector space is 0x20-0xff (224 vectors)
>   */
> +#define NR_VECTORS 256

Will this _always_ be the value?  Can boxes have bigger numbers (I
haven't seen the spec, so I don't know...)

Care to add a comment about this value?

> diff -X excludes -urN linux-2.6.0-test2-create-vectorbase/arch/i386/kernel/i386_ksyms.c linux-2.6.0-test2-create-msi/arch/i386/kernel/i386_ksyms.c
> --- linux-2.6.0-test2-create-vectorbase/arch/i386/kernel/i386_ksyms.c	2003-07-27 13:11:42.000000000 -0400
> +++ linux-2.6.0-test2-create-msi/arch/i386/kernel/i386_ksyms.c	2003-08-05 09:45:25.000000000 -0400
> @@ -166,6 +166,11 @@
>  EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
>  #endif
>  
> +#ifdef CONFIG_PCI_MSI
> +EXPORT_SYMBOL(msix_alloc_vectors);
> +EXPORT_SYMBOL(msix_free_vectors);
> +#endif
> +
>  #ifdef CONFIG_MCA
>  EXPORT_SYMBOL(machine_id);
>  #endif

Put the EXPORT_SYMBOL in the files that have the functions.  Don't
clutter up the ksyms.c files anymore.



> +u32 device_nomsi_list[DRIVER_NOMSI_MAX] = {0, };

Shouldn't this be static?

> +u32 device_msi_list[DRIVER_NOMSI_MAX] = {0, };

Same with this one?


> +	base = (u32*)ioremap_nocache(phys_addr,
> +		dev_msi_cap*PCI_MSIX_ENTRY_SIZE*sizeof(u32));
> +	if (base == NULL) 
> +		goto free_region; 

...

> +	*base = address.lo_address.value;
> +	*(base + 1) = address.hi_address;
> +	*(base + 2) = *((u32*)&data);

Don't do direct writes to memory, use the proper function calls.  You do
this in a few other places too.

That's enough to get the conversation started :)

thanks,

greg k-h

  reply	other threads:[~2003-08-07 22:14 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-07 21:25 Updated MSI Patches long
2003-08-07 22:14 ` Greg KH [this message]
2003-08-07 22:44 ` Jeff Garzik
2003-08-07 23:03   ` Matt Porter
2003-08-08  2:36 ` Zwane Mwaikambo
  -- strict thread matches above, loose matches on Subject: below --
2003-08-07 23:07 Nakajima, Jun
2003-08-08 14:41 Nguyen, Tom L
2003-08-08 19:33 long
2003-08-08 20:15 ` Greg KH
2003-08-11 20:51 long
2003-08-11 21:16 ` Greg KH
2003-08-12  1:41   ` Zwane Mwaikambo
2003-08-12  5:53     ` Greg KH
2003-08-12 15:22 long
2003-08-12 17:04 Nguyen, Tom L
2003-08-12 18:11 ` Zwane Mwaikambo
2003-08-12 17:32 Nguyen, Tom L
2003-08-12 18:14 ` Zwane Mwaikambo
2003-08-12 18:36 Nakajima, Jun
2003-08-12 18:48 ` Jeff Garzik
2003-08-12 19:14   ` Zwane Mwaikambo
2003-08-12 19:44     ` Jeff Garzik
2003-08-12 23:59 Nakajima, Jun
2003-08-13  0:48 ` Zwane Mwaikambo
2003-08-13  1:34 Nakajima, Jun
2003-08-13  1:37 ` Zwane Mwaikambo
2003-08-13  4:14 Nakajima, Jun
2003-08-13 15:19 Nguyen, Tom L
2003-08-14 23:46 Nguyen, Tom L
2003-08-19 15:42 Nguyen, Tom L
2003-08-22 18:25 long
2003-10-01 15:37 long
2003-10-01 17:09 ` Jeff Garzik
2003-10-01 18:26 Nguyen, Tom L
2003-10-03 22:15 long

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=20030807221411.GA13363@kroah.com \
    --to=greg@kroah.com \
    --cc=jun.nakajima@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pcihpd-discuss@lists.sourceforge.net \
    --cc=tlnguyen@snoqualmie.dp.intel.com \
    --cc=tom.l.nguyen@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox