From owner-freebsd-current@FreeBSD.ORG Thu Jul 1 16:09:03 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B294E16A4CE for ; Thu, 1 Jul 2004 16:09:03 +0000 (GMT) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08A7E43D1F for ; Thu, 1 Jul 2004 16:09:03 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru id i61G5LuL033282 for current@freebsd.org.checked; (8.12.8/vak/2.1) Thu, 1 Jul 2004 20:05:21 +0400 (MSD) (envelope-from rik@cronyx.ru) Received: from cronyx.ru (hi.cronyx.ru [144.206.181.94]) by hanoi.cronyx.ru with ESMTP id i61G3JcA033002; (8.12.8/vak/2.1) Thu, 1 Jul 2004 20:03:19 +0400 (MSD) (envelope-from rik@cronyx.ru) Message-ID: <40E435AA.1040400@cronyx.ru> Date: Thu, 01 Jul 2004 20:02:50 +0400 From: Roman Kurakin User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031208 X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= References: <20040701115954.805D27303F@freebsd-current.sentex.ca> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit cc: i386@freebsd.org cc: FreeBSD Tinderbox cc: current@freebsd.org Subject: Re: [current tinderbox] failure on i386/i386 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2004 16:09:03 -0000 Dag-Erling Smørgrav wrote: >FreeBSD Tinderbox writes: > > >>/tinderbox/CURRENT/i386/i386/src/sys/dev/acpica/acpi_ec.c: In function `acpi_ec_ecdt_probe': >>/tinderbox/CURRENT/i386/i386/src/sys/dev/acpica/acpi_ec.c:379: warning: dereferencing type-punned pointer will break strict-aliasing rules >>*** Error code 1 >> >> > >Hack attached. > > How about this: --- sys/dev/acpica/acpi_ec.c 1 Jul 2004 00:51:31 -0000 1.56 +++ sys/dev/acpica/acpi_ec.c 1 Jul 2004 15:06:46 -0000 @@ -375,8 +375,8 @@ ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); /* Find and validate the ECDT. */ status = AcpiGetFirmwareTable("ECDT", 1, ACPI_LOGICAL_ADDRESSING, - (ACPI_TABLE_HEADER **)&ecdt); + (void *)&ecdt); if (ACPI_FAILURE(status) || ecdt->control.RegisterBitWidth != 8 || ecdt->data.RegisterBitWidth != 8) { ... it is more hacky but simple ;-) rik >DES > > >------------------------------------------------------------------------ > >Index: sys/dev/acpica/acpi_ec.c >=================================================================== >RCS file: /home/ncvs/src/sys/dev/acpica/acpi_ec.c,v >retrieving revision 1.56 >diff -u -r1.56 acpi_ec.c >--- sys/dev/acpica/acpi_ec.c 1 Jul 2004 00:51:31 -0000 1.56 >+++ sys/dev/acpica/acpi_ec.c 1 Jul 2004 15:06:46 -0000 >@@ -366,6 +366,7 @@ > void > acpi_ec_ecdt_probe(device_t parent) > { >+ ACPI_TABLE_HEADER *hdr; > ACPI_TABLE_ECDT *ecdt; > ACPI_STATUS status; > device_t child; >@@ -375,8 +376,8 @@ > ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); > > /* Find and validate the ECDT. */ >- status = AcpiGetFirmwareTable("ECDT", 1, ACPI_LOGICAL_ADDRESSING, >- (ACPI_TABLE_HEADER **)&ecdt); >+ status = AcpiGetFirmwareTable("ECDT", 1, ACPI_LOGICAL_ADDRESSING, &hdr); >+ ecdt = (ACPI_TABLE_ECDT *)hdr; > if (ACPI_FAILURE(status) || > ecdt->control.RegisterBitWidth != 8 || > ecdt->data.RegisterBitWidth != 8) { >Index: sys/i386/acpica/acpi_wakeup.c >=================================================================== >RCS file: /home/ncvs/src/sys/i386/acpica/acpi_wakeup.c,v >retrieving revision 1.33 >diff -u -r1.33 acpi_wakeup.c >--- sys/i386/acpica/acpi_wakeup.c 6 May 2004 02:18:58 -0000 1.33 >+++ sys/i386/acpica/acpi_wakeup.c 1 Jul 2004 15:11:53 -0000 >@@ -307,11 +307,13 @@ > return; > } > >- if (bus_dmamem_alloc(acpi_waketag, (void **)&acpi_wakeaddr, >+ void *wakeaddr = (void *)acpi_wakeaddr; >+ if (bus_dmamem_alloc(acpi_waketag, &wakeaddr, > BUS_DMA_NOWAIT, &acpi_wakemap)) { > printf("acpi_alloc_wakeup_handler: can't alloc wake memory\n"); > return; > } >+ acpi_wakeaddr = (vm_offset_t)wakeaddr; > } > > SYSINIT(acpiwakeup, SI_SUB_KMEM, SI_ORDER_ANY, acpi_alloc_wakeup_handler, 0) > > >------------------------------------------------------------------------ > >_______________________________________________ >freebsd-current@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-current >To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > >