Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
4f0fdda0
Commit
4f0fdda0
authored
Sep 16, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
http://lia64.bkbits.net/linux-ia64-release-2.6.9
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
2508d59b
f6c62004
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
905 additions
and
9 deletions
+905
-9
arch/ia64/Kconfig
arch/ia64/Kconfig
+6
-0
arch/ia64/kernel/minstate.h
arch/ia64/kernel/minstate.h
+2
-4
arch/ia64/sn/kernel/sn2/Makefile
arch/ia64/sn/kernel/sn2/Makefile
+1
-1
arch/ia64/sn/kernel/sn2/prominfo_proc.c
arch/ia64/sn/kernel/sn2/prominfo_proc.c
+1
-1
arch/ia64/sn/kernel/sn2/sn_hwperf.c
arch/ia64/sn/kernel/sn2/sn_hwperf.c
+652
-0
arch/ia64/sn/kernel/sn2/sn_proc_fs.c
arch/ia64/sn/kernel/sn2/sn_proc_fs.c
+7
-0
include/asm-ia64/mca_asm.h
include/asm-ia64/mca_asm.h
+0
-3
include/asm-ia64/sn/sn2/sn_hwperf.h
include/asm-ia64/sn/sn2/sn_hwperf.h
+218
-0
include/asm-ia64/sn/sn_sal.h
include/asm-ia64/sn/sn_sal.h
+18
-0
No files found.
arch/ia64/Kconfig
View file @
4f0fdda0
...
...
@@ -76,6 +76,12 @@ config IA64_HP_ZX1
config IA64_SGI_SN2
bool "SGI-SN2"
help
Selecting this option will optimize the kernel for use on sn2 based
systems, but the resulting kernel binary will not run on other
types of ia64 systems. If you have an SGI Altix system, it's safe
to select this option. If in doubt, select ia64 generic support
instead.
config IA64_HP_SIM
bool "Ski-simulator"
...
...
arch/ia64/kernel/minstate.h
View file @
4f0fdda0
...
...
@@ -54,8 +54,7 @@
(pUStk) mov ar.rsc=0x3;
/* set eager mode, pl 0, little-endian, loadrs=0 */
\
#define MINSTATE_END_SAVE_MIN_PHYS \
or r12=r12,r14;
/* make sp a kernel virtual address */
\
or r13=r13,r14;
/* make `current' a kernel virtual address */
\
dep r12=-1,r12,61,3;
/* make sp a kernel virtual address */
\
;;
#ifdef MINSTATE_VIRT
...
...
@@ -65,7 +64,7 @@
#endif
#ifdef MINSTATE_PHYS
# define MINSTATE_GET_CURRENT(reg) mov reg=IA64_KR(CURRENT);;
dep reg=0,reg,61,3
# define MINSTATE_GET_CURRENT(reg) mov reg=IA64_KR(CURRENT);;
tpa reg=reg
# define MINSTATE_START_SAVE_MIN MINSTATE_START_SAVE_MIN_PHYS
# define MINSTATE_END_SAVE_MIN MINSTATE_END_SAVE_MIN_PHYS
#endif
...
...
@@ -172,7 +171,6 @@
;; \
.mem.offset 0,0; st8.spill [r16]=r15,16; \
.mem.offset 8,0; st8.spill [r17]=r14,16; \
dep r14=-1,r0,61,3; \
;; \
.mem.offset 0,0; st8.spill [r16]=r2,16; \
.mem.offset 8,0; st8.spill [r17]=r3,16; \
...
...
arch/ia64/sn/kernel/sn2/Makefile
View file @
4f0fdda0
...
...
@@ -10,4 +10,4 @@
#
obj-y
+=
cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o
\
prominfo_proc.o timer.o timer_interrupt.o
prominfo_proc.o timer.o timer_interrupt.o
sn_hwperf.o
arch/ia64/sn/kernel/sn2/prominfo_proc.c
View file @
4f0fdda0
...
...
@@ -222,7 +222,7 @@ dump_version(char *page, unsigned long *fit)
{
int
nentries
;
int
fentry
;
unsigned
long
qw
;
unsigned
long
qw
=
0
;
int
len
;
nasid_t
nasid
=
NASID_GET
(
fit
);
...
...
arch/ia64/sn/kernel/sn2/sn_hwperf.c
0 → 100644
View file @
4f0fdda0
This diff is collapsed.
Click to expand it.
arch/ia64/sn/kernel/sn2/sn_proc_fs.c
View file @
4f0fdda0
...
...
@@ -107,6 +107,10 @@ static struct proc_dir_entry *sn_procfs_create_entry(
return
e
;
}
/* /proc/sgi_sn/sn_topology uses seq_file, see sn_hwperf.c */
extern
int
sn_topology_open
(
struct
inode
*
,
struct
file
*
);
extern
int
sn_topology_release
(
struct
inode
*
,
struct
file
*
);
void
register_sn_procfs
(
void
)
{
static
struct
proc_dir_entry
*
sgi_proc_dir
=
NULL
;
...
...
@@ -132,6 +136,9 @@ void register_sn_procfs(void)
sn_procfs_create_entry
(
"coherence_id"
,
sgi_proc_dir
,
coherence_id_open
,
single_release
);
sn_procfs_create_entry
(
"sn_topology"
,
sgi_proc_dir
,
sn_topology_open
,
sn_topology_release
);
}
#endif
/* CONFIG_PROC_FS */
include/asm-ia64/mca_asm.h
View file @
4f0fdda0
...
...
@@ -162,9 +162,6 @@
;; \
srlz.d; \
mov r13 = ar.k6; \
;; \
DATA_PA_TO_VA(r13,temp1); \
;; \
mov temp2 = ar.bspstore; \
;; \
DATA_PA_TO_VA(temp2,temp1); \
...
...
include/asm-ia64/sn/sn2/sn_hwperf.h
0 → 100644
View file @
4f0fdda0
/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 2004 Silicon Graphics, Inc. All rights reserved.
*
* Data types used by the SN_SAL_HWPERF_OP SAL call for monitoring
* SGI Altix node and router hardware
*
* Mark Goodwin <markgw@sgi.com> Mon Aug 30 12:23:46 EST 2004
*/
#ifndef SN_HWPERF_H
#define SN_HWPERF_H
/*
* object structure. SN_HWPERF_ENUM_OBJECTS and SN_HWPERF_GET_CPU_INFO
* return an array of these. Do not change this without also
* changing the corresponding SAL code.
*/
#define SN_HWPERF_MAXSTRING 128
struct
sn_hwperf_object_info
{
u32
id
;
union
{
struct
{
u64
this_part
:
1
;
u64
is_shared
:
1
;
}
fields
;
struct
{
u64
flags
;
u64
reserved
;
}
b
;
}
f
;
char
name
[
SN_HWPERF_MAXSTRING
];
char
location
[
SN_HWPERF_MAXSTRING
];
u32
ports
;
};
#define sn_hwp_this_part f.fields.this_part
#define sn_hwp_is_shared f.fields.is_shared
#define sn_hwp_flags f.b.flags
#define SN_HWPERF_FOREIGN(x) (!(x)->sn_hwp_this_part && !(x)->sn_hwp_is_shared)
/* numa port structure, SN_HWPERF_ENUM_PORTS returns an array of these */
struct
sn_hwperf_port_info
{
u32
port
;
u32
conn_id
;
u32
conn_port
;
};
/* for HWPERF_{GET,SET}_MMRS */
struct
sn_hwperf_data
{
u64
addr
;
u64
data
;
};
/* user ioctl() argument, see below */
struct
sn_hwperf_ioctl_args
{
u64
arg
;
/* argument, usually an object id */
u64
sz
;
/* size of transfer */
void
*
ptr
;
/* pointer to source/target */
u32
v0
;
/* second return value */
};
/*
* For SN_HWPERF_{GET,SET}_MMRS and SN_HWPERF_OBJECT_DISTANCE,
* sn_hwperf_ioctl_args.arg can be used to specify a CPU on which
* to call SAL, and whether to use an interprocessor interrupt
* or task migration in order to do so. If the CPU specified is
* SN_HWPERF_ARG_ANY_CPU, then the current CPU will be used.
*/
#define SN_HWPERF_ARG_ANY_CPU 0x7fffffffUL
#define SN_HWPERF_ARG_CPU_MASK 0x7fffffff00000000ULL
#define SN_HWPERF_ARG_USE_IPI_MASK 0x8000000000000000ULL
#define SN_HWPERF_ARG_OBJID_MASK 0x00000000ffffffffULL
/*
* ioctl requests on the "sn_hwperf" misc device that call SAL.
*/
#define SN_HWPERF_OP_MEM_COPYIN 0x1000
#define SN_HWPERF_OP_MEM_COPYOUT 0x2000
#define SN_HWPERF_OP_MASK 0x0fff
/*
* Determine mem requirement.
* arg don't care
* sz 8
* p pointer to u64 integer
*/
#define SN_HWPERF_GET_HEAPSIZE 1
/*
* Install mem for SAL drvr
* arg don't care
* sz sizeof buffer pointed to by p
* p pointer to buffer for scratch area
*/
#define SN_HWPERF_INSTALL_HEAP 2
/*
* Determine number of objects
* arg don't care
* sz 8
* p pointer to u64 integer
*/
#define SN_HWPERF_OBJECT_COUNT (10|SN_HWPERF_OP_MEM_COPYOUT)
/*
* Determine object "distance", relative to a cpu. This operation can
* execute on a designated logical cpu number, using either an IPI or
* via task migration. If the cpu number is SN_HWPERF_ANY_CPU, then
* the current CPU is used. See the SN_HWPERF_ARG_* macros above.
*
* arg bitmap of IPI flag, cpu number and object id
* sz 8
* p pointer to u64 integer
*/
#define SN_HWPERF_OBJECT_DISTANCE (11|SN_HWPERF_OP_MEM_COPYOUT)
/*
* Enumerate objects. Special case if sz == 8, returns the required
* buffer size.
* arg don't care
* sz sizeof buffer pointed to by p
* p pointer to array of struct sn_hwperf_object_info
*/
#define SN_HWPERF_ENUM_OBJECTS (12|SN_HWPERF_OP_MEM_COPYOUT)
/*
* Enumerate NumaLink ports for an object. Special case if sz == 8,
* returns the required buffer size.
* arg object id
* sz sizeof buffer pointed to by p
* p pointer to array of struct sn_hwperf_port_info
*/
#define SN_HWPERF_ENUM_PORTS (13|SN_HWPERF_OP_MEM_COPYOUT)
/*
* SET/GET memory mapped registers. These operations can execute
* on a designated logical cpu number, using either an IPI or via
* task migration. If the cpu number is SN_HWPERF_ANY_CPU, then
* the current CPU is used. See the SN_HWPERF_ARG_* macros above.
*
* arg bitmap of ipi flag, cpu number and object id
* sz sizeof buffer pointed to by p
* p pointer to array of struct sn_hwperf_data
*/
#define SN_HWPERF_SET_MMRS (14|SN_HWPERF_OP_MEM_COPYIN)
#define SN_HWPERF_GET_MMRS (15|SN_HWPERF_OP_MEM_COPYOUT| \
SN_HWPERF_OP_MEM_COPYIN)
/*
* Lock a shared object
* arg object id
* sz don't care
* p don't care
*/
#define SN_HWPERF_ACQUIRE 16
/*
* Unlock a shared object
* arg object id
* sz don't care
* p don't care
*/
#define SN_HWPERF_RELEASE 17
/*
* Break a lock on a shared object
* arg object id
* sz don't care
* p don't care
*/
#define SN_HWPERF_FORCE_RELEASE 18
/*
* ioctl requests on "sn_hwperf" that do not call SAL
*/
/*
* get cpu info as an array of hwperf_object_info_t.
* id is logical CPU number, name is description, location
* is geoid (e.g. 001c04#1c). Special case if sz == 8,
* returns the required buffer size.
*
* arg don't care
* sz sizeof buffer pointed to by p
* p pointer to array of struct sn_hwperf_object_info
*/
#define SN_HWPERF_GET_CPU_INFO (100|SN_HWPERF_OP_MEM_COPYOUT)
/*
* Given an object id, return it's node number (aka cnode).
* arg object id
* sz 8
* p pointer to u64 integer
*/
#define SN_HWPERF_GET_OBJ_NODE (101|SN_HWPERF_OP_MEM_COPYOUT)
/*
* Given a node number (cnode), return it's nasid.
* arg ordinal node number (aka cnodeid)
* sz 8
* p pointer to u64 integer
*/
#define SN_HWPERF_GET_NODE_NASID (102|SN_HWPERF_OP_MEM_COPYOUT)
/* return codes */
#define SN_HWPERF_OP_OK 0
#define SN_HWPERF_OP_NOMEM 1
#define SN_HWPERF_OP_NO_PERM 2
#define SN_HWPERF_OP_IO_ERROR 3
#define SN_HWPERF_OP_BUSY 4
#define SN_HWPERF_OP_RECONFIGURE 253
#define SN_HWPERF_OP_INVAL 254
#endif
/* SN_HWPERF_H */
include/asm-ia64/sn/sn_sal.h
View file @
4f0fdda0
...
...
@@ -61,6 +61,7 @@
#define SN_SAL_SYSCTL_IOBRICK_PCI_OP 0x02000042 // reentrant
#define SN_SAL_IROUTER_OP 0x02000043
#define SN_SAL_HWPERF_OP 0x02000050 // lock
/*
* Service-specific constants
...
...
@@ -844,4 +845,21 @@ ia64_sn_irtr_init(nasid_t nasid, void *buf, int len)
return
(
int
)
rv
.
status
;
}
/*
* This is the access point to the Altix PROM hardware performance
* and status monitoring interface. For info on using this, see
* include/asm-ia64/sn/sn2/sn_hwperf.h
*/
static
inline
int
ia64_sn_hwperf_op
(
nasid_t
nasid
,
u64
opcode
,
u64
a0
,
u64
a1
,
u64
a2
,
u64
a3
,
u64
a4
,
int
*
v0
)
{
struct
ia64_sal_retval
rv
;
SAL_CALL_NOLOCK
(
rv
,
SN_SAL_HWPERF_OP
,
(
u64
)
nasid
,
opcode
,
a0
,
a1
,
a2
,
a3
,
a4
);
if
(
v0
)
*
v0
=
(
int
)
rv
.
v0
;
return
(
int
)
rv
.
status
;
}
#endif
/* _ASM_IA64_SN_SN_SAL_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment