From: Ducrot Bruno Subject: Re: Patching tables osl.c doesn't work as advertised ... (was 2.4.19 & latest acpi & patched dsdt (tosh3k)) Date: Mon, 12 Aug 2002 14:13:47 +0200 Sender: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Message-ID: <20020812121347.GE32077@poup.poupinou.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Errors-To: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Huw H Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-acpi@vger.kernel.org On Sun, Aug 11, 2002 at 07:11:13AM +0400, Huw H wrote: > Heya all again, > I've found the cause of my troubles! > > In the file linux/drivers/acpi/osl.c the function acpi_os_table_override() > isn't properly implimented. The patch on ftp.poupinou.org needs to check which > table is being overriden, otherwise all tables get replaced... Maybe it should > be something like: > > ------------------------------- > > acpi_status > acpi_os_table_override (acpi_table_header *existing_table, > acpi_table_header **new_table) > { > if (!existing_table || !new_table) > return AE_BAD_PARAMETER; > > *new_table = (ACPI_TBLPTR *) AmlCode; > > if (ACPI_STRNCMP ((char *) existing_table, > (char *) *new_table, sizeof (XSDT_SIG) -1)) > { > *new_table = NULL; > }; > > return AE_OK; > } > > ------------------------ > > Ideally though I think the override belongs in > linux/drivers/acpi/tables/tbget.c and the acpi_os_table_override() function > should just return the AE_OK if the signatures match, or set the new table > pointer to NULL otherwise and/or return the appropriate errwor code. This is I > believe the expected behaviour of this function. Actually, I have not checked the latest release of ACPI, and I don't have time to code in my sparse time.. I think I can do something in that area in 2 or 3 weeks. -- Ducrot Bruno http://www.poupinou.org Page profaissionelle http://toto.tu-me-saoules.com Haume page ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf