Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
c7cd5b98
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看板
提交
c7cd5b98
编写于
4月 17, 2008
作者:
P
Paul Mackerras
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/olof/pasemi
上级
e92716f2
7132799b
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
46 addition
and
17 deletion
+46
-17
arch/powerpc/platforms/pasemi/iommu.c
arch/powerpc/platforms/pasemi/iommu.c
+9
-10
arch/powerpc/sysdev/mpic.c
arch/powerpc/sysdev/mpic.c
+4
-5
drivers/net/pasemi_mac.c
drivers/net/pasemi_mac.c
+33
-2
未找到文件。
arch/powerpc/platforms/pasemi/iommu.c
浏览文件 @
c7cd5b98
/*
/*
* Copyright (C) 2005-200
7
, PA Semi, Inc
* Copyright (C) 2005-200
8
, PA Semi, Inc
*
*
* Maintained by: Olof Johansson <olof@lixom.net>
* Maintained by: Olof Johansson <olof@lixom.net>
*
*
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
#include <asm/abs_addr.h>
#include <asm/abs_addr.h>
#include <asm/firmware.h>
#include <asm/firmware.h>
#define IOBMAP_PAGE_SHIFT 12
#define IOBMAP_PAGE_SHIFT 12
#define IOBMAP_PAGE_SIZE (1 << IOBMAP_PAGE_SHIFT)
#define IOBMAP_PAGE_SIZE (1 << IOBMAP_PAGE_SHIFT)
#define IOBMAP_PAGE_MASK (IOBMAP_PAGE_SIZE - 1)
#define IOBMAP_PAGE_MASK (IOBMAP_PAGE_SIZE - 1)
...
@@ -35,13 +34,13 @@
...
@@ -35,13 +34,13 @@
#define IOB_BASE 0xe0000000
#define IOB_BASE 0xe0000000
#define IOB_SIZE 0x3000
#define IOB_SIZE 0x3000
/* Configuration registers */
/* Configuration registers */
#define IOBCAP_REG 0x
1
0
#define IOBCAP_REG 0x
4
0
#define IOBCOM_REG 0x
4
0
#define IOBCOM_REG 0x
10
0
/* Enable IOB address translation */
/* Enable IOB address translation */
#define IOBCOM_ATEN 0x00000100
#define IOBCOM_ATEN 0x00000100
/* Address decode configuration register */
/* Address decode configuration register */
#define IOB_AD_REG 0x
53
#define IOB_AD_REG 0x
14c
/* IOBCOM_AD_REG fields */
/* IOBCOM_AD_REG fields */
#define IOB_AD_VGPRT 0x00000e00
#define IOB_AD_VGPRT 0x00000e00
#define IOB_AD_VGAEN 0x00000100
#define IOB_AD_VGAEN 0x00000100
...
@@ -56,13 +55,13 @@
...
@@ -56,13 +55,13 @@
#define IOB_AD_TRNG_2G 0x00000001
#define IOB_AD_TRNG_2G 0x00000001
#define IOB_AD_TRNG_128G 0x00000003
#define IOB_AD_TRNG_128G 0x00000003
#define IOB_TABLEBASE_REG 0x
55
#define IOB_TABLEBASE_REG 0x
154
/* Base of the 64 4-byte L1 registers */
/* Base of the 64 4-byte L1 registers */
#define IOB_XLT_L1_REGBASE 0x
ac
0
#define IOB_XLT_L1_REGBASE 0x
2b0
0
/* Register to invalidate TLB entries */
/* Register to invalidate TLB entries */
#define IOB_AT_INVAL_TLB_REG 0x
b4
0
#define IOB_AT_INVAL_TLB_REG 0x
2d0
0
/* The top two bits of the level 1 entry contains valid and type flags */
/* The top two bits of the level 1 entry contains valid and type flags */
#define IOBMAP_L1E_V 0x40000000
#define IOBMAP_L1E_V 0x40000000
...
@@ -76,7 +75,7 @@
...
@@ -76,7 +75,7 @@
#define IOBMAP_L2E_V 0x80000000
#define IOBMAP_L2E_V 0x80000000
#define IOBMAP_L2E_V_CACHED 0xc0000000
#define IOBMAP_L2E_V_CACHED 0xc0000000
static
u32
__iomem
*
iob
;
static
void
__iomem
*
iob
;
static
u32
iob_l1_emptyval
;
static
u32
iob_l1_emptyval
;
static
u32
iob_l2_emptyval
;
static
u32
iob_l2_emptyval
;
static
u32
*
iob_l2_base
;
static
u32
*
iob_l2_base
;
...
@@ -219,7 +218,7 @@ int __init iob_init(struct device_node *dn)
...
@@ -219,7 +218,7 @@ int __init iob_init(struct device_node *dn)
for
(
i
=
0
;
i
<
64
;
i
++
)
{
for
(
i
=
0
;
i
<
64
;
i
++
)
{
/* Each L1 covers 32MB, i.e. 8K entries = 32K of ram */
/* Each L1 covers 32MB, i.e. 8K entries = 32K of ram */
regword
=
IOBMAP_L1E_V
|
(
__pa
(
iob_l2_base
+
i
*
0x2000
)
>>
12
);
regword
=
IOBMAP_L1E_V
|
(
__pa
(
iob_l2_base
+
i
*
0x2000
)
>>
12
);
out_le32
(
iob
+
IOB_XLT_L1_REGBASE
+
i
,
regword
);
out_le32
(
iob
+
IOB_XLT_L1_REGBASE
+
i
*
4
,
regword
);
}
}
/* set 2GB translation window, based at 0 */
/* set 2GB translation window, based at 0 */
...
...
arch/powerpc/sysdev/mpic.c
浏览文件 @
c7cd5b98
...
@@ -1410,11 +1410,6 @@ void mpic_cpu_set_priority(int prio)
...
@@ -1410,11 +1410,6 @@ void mpic_cpu_set_priority(int prio)
mpic_cpu_write
(
MPIC_INFO
(
CPU_CURRENT_TASK_PRI
),
prio
);
mpic_cpu_write
(
MPIC_INFO
(
CPU_CURRENT_TASK_PRI
),
prio
);
}
}
/*
* XXX: someone who knows mpic should check this.
* do we need to eoi the ipi including for kexec cpu here (see xics comments)?
* or can we reset the mpic in the new kernel?
*/
void
mpic_teardown_this_cpu
(
int
secondary
)
void
mpic_teardown_this_cpu
(
int
secondary
)
{
{
struct
mpic
*
mpic
=
mpic_primary
;
struct
mpic
*
mpic
=
mpic_primary
;
...
@@ -1434,6 +1429,10 @@ void mpic_teardown_this_cpu(int secondary)
...
@@ -1434,6 +1429,10 @@ void mpic_teardown_this_cpu(int secondary)
/* Set current processor priority to max */
/* Set current processor priority to max */
mpic_cpu_write
(
MPIC_INFO
(
CPU_CURRENT_TASK_PRI
),
0xf
);
mpic_cpu_write
(
MPIC_INFO
(
CPU_CURRENT_TASK_PRI
),
0xf
);
/* We need to EOI the IPI since not all platforms reset the MPIC
* on boot and new interrupts wouldn't get delivered otherwise.
*/
mpic_eoi
(
mpic
);
spin_unlock_irqrestore
(
&
mpic_lock
,
flags
);
spin_unlock_irqrestore
(
&
mpic_lock
,
flags
);
}
}
...
...
drivers/net/pasemi_mac.c
浏览文件 @
c7cd5b98
...
@@ -404,6 +404,7 @@ static void pasemi_mac_free_csring(struct pasemi_mac_csring *csring)
...
@@ -404,6 +404,7 @@ static void pasemi_mac_free_csring(struct pasemi_mac_csring *csring)
pasemi_dma_free_flag
(
csring
->
events
[
1
]);
pasemi_dma_free_flag
(
csring
->
events
[
1
]);
pasemi_dma_free_ring
(
&
csring
->
chan
);
pasemi_dma_free_ring
(
&
csring
->
chan
);
pasemi_dma_free_chan
(
&
csring
->
chan
);
pasemi_dma_free_chan
(
&
csring
->
chan
);
pasemi_dma_free_fun
(
csring
->
fun
);
}
}
static
int
pasemi_mac_setup_rx_resources
(
const
struct
net_device
*
dev
)
static
int
pasemi_mac_setup_rx_resources
(
const
struct
net_device
*
dev
)
...
@@ -1150,7 +1151,10 @@ static int pasemi_mac_open(struct net_device *dev)
...
@@ -1150,7 +1151,10 @@ static int pasemi_mac_open(struct net_device *dev)
if
(
!
mac
->
tx
)
if
(
!
mac
->
tx
)
goto
out_tx_ring
;
goto
out_tx_ring
;
if
(
dev
->
mtu
>
1500
)
{
/* We might already have allocated rings in case mtu was changed
* before interface was brought up.
*/
if
(
dev
->
mtu
>
1500
&&
!
mac
->
num_cs
)
{
pasemi_mac_setup_csrings
(
mac
);
pasemi_mac_setup_csrings
(
mac
);
if
(
!
mac
->
num_cs
)
if
(
!
mac
->
num_cs
)
goto
out_tx_ring
;
goto
out_tx_ring
;
...
@@ -1388,8 +1392,12 @@ static int pasemi_mac_close(struct net_device *dev)
...
@@ -1388,8 +1392,12 @@ static int pasemi_mac_close(struct net_device *dev)
free_irq
(
mac
->
tx
->
chan
.
irq
,
mac
->
tx
);
free_irq
(
mac
->
tx
->
chan
.
irq
,
mac
->
tx
);
free_irq
(
mac
->
rx
->
chan
.
irq
,
mac
->
rx
);
free_irq
(
mac
->
rx
->
chan
.
irq
,
mac
->
rx
);
for
(
i
=
0
;
i
<
mac
->
num_cs
;
i
++
)
for
(
i
=
0
;
i
<
mac
->
num_cs
;
i
++
)
{
pasemi_mac_free_csring
(
mac
->
cs
[
i
]);
pasemi_mac_free_csring
(
mac
->
cs
[
i
]);
mac
->
cs
[
i
]
=
NULL
;
}
mac
->
num_cs
=
0
;
/* Free resources */
/* Free resources */
pasemi_mac_free_rx_resources
(
mac
);
pasemi_mac_free_rx_resources
(
mac
);
...
@@ -1640,6 +1648,26 @@ static int pasemi_mac_poll(struct napi_struct *napi, int budget)
...
@@ -1640,6 +1648,26 @@ static int pasemi_mac_poll(struct napi_struct *napi, int budget)
return
pkts
;
return
pkts
;
}
}
#ifdef CONFIG_NET_POLL_CONTROLLER
/*
* Polling 'interrupt' - used by things like netconsole to send skbs
* without having to re-enable interrupts. It's not called while
* the interrupt routine is executing.
*/
static
void
pasemi_mac_netpoll
(
struct
net_device
*
dev
)
{
const
struct
pasemi_mac
*
mac
=
netdev_priv
(
dev
);
disable_irq
(
mac
->
tx
->
chan
.
irq
);
pasemi_mac_tx_intr
(
mac
->
tx
->
chan
.
irq
,
mac
->
tx
);
enable_irq
(
mac
->
tx
->
chan
.
irq
);
disable_irq
(
mac
->
rx
->
chan
.
irq
);
pasemi_mac_rx_intr
(
mac
->
rx
->
chan
.
irq
,
mac
->
rx
);
enable_irq
(
mac
->
rx
->
chan
.
irq
);
}
#endif
static
int
pasemi_mac_change_mtu
(
struct
net_device
*
dev
,
int
new_mtu
)
static
int
pasemi_mac_change_mtu
(
struct
net_device
*
dev
,
int
new_mtu
)
{
{
struct
pasemi_mac
*
mac
=
netdev_priv
(
dev
);
struct
pasemi_mac
*
mac
=
netdev_priv
(
dev
);
...
@@ -1799,6 +1827,9 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
...
@@ -1799,6 +1827,9 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
dev
->
mtu
=
PE_DEF_MTU
;
dev
->
mtu
=
PE_DEF_MTU
;
/* 1500 MTU + ETH_HLEN + VLAN_HLEN + 2 64B cachelines */
/* 1500 MTU + ETH_HLEN + VLAN_HLEN + 2 64B cachelines */
mac
->
bufsz
=
dev
->
mtu
+
ETH_HLEN
+
ETH_FCS_LEN
+
LOCAL_SKB_ALIGN
+
128
;
mac
->
bufsz
=
dev
->
mtu
+
ETH_HLEN
+
ETH_FCS_LEN
+
LOCAL_SKB_ALIGN
+
128
;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev
->
poll_controller
=
pasemi_mac_netpoll
;
#endif
dev
->
change_mtu
=
pasemi_mac_change_mtu
;
dev
->
change_mtu
=
pasemi_mac_change_mtu
;
dev
->
ethtool_ops
=
&
pasemi_mac_ethtool_ops
;
dev
->
ethtool_ops
=
&
pasemi_mac_ethtool_ops
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录