Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
d67eb16f
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d67eb16f
编写于
9月 11, 2005
作者:
T
Tony Luck
浏览文件
操作
浏览文件
下载
差异文件
Pull sn-features into release branch
上级
c85b2a5f
a1cddb88
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
103 addition
and
20 deletion
+103
-20
arch/ia64/sn/kernel/setup.c
arch/ia64/sn/kernel/setup.c
+19
-11
include/asm-ia64/sn/sn_feature_sets.h
include/asm-ia64/sn/sn_feature_sets.h
+57
-0
include/asm-ia64/sn/sn_sal.h
include/asm-ia64/sn/sn_sal.h
+27
-9
未找到文件。
arch/ia64/sn/kernel/setup.c
浏览文件 @
d67eb16f
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
#include <asm/sn/clksupport.h>
#include <asm/sn/clksupport.h>
#include <asm/sn/sn_sal.h>
#include <asm/sn/sn_sal.h>
#include <asm/sn/geo.h>
#include <asm/sn/geo.h>
#include <asm/sn/sn_feature_sets.h>
#include "xtalk/xwidgetdev.h"
#include "xtalk/xwidgetdev.h"
#include "xtalk/hubdev.h"
#include "xtalk/hubdev.h"
#include <asm/sn/klconfig.h>
#include <asm/sn/klconfig.h>
...
@@ -97,6 +98,7 @@ EXPORT_SYMBOL(sn_region_size);
...
@@ -97,6 +98,7 @@ EXPORT_SYMBOL(sn_region_size);
int
sn_prom_type
;
/* 0=hardware, 1=medusa/realprom, 2=medusa/fakeprom */
int
sn_prom_type
;
/* 0=hardware, 1=medusa/realprom, 2=medusa/fakeprom */
short
physical_node_map
[
MAX_PHYSNODE_ID
];
short
physical_node_map
[
MAX_PHYSNODE_ID
];
static
unsigned
long
sn_prom_features
[
MAX_PROM_FEATURE_SETS
];
EXPORT_SYMBOL
(
physical_node_map
);
EXPORT_SYMBOL
(
physical_node_map
);
...
@@ -271,7 +273,10 @@ void __init sn_setup(char **cmdline_p)
...
@@ -271,7 +273,10 @@ void __init sn_setup(char **cmdline_p)
u32
version
=
sn_sal_rev
();
u32
version
=
sn_sal_rev
();
extern
void
sn_cpu_init
(
void
);
extern
void
sn_cpu_init
(
void
);
ia64_sn_plat_set_error_handling_features
();
ia64_sn_plat_set_error_handling_features
();
// obsolete
ia64_sn_set_os_feature
(
OSF_MCA_SLV_TO_OS_INIT_SLV
);
ia64_sn_set_os_feature
(
OSF_FEAT_LOG_SBES
);
#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE)
#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE)
/*
/*
...
@@ -314,16 +319,6 @@ void __init sn_setup(char **cmdline_p)
...
@@ -314,16 +319,6 @@ void __init sn_setup(char **cmdline_p)
printk
(
"SGI SAL version %x.%02x
\n
"
,
version
>>
8
,
version
&
0x00FF
);
printk
(
"SGI SAL version %x.%02x
\n
"
,
version
>>
8
,
version
&
0x00FF
);
/*
* Confirm the SAL we're running on is recent enough...
*/
if
(
version
<
SN_SAL_MIN_VERSION
)
{
printk
(
KERN_ERR
"This kernel needs SGI SAL version >= "
"%x.%02x
\n
"
,
SN_SAL_MIN_VERSION
>>
8
,
SN_SAL_MIN_VERSION
&
0x00FF
);
panic
(
"PROM version too old
\n
"
);
}
master_nasid
=
boot_get_nasid
();
master_nasid
=
boot_get_nasid
();
status
=
status
=
...
@@ -480,6 +475,10 @@ void __init sn_cpu_init(void)
...
@@ -480,6 +475,10 @@ void __init sn_cpu_init(void)
if
(
nodepdaindr
[
0
]
==
NULL
)
if
(
nodepdaindr
[
0
]
==
NULL
)
return
;
return
;
for
(
i
=
0
;
i
<
MAX_PROM_FEATURE_SETS
;
i
++
)
if
(
ia64_sn_get_prom_feature_set
(
i
,
&
sn_prom_features
[
i
])
!=
0
)
break
;
cpuid
=
smp_processor_id
();
cpuid
=
smp_processor_id
();
cpuphyid
=
get_sapicid
();
cpuphyid
=
get_sapicid
();
...
@@ -651,3 +650,12 @@ nasid_slice_to_cpuid(int nasid, int slice)
...
@@ -651,3 +650,12 @@ nasid_slice_to_cpuid(int nasid, int slice)
return
-
1
;
return
-
1
;
}
}
int
sn_prom_feature_available
(
int
id
)
{
if
(
id
>=
BITS_PER_LONG
*
MAX_PROM_FEATURE_SETS
)
return
0
;
return
test_bit
(
id
,
sn_prom_features
);
}
EXPORT_SYMBOL
(
sn_prom_feature_available
);
include/asm-ia64/sn/sn_feature_sets.h
0 → 100644
浏览文件 @
d67eb16f
#ifndef _ASM_IA64_SN_FEATURE_SETS_H
#define _ASM_IA64_SN_FEATURE_SETS_H
/*
* SN PROM Features
*
* 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) 2005 Silicon Graphics, Inc. All rights reserved.
*/
#include <asm/types.h>
#include <asm/bitops.h>
/* --------------------- PROM Features -----------------------------*/
extern
int
sn_prom_feature_available
(
int
id
);
#define MAX_PROM_FEATURE_SETS 2
/*
* The following defines features that may or may not be supported by the
* current PROM. The OS uses sn_prom_feature_available(feature) to test for
* the presence of a PROM feature. Down rev (old) PROMs will always test
* "false" for new features.
*
* Use:
* if (sn_prom_feature_available(PRF_FEATURE_XXX))
* ...
*/
/*
* Example: feature XXX
*/
#define PRF_FEATURE_XXX 0
/* --------------------- OS Features -------------------------------*/
/*
* The following defines OS features that are optionally present in
* the operating system.
* During boot, PROM is notified of these features via a series of calls:
*
* ia64_sn_set_os_feature(feature1);
*
* Once enabled, a feature cannot be disabled.
*
* By default, features are disabled unless explicitly enabled.
*/
#define OSF_MCA_SLV_TO_OS_INIT_SLV 0
#define OSF_FEAT_LOG_SBES 1
#endif
/* _ASM_IA64_SN_FEATURE_SETS_H */
include/asm-ia64/sn/sn_sal.h
浏览文件 @
d67eb16f
...
@@ -80,6 +80,9 @@
...
@@ -80,6 +80,9 @@
#define SN_SAL_RESERVED_DO_NOT_USE 0x02000062
#define SN_SAL_RESERVED_DO_NOT_USE 0x02000062
#define SN_SAL_IOIF_GET_PCI_TOPOLOGY 0x02000064
#define SN_SAL_IOIF_GET_PCI_TOPOLOGY 0x02000064
#define SN_SAL_GET_PROM_FEATURE_SET 0x02000065
#define SN_SAL_SET_OS_FEATURE_SET 0x02000066
/*
/*
* Service-specific constants
* Service-specific constants
*/
*/
...
@@ -118,8 +121,8 @@
...
@@ -118,8 +121,8 @@
/*
/*
* Error Handling Features
* Error Handling Features
*/
*/
#define SAL_ERR_FEAT_MCA_SLV_TO_OS_INIT_SLV 0x1
#define SAL_ERR_FEAT_MCA_SLV_TO_OS_INIT_SLV 0x1
// obsolete
#define SAL_ERR_FEAT_LOG_SBES 0x2
#define SAL_ERR_FEAT_LOG_SBES 0x2
// obsolete
#define SAL_ERR_FEAT_MFR_OVERRIDE 0x4
#define SAL_ERR_FEAT_MFR_OVERRIDE 0x4
#define SAL_ERR_FEAT_SBE_THRESHOLD 0xffff0000
#define SAL_ERR_FEAT_SBE_THRESHOLD 0xffff0000
...
@@ -151,12 +154,6 @@ sn_sal_rev(void)
...
@@ -151,12 +154,6 @@ sn_sal_rev(void)
return
(
u32
)(
systab
->
sal_b_rev_major
<<
8
|
systab
->
sal_b_rev_minor
);
return
(
u32
)(
systab
->
sal_b_rev_major
<<
8
|
systab
->
sal_b_rev_minor
);
}
}
/*
* Specify the minimum PROM revsion required for this kernel.
* Note that they're stored in hex format...
*/
#define SN_SAL_MIN_VERSION 0x0404
/*
/*
* Returns the master console nasid, if the call fails, return an illegal
* Returns the master console nasid, if the call fails, return an illegal
* value.
* value.
...
@@ -336,7 +333,7 @@ ia64_sn_plat_cpei_handler(void)
...
@@ -336,7 +333,7 @@ ia64_sn_plat_cpei_handler(void)
}
}
/*
/*
* Set Error Handling Features
* Set Error Handling Features
(Obsolete)
*/
*/
static
inline
u64
static
inline
u64
ia64_sn_plat_set_error_handling_features
(
void
)
ia64_sn_plat_set_error_handling_features
(
void
)
...
@@ -1052,4 +1049,25 @@ ia64_sn_is_fake_prom(void)
...
@@ -1052,4 +1049,25 @@ ia64_sn_is_fake_prom(void)
return
(
rv
.
status
==
0
);
return
(
rv
.
status
==
0
);
}
}
static
inline
int
ia64_sn_get_prom_feature_set
(
int
set
,
unsigned
long
*
feature_set
)
{
struct
ia64_sal_retval
rv
;
SAL_CALL_NOLOCK
(
rv
,
SN_SAL_GET_PROM_FEATURE_SET
,
set
,
0
,
0
,
0
,
0
,
0
,
0
);
if
(
rv
.
status
!=
0
)
return
rv
.
status
;
*
feature_set
=
rv
.
v0
;
return
0
;
}
static
inline
int
ia64_sn_set_os_feature
(
int
feature
)
{
struct
ia64_sal_retval
rv
;
SAL_CALL_NOLOCK
(
rv
,
SN_SAL_SET_OS_FEATURE_SET
,
feature
,
0
,
0
,
0
,
0
,
0
,
0
);
return
rv
.
status
;
}
#endif
/* _ASM_IA64_SN_SN_SAL_H */
#endif
/* _ASM_IA64_SN_SN_SAL_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录