public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: Keith Owens <kaos@sgi.com>,
	linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org
Subject: Re: KDB blindly reads keyboard port
Date: Fri, 29 Sep 2006 18:58:31 +0000	[thread overview]
Message-ID: <200609291258.31881.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <20060929180110.GA4021@intel.com>

On Friday 29 September 2006 12:01, Luck, Tony wrote:
> On Fri, Sep 29, 2006 at 10:57:41AM -0600, Bjorn Helgaas wrote:
> >   acpi_parse_fadt: acpi_kbd_controller_present 0
> 
> The logic in the kernel seems backwards here though.  We start
> by assuming there is a keyboard, then when parsing the FADT
> we reset this assumption if the BAF_8042_KEYBOARD_CONTROLLER
> bit isn't set.  Which in turn forced SGI to include some
> workaround code for their older PROM (which doesn't provide
> the FADT table).
> 
> There's also a risk that if some code might get added that
> runs before we parse FADT that could be confused into thinking
> that the keyboard is present.
> 
> Wouldn't it be simpler/better to assume there is no keyboard until
> we find positive evidence that there is one?

I added the original check, but I can't remember the reason I
initialized acpi_kbd_controller_present to 1.  Possibly just
timidity.

At the time, it was used in pc_keyb.c to avoid a blind probe.
That usage no longer exists.  i8042 now registers a regular
PNP driver with the appropriate PNP IDs.

Nobody actually uses acpi_kbd_controller_present or
acpi_legacy_devices anymore.  Maybe the best thing is to
just remove both of them.  Then the Keith can add back
the acpi_kbd_controller_present part to the kdb patch if
he decides that's the best route.



ia64: remove unused acpi_kbd_controller_present, acpi_legacy_devices

Nobody uses either one anymore.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

Index: work-1/arch/ia64/kernel/acpi.c
=================================--- work-1.orig/arch/ia64/kernel/acpi.c	2006-09-27 16:33:05.000000000 -0600
+++ work-1/arch/ia64/kernel/acpi.c	2006-09-29 12:57:20.000000000 -0600
@@ -64,9 +64,6 @@
 void (*pm_power_off) (void);
 EXPORT_SYMBOL(pm_power_off);
 
-unsigned char acpi_kbd_controller_present = 1;
-unsigned char acpi_legacy_devices;
-
 unsigned int acpi_cpei_override;
 unsigned int acpi_cpei_phys_cpuid;
 
@@ -628,12 +625,6 @@
 
 	fadt = (struct fadt_descriptor *)fadt_header;
 
-	if (!(fadt->iapc_boot_arch & BAF_8042_KEYBOARD_CONTROLLER))
-		acpi_kbd_controller_present = 0;
-
-	if (fadt->iapc_boot_arch & BAF_LEGACY_DEVICES)
-		acpi_legacy_devices = 1;
-
 	acpi_register_gsi(fadt->sci_int, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW);
 	return 0;
 }
Index: work-1/arch/ia64/sn/kernel/setup.c
=================================--- work-1.orig/arch/ia64/sn/kernel/setup.c	2006-09-27 16:33:06.000000000 -0600
+++ work-1/arch/ia64/sn/kernel/setup.c	2006-09-29 12:44:28.000000000 -0600
@@ -65,7 +65,6 @@
 extern unsigned long last_time_offset;
 extern void (*ia64_mark_idle) (int);
 extern void snidle(int);
-extern unsigned char acpi_kbd_controller_present;
 extern unsigned long long (*ia64_printk_clock)(void);
 
 unsigned long sn_rtc_cycles_per_second;
@@ -452,17 +451,6 @@
 
 	ia64_printk_clock = ia64_sn2_printk_clock;
 
-	/*
-	 * Old PROMs do not provide an ACPI FADT. Disable legacy keyboard
-	 * support here so we don't have to listen to failed keyboard probe
-	 * messages.
-	 */
-	if (is_shub1() && version <= 0x0209 && acpi_kbd_controller_present) {
-		printk(KERN_INFO "Disabling legacy keyboard support as prom "
-		       "is too old and doesn't provide FADT\n");
-		acpi_kbd_controller_present = 0;
-	}
-
 	printk("SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF);
 
 	/*

  reply	other threads:[~2006-09-29 18:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-26 19:54 KDB blindly reads keyboard port Bjorn Helgaas
2006-09-27  2:45 ` Keith Owens
2006-09-27 11:57   ` Matthew Wilcox
2006-09-27 22:11   ` Bjorn Helgaas
2006-09-29  2:18 ` Keith Owens
2006-09-29 16:57   ` Bjorn Helgaas
2006-09-29 18:01     ` Luck, Tony
2006-09-29 18:58       ` Bjorn Helgaas [this message]
2006-11-10  4:23 ` Keith Owens
2006-11-10  4:28   ` Matthew Wilcox
2006-11-10  6:15 ` Keith Owens
2006-11-16  4:02 ` Keith Owens
2006-11-16 16:28   ` Bjorn Helgaas

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=200609291258.31881.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=kaos@sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@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