- Update function prototype for sn_io_addr
PATCH 1/1 - Update function prototype for sn_io_addr
Add "const" to function prototype for sn_io_addr. Cuts boot time on simulator in half.
Index: linux/include/asm-ia64/sn/sn2/io.h =================================--- linux.orig/include/asm-ia64/sn/sn2/io.h +++ linux/include/asm-ia64/sn/sn2/io.h
@@ -9,7 +9,7 @@
#ifndef _ASM_SN_SN2_IO_H
#define _ASM_SN_SN2_IO_H
-extern void * sn_io_addr(unsigned long port); /* Forward definition */
+extern void * sn_io_addr(unsigned long port) __attribute__ ((__const__)); /* Forward definition */
extern void sn_mmiob(void); /* Forward definition */
#include <asm/intrinsics.h>
Signature · 4 lines
Thanks Jack Steiner ([email protected]) 651-683-5302 Principal Engineer SGI - Silicon Graphics, Inc.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Jack Steiner
Jack> Add "const" to function prototype for sn_io_addr. Cuts boot Jack> time on simulator in half.
Jack> Signed-off-by: Jack Steiner <[email protected]>
Jack> __attribute__ ((__const__));
I think you're supposed to use __attribute_const__.
--david
Quoted 10 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Jack Steiner
Jack> Add "const" to function prototype for
sn_io_addr. Cuts boot Jack> time on simulator in half.Jack> Signed-off-by: Jack Steiner <[email protected]>
Jack> __attribute__ ((__const__));I think you're supposed to use
__attribute_const__.
Right..
Add "const" to function prototype for sn_io_addr. Cuts boot time on simulator in half.
Index: linux/include/asm-ia64/sn/sn2/io.h =================================--- linux.orig/include/asm-ia64/sn/sn2/io.h +++ linux/include/asm-ia64/sn/sn2/io.h
@@ -8,10 +8,11 @@
#ifndef _ASM_SN_SN2_IO_H
#define _ASM_SN_SN2_IO_H
+#include <linux/compiler.h>
+#include <asm/intrinsics.h>
-extern void * sn_io_addr(unsigned long port); /* Forward definition */ +extern void * sn_io_addr(unsigned long port) __attribute_const__; /* Forward definition */
extern void sn_mmiob(void); /* Forward definition */
-#include <asm/intrinsics.h>
#define __sn_mf_a() ia64_mfa()
Signature · 4 lines
Thanks Jack Steiner ([email protected]) 651-683-5302 Principal Engineer SGI - Silicon Graphics, Inc.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Jack" = Jack Steiner <[email protected]> writes:
Jack> Add "const" to function prototype for sn_io_addr. Cuts boot time Jack> on simulator in half.
Is this the SKI simulator? I can't currently build Linux in CONFIG_GENERIC mode to run on the simulator (you can't build the bootloader, and if you work around that by compiling the bootloader
with CONFIG_HP_SIM the result hangs in very early boot). Andsn_io_addr isn't included if you compile with CONFIG_HP_SIM.
So I'm interested to know what you're doing.
--
Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au The technical we do immediately, the political takes *forever*
Quoted 1 line · Peter Chubb
Is this the SKI simulator?
I'm sure it's Medusa (SGI's internal ia64 simulator which has SN support amongst other things).
--cw