lkml.org 
[lkml]   [2003]   [Dec]   [29]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch] PCI Express Enhanced Config Patch - 2.6.0-test11
FromArjan van de Ven <>
DateMon, 29 Dec 2003 12:53:39 +0100
> diff -Naur linux-2.6_src/drivers/acpi/tables.c
> linux-2.6_pciexpress/drivers/acpi/tables.c
> --- linux-2.6_src/drivers/acpi/tables.c	2003-11-27 17:48:39.000000000
> +0530
> +++ linux-2.6_pciexpress/drivers/acpi/tables.c	2003-12-24
> 18:34:38.048354440 +0530
> @@ -58,6 +58,9 @@
>  	[ACPI_SSDT]		= "SSDT",
>  	[ACPI_SPMI]		= "SPMI",
>  	[ACPI_HPET]		= "HPET",
> +#ifdef CONFIG_PCI_EXP_ENHANCED
> +	[ACPI_MCFG]		= "MCFG",
> +#endif

why this ifdef ?
>  #define PCI_CFG_SPACE_SIZE 256
> 
> +#ifdef CONFIG_PCI_EXP_ENHANCED
> +#define PCI_CFG_SPACE_EXP_SIZE 4096
> +#endif

or this one

> @@ -34,12 +46,22 @@
>  		new = file->f_pos + off;
>  		break;
>  	case 2:
> +#ifdef CONFIG_PCI_EXP_ENHANCED
> +		if (is_pci_express_dev)
> +			new = PCI_CFG_SPACE_EXP_SIZE + off;
> +		else
> +#endif /*CONFIG_PCI_EXP_ENHANCED*/

this really looks like you want a dummy is_pci_express_dev (which is
forced 0) instead of all these ifdefs
> diff -Naur linux-2.6_src/include/linux/acpi.h
> linux-2.6_pciexpress/include/linux/acpi.h
> --- linux-2.6_src/include/linux/acpi.h	2003-11-27 17:47:18.000000000
> +0530
> +++ linux-2.6_pciexpress/include/linux/acpi.h	2003-12-24
> 18:34:21.000000000 +0530
> @@ -317,6 +317,15 @@
>  	char				ec_id[0];
>  } __attribute__ ((packed));
> 
> +#ifdef CONFIG_PCI_EXP_ENHANCED
> +struct acpi_table_mcfg {
> +	struct acpi_table_header 	header;
> +	u8	reserved[8];
> +	u64	base_address;
> +} __attribute__ ((packed));
> +#endif

why an ifdef around a struct definition ???

>  enum acpi_table_id {
> @@ -338,6 +347,9 @@
>  	ACPI_SSDT,
>  	ACPI_SPMI,
>  	ACPI_HPET,
> +#ifdef CONFIG_PCI_EXP_ENHANCED
> +	ACPI_MCFG,
> +#endif
>  	ACPI_TABLE_COUNT
>  };

.... or an enum....

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 12:59    [from the cache]
©2003-2008