lkml.org 
[lkml]   [2006]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: KDB blindly reads keyboard port
Date
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);

/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-09-29 21:01    [W:0.305 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site