Messages in this thread | ![/](/images/icornerl.gif) | | Subject | Re: [patch] PCI Express Enhanced Config Patch - 2.6.0-test11 | From | Arjan van de Ven <> | Date | Mon, 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]
| ![\](/images/icornerr.gif) |