Module Name:    src
Committed By:   rin
Date:           Tue Jul  2 06:07:12 UTC 2024

Modified Files:
        src/sys/arch/rs6000/mca: mca_machdep.c

Log Message:
rs6000: mca_machdep: Locally neglect GCC12 -Warray-bounds for 0-th page

as already done for, e.g., evbppc/wii.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/rs6000/mca/mca_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/rs6000/mca/mca_machdep.c
diff -u src/sys/arch/rs6000/mca/mca_machdep.c:1.5 src/sys/arch/rs6000/mca/mca_machdep.c:1.6
--- src/sys/arch/rs6000/mca/mca_machdep.c:1.5	Sat Nov 21 15:52:32 2020
+++ src/sys/arch/rs6000/mca/mca_machdep.c	Tue Jul  2 06:07:12 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: mca_machdep.c,v 1.5 2020/11/21 15:52:32 thorpej Exp $	*/
+/*	$NetBSD: mca_machdep.c,v 1.6 2024/07/02 06:07:12 rin Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mca_machdep.c,v 1.5 2020/11/21 15:52:32 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mca_machdep.c,v 1.6 2024/07/02 06:07:12 rin Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -172,6 +172,13 @@ mca_intr_disestablish(mca_chipset_tag_t 
 	
 
 /*
+ * GCC 12 blames pointer reference to 0-th page, [0, 0xfff].
+ * XXX map to higher address as done for, e.g., arm by devmap?
+ */
+#pragma GCC diagnostic push					/* XXX { */
+#pragma GCC diagnostic ignored "-Warray-bounds"
+
+/*
  * Handle a NMI.
  * return true to panic system, false to ignore.
  */
@@ -250,6 +257,8 @@ mca_disk_unbusy(void)
 	outb(PORT_DISKLED, inb(PORT_DISKLED) & ~DISKLED_ON);
 }
 
+#pragma GCC diagnostic pop					/* XXX } */
+
 /*
  * -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  * MCA DMA specific stuff. We use ISA routines for bulk of the work,

Reply via email to