From: Thomas Gleixner <tglx@linutronix.de>
To: "Pan, Jacob jun" <jacob.jun.pan@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH v2 4/10] x86: make use of platform feature flags during setup
Date: Wed, 19 Aug 2009 16:56:26 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.0908191652040.3361@localhost.localdomain> (raw)
In-Reply-To: <43F901BD926A4E43B106BF17856F0755643EBDF6@orsmsx508.amr.corp.intel.com>
Jacob,
On Thu, 16 Jul 2009, Pan, Jacob jun wrote:
> diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
> index 7bf325a..c0839f7 100644
> --- a/arch/x86/include/asm/setup.h
> +++ b/arch/x86/include/asm/setup.h
> @@ -32,6 +32,7 @@ struct x86_quirks {
> unsigned short oemsize);
> int (*setup_ioapic_ids)(void);
> void (*setup_secondary_clock)(void);
> + void (*reserve_ebda_region)(void);
> };
Nice you used the field in the previous patch already
> - reserve_ebda_region();
> + platform_feature_init_default();
> +
> + if (x86_quirks->reserve_ebda_region)
> + reserve_ebda_region();
Eek. What's the quirks function pointer for ?
> static struct resource system_rom_resource = {
> .name = "System ROM",
> @@ -99,6 +100,8 @@ void __init probe_roms(void)
> unsigned char c;
> int i;
>
> + if (!platform_has(X86_PLATFORM_FEATURE_BIOS))
> + return;
That should be done with a function pointer which is initialized in
the platform code.
>
> #ifdef CONFIG_X86_32
> - request_resource(&iomem_resource, &video_ram_resource);
> + if (platform_has(X86_PLATFORM_FEATURE_BIOS))
> + request_resource(&iomem_resource, &video_ram_resource);
> #endif
> - reserve_standard_io_resources();
> + if (platform_has(X86_PLATFORM_FEATURE_ISA))
> + reserve_standard_io_resources();
Ditto. And the function pointer could eliminate the X86_32 ifdef as well.
> @@ -1190,6 +1195,24 @@ static int pirq_enable_irq(struct pci_dev *dev)
> u8 pin;
>
> pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
> +#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SFI)
> + /* For platforms only have IOAPIC, the PCI irq line is 1:1 mapped to
> + * IOAPIC RTE entries, so we just enable RTE for the device.
> + */
> + if (platform_has(X86_PLATFORM_FEATURE_IOAPIC) &&
> + !platform_has(X86_PLATFORM_FEATURE_8259) &&
> + !platform_has(X86_PLATFORM_FEATURE_ACPI) &&
> + !platform_has(X86_PLATFORM_FEATURE_BIOS) &&
You are not serious about that #ifdef and featuritis mess ?
Thanks,
tglx
prev parent reply other threads:[~2009-08-19 14:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-16 10:54 Pan, Jacob jun
2009-08-19 14:56 ` Thomas Gleixner [this message]
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=alpine.LFD.2.00.0908191652040.3361@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=jacob.jun.pan@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®