* [PATCH 4/5] ehea: fix phyp checkpatch complaints
From: Doug Maxey @ 2008-01-29 6:50 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Jan-Bernd Themann
In-Reply-To: <1201589459-30598-1-git-send-email-dwm@austin.ibm.com>
Cc: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Doug Maxey <dwm@austin.ibm.com>
---
drivers/net/ehea/ehea_phyp.c | 158 +++++++++++++++++++++---------------------
drivers/net/ehea/ehea_phyp.h | 22 +++---
2 files changed, 90 insertions(+), 90 deletions(-)
diff --git a/drivers/net/ehea/ehea_phyp.c b/drivers/net/ehea/ehea_phyp.c
index 95c4a7f..156eb63 100644
--- a/drivers/net/ehea/ehea_phyp.c
+++ b/drivers/net/ehea/ehea_phyp.c
@@ -6,9 +6,9 @@
* (C) Copyright IBM Corp. 2006
*
* Authors:
- * Christoph Raisch <raisch@de.ibm.com>
- * Jan-Bernd Themann <themann@de.ibm.com>
- * Thomas Klein <tklein@de.ibm.com>
+ * Christoph Raisch <raisch@de.ibm.com>
+ * Jan-Bernd Themann <themann@de.ibm.com>
+ * Thomas Klein <tklein@de.ibm.com>
*
*
* This program is free software; you can redistribute it and/or modify
@@ -38,11 +38,11 @@ static inline u16 get_order_of_qentries(u16 queue_entries)
}
/* Defines for H_CALL H_ALLOC_RESOURCE */
-#define H_ALL_RES_TYPE_QP 1
-#define H_ALL_RES_TYPE_CQ 2
-#define H_ALL_RES_TYPE_EQ 3
-#define H_ALL_RES_TYPE_MR 5
-#define H_ALL_RES_TYPE_MW 6
+#define H_ALL_RES_TYPE_QP 1
+#define H_ALL_RES_TYPE_CQ 2
+#define H_ALL_RES_TYPE_EQ 3
+#define H_ALL_RES_TYPE_MR 5
+#define H_ALL_RES_TYPE_MW 6
static long ehea_plpar_hcall_norets(unsigned long opcode,
unsigned long arg1,
@@ -137,77 +137,77 @@ u64 ehea_h_query_ehea_qp(const u64 adapter_handle, const u8 qp_category,
const u64 qp_handle, const u64 sel_mask, void *cb_addr)
{
return ehea_plpar_hcall_norets(H_QUERY_HEA_QP,
- adapter_handle, /* R4 */
- qp_category, /* R5 */
- qp_handle, /* R6 */
- sel_mask, /* R7 */
+ adapter_handle, /* R4 */
+ qp_category, /* R5 */
+ qp_handle, /* R6 */
+ sel_mask, /* R7 */
virt_to_abs(cb_addr), /* R8 */
0, 0);
}
/* input param R5 */
-#define H_ALL_RES_QP_EQPO EHEA_BMASK_IBM(9, 11)
-#define H_ALL_RES_QP_QPP EHEA_BMASK_IBM(12, 12)
-#define H_ALL_RES_QP_RQR EHEA_BMASK_IBM(13, 15)
-#define H_ALL_RES_QP_EQEG EHEA_BMASK_IBM(16, 16)
-#define H_ALL_RES_QP_LL_QP EHEA_BMASK_IBM(17, 17)
-#define H_ALL_RES_QP_DMA128 EHEA_BMASK_IBM(19, 19)
-#define H_ALL_RES_QP_HSM EHEA_BMASK_IBM(20, 21)
-#define H_ALL_RES_QP_SIGT EHEA_BMASK_IBM(22, 23)
-#define H_ALL_RES_QP_TENURE EHEA_BMASK_IBM(48, 55)
-#define H_ALL_RES_QP_RES_TYP EHEA_BMASK_IBM(56, 63)
+#define H_ALL_RES_QP_EQPO EHEA_BMASK_IBM(9, 11)
+#define H_ALL_RES_QP_QPP EHEA_BMASK_IBM(12, 12)
+#define H_ALL_RES_QP_RQR EHEA_BMASK_IBM(13, 15)
+#define H_ALL_RES_QP_EQEG EHEA_BMASK_IBM(16, 16)
+#define H_ALL_RES_QP_LL_QP EHEA_BMASK_IBM(17, 17)
+#define H_ALL_RES_QP_DMA128 EHEA_BMASK_IBM(19, 19)
+#define H_ALL_RES_QP_HSM EHEA_BMASK_IBM(20, 21)
+#define H_ALL_RES_QP_SIGT EHEA_BMASK_IBM(22, 23)
+#define H_ALL_RES_QP_TENURE EHEA_BMASK_IBM(48, 55)
+#define H_ALL_RES_QP_RES_TYP EHEA_BMASK_IBM(56, 63)
/* input param R9 */
-#define H_ALL_RES_QP_TOKEN EHEA_BMASK_IBM(0, 31)
-#define H_ALL_RES_QP_PD EHEA_BMASK_IBM(32,63)
+#define H_ALL_RES_QP_TOKEN EHEA_BMASK_IBM(0, 31)
+#define H_ALL_RES_QP_PD EHEA_BMASK_IBM(32, 63)
/* input param R10 */
-#define H_ALL_RES_QP_MAX_SWQE EHEA_BMASK_IBM(4, 7)
-#define H_ALL_RES_QP_MAX_R1WQE EHEA_BMASK_IBM(12, 15)
-#define H_ALL_RES_QP_MAX_R2WQE EHEA_BMASK_IBM(20, 23)
-#define H_ALL_RES_QP_MAX_R3WQE EHEA_BMASK_IBM(28, 31)
+#define H_ALL_RES_QP_MAX_SWQE EHEA_BMASK_IBM(4, 7)
+#define H_ALL_RES_QP_MAX_R1WQE EHEA_BMASK_IBM(12, 15)
+#define H_ALL_RES_QP_MAX_R2WQE EHEA_BMASK_IBM(20, 23)
+#define H_ALL_RES_QP_MAX_R3WQE EHEA_BMASK_IBM(28, 31)
/* Max Send Scatter Gather Elements */
-#define H_ALL_RES_QP_MAX_SSGE EHEA_BMASK_IBM(37, 39)
-#define H_ALL_RES_QP_MAX_R1SGE EHEA_BMASK_IBM(45, 47)
+#define H_ALL_RES_QP_MAX_SSGE EHEA_BMASK_IBM(37, 39)
+#define H_ALL_RES_QP_MAX_R1SGE EHEA_BMASK_IBM(45, 47)
/* Max Receive SG Elements RQ1 */
-#define H_ALL_RES_QP_MAX_R2SGE EHEA_BMASK_IBM(53, 55)
-#define H_ALL_RES_QP_MAX_R3SGE EHEA_BMASK_IBM(61, 63)
+#define H_ALL_RES_QP_MAX_R2SGE EHEA_BMASK_IBM(53, 55)
+#define H_ALL_RES_QP_MAX_R3SGE EHEA_BMASK_IBM(61, 63)
/* input param R11 */
-#define H_ALL_RES_QP_SWQE_IDL EHEA_BMASK_IBM(0, 7)
+#define H_ALL_RES_QP_SWQE_IDL EHEA_BMASK_IBM(0, 7)
/* max swqe immediate data length */
-#define H_ALL_RES_QP_PORT_NUM EHEA_BMASK_IBM(48, 63)
+#define H_ALL_RES_QP_PORT_NUM EHEA_BMASK_IBM(48, 63)
/* input param R12 */
-#define H_ALL_RES_QP_TH_RQ2 EHEA_BMASK_IBM(0, 15)
+#define H_ALL_RES_QP_TH_RQ2 EHEA_BMASK_IBM(0, 15)
/* Threshold RQ2 */
-#define H_ALL_RES_QP_TH_RQ3 EHEA_BMASK_IBM(16, 31)
+#define H_ALL_RES_QP_TH_RQ3 EHEA_BMASK_IBM(16, 31)
/* Threshold RQ3 */
/* output param R6 */
-#define H_ALL_RES_QP_ACT_SWQE EHEA_BMASK_IBM(0, 15)
-#define H_ALL_RES_QP_ACT_R1WQE EHEA_BMASK_IBM(16, 31)
-#define H_ALL_RES_QP_ACT_R2WQE EHEA_BMASK_IBM(32, 47)
-#define H_ALL_RES_QP_ACT_R3WQE EHEA_BMASK_IBM(48, 63)
+#define H_ALL_RES_QP_ACT_SWQE EHEA_BMASK_IBM(0, 15)
+#define H_ALL_RES_QP_ACT_R1WQE EHEA_BMASK_IBM(16, 31)
+#define H_ALL_RES_QP_ACT_R2WQE EHEA_BMASK_IBM(32, 47)
+#define H_ALL_RES_QP_ACT_R3WQE EHEA_BMASK_IBM(48, 63)
/* output param, R7 */
-#define H_ALL_RES_QP_ACT_SSGE EHEA_BMASK_IBM(0, 7)
-#define H_ALL_RES_QP_ACT_R1SGE EHEA_BMASK_IBM(8, 15)
-#define H_ALL_RES_QP_ACT_R2SGE EHEA_BMASK_IBM(16, 23)
-#define H_ALL_RES_QP_ACT_R3SGE EHEA_BMASK_IBM(24, 31)
+#define H_ALL_RES_QP_ACT_SSGE EHEA_BMASK_IBM(0, 7)
+#define H_ALL_RES_QP_ACT_R1SGE EHEA_BMASK_IBM(8, 15)
+#define H_ALL_RES_QP_ACT_R2SGE EHEA_BMASK_IBM(16, 23)
+#define H_ALL_RES_QP_ACT_R3SGE EHEA_BMASK_IBM(24, 31)
#define H_ALL_RES_QP_ACT_SWQE_IDL EHEA_BMASK_IBM(32, 39)
/* output param R8,R9 */
-#define H_ALL_RES_QP_SIZE_SQ EHEA_BMASK_IBM(0, 31)
-#define H_ALL_RES_QP_SIZE_RQ1 EHEA_BMASK_IBM(32, 63)
-#define H_ALL_RES_QP_SIZE_RQ2 EHEA_BMASK_IBM(0, 31)
-#define H_ALL_RES_QP_SIZE_RQ3 EHEA_BMASK_IBM(32, 63)
+#define H_ALL_RES_QP_SIZE_SQ EHEA_BMASK_IBM(0, 31)
+#define H_ALL_RES_QP_SIZE_RQ1 EHEA_BMASK_IBM(32, 63)
+#define H_ALL_RES_QP_SIZE_RQ2 EHEA_BMASK_IBM(0, 31)
+#define H_ALL_RES_QP_SIZE_RQ3 EHEA_BMASK_IBM(32, 63)
/* output param R11,R12 */
-#define H_ALL_RES_QP_LIOBN_SQ EHEA_BMASK_IBM(0, 31)
-#define H_ALL_RES_QP_LIOBN_RQ1 EHEA_BMASK_IBM(32, 63)
-#define H_ALL_RES_QP_LIOBN_RQ2 EHEA_BMASK_IBM(0, 31)
-#define H_ALL_RES_QP_LIOBN_RQ3 EHEA_BMASK_IBM(32, 63)
+#define H_ALL_RES_QP_LIOBN_SQ EHEA_BMASK_IBM(0, 31)
+#define H_ALL_RES_QP_LIOBN_RQ1 EHEA_BMASK_IBM(32, 63)
+#define H_ALL_RES_QP_LIOBN_RQ2 EHEA_BMASK_IBM(0, 31)
+#define H_ALL_RES_QP_LIOBN_RQ3 EHEA_BMASK_IBM(32, 63)
u64 ehea_h_alloc_resource_qp(const u64 adapter_handle,
struct ehea_qp_init_attr *init_attr, const u32 pd,
@@ -334,28 +334,28 @@ u64 ehea_h_alloc_resource_cq(const u64 adapter_handle,
}
/* Defines for H_CALL H_ALLOC_RESOURCE */
-#define H_ALL_RES_TYPE_QP 1
-#define H_ALL_RES_TYPE_CQ 2
-#define H_ALL_RES_TYPE_EQ 3
-#define H_ALL_RES_TYPE_MR 5
-#define H_ALL_RES_TYPE_MW 6
+#define H_ALL_RES_TYPE_QP 1
+#define H_ALL_RES_TYPE_CQ 2
+#define H_ALL_RES_TYPE_EQ 3
+#define H_ALL_RES_TYPE_MR 5
+#define H_ALL_RES_TYPE_MW 6
/* input param R5 */
-#define H_ALL_RES_EQ_NEQ EHEA_BMASK_IBM(0, 0)
+#define H_ALL_RES_EQ_NEQ EHEA_BMASK_IBM(0, 0)
#define H_ALL_RES_EQ_NON_NEQ_ISN EHEA_BMASK_IBM(6, 7)
#define H_ALL_RES_EQ_INH_EQE_GEN EHEA_BMASK_IBM(16, 16)
-#define H_ALL_RES_EQ_RES_TYPE EHEA_BMASK_IBM(56, 63)
+#define H_ALL_RES_EQ_RES_TYPE EHEA_BMASK_IBM(56, 63)
/* input param R6 */
-#define H_ALL_RES_EQ_MAX_EQE EHEA_BMASK_IBM(32, 63)
+#define H_ALL_RES_EQ_MAX_EQE EHEA_BMASK_IBM(32, 63)
/* output param R6 */
-#define H_ALL_RES_EQ_LIOBN EHEA_BMASK_IBM(32, 63)
+#define H_ALL_RES_EQ_LIOBN EHEA_BMASK_IBM(32, 63)
/* output param R7 */
-#define H_ALL_RES_EQ_ACT_EQE EHEA_BMASK_IBM(32, 63)
+#define H_ALL_RES_EQ_ACT_EQE EHEA_BMASK_IBM(32, 63)
/* output param R8 */
-#define H_ALL_RES_EQ_ACT_PS EHEA_BMASK_IBM(32, 63)
+#define H_ALL_RES_EQ_ACT_PS EHEA_BMASK_IBM(32, 63)
/* output param R9 */
#define H_ALL_RES_EQ_ACT_EQ_IST_C EHEA_BMASK_IBM(30, 31)
@@ -453,12 +453,12 @@ u64 ehea_h_register_smr(const u64 adapter_handle, const u64 orig_mr_handle,
hret = ehea_plpar_hcall9(H_REGISTER_SMR,
outs,
- adapter_handle , /* R4 */
- orig_mr_handle, /* R5 */
- vaddr_in, /* R6 */
- (((u64)access_ctrl) << 32ULL), /* R7 */
- pd, /* R8 */
- 0, 0, 0, 0); /* R9-R12 */
+ adapter_handle , /* R4 */
+ orig_mr_handle, /* R5 */
+ vaddr_in, /* R6 */
+ (((u64)access_ctrl) << 32ULL), /* R7 */
+ pd, /* R8 */
+ 0, 0, 0, 0); /* R9-R12 */
mr->handle = outs[0];
mr->lkey = (u32)outs[2];
@@ -471,11 +471,11 @@ u64 ehea_h_disable_and_get_hea(const u64 adapter_handle, const u64 qp_handle)
u64 outs[PLPAR_HCALL9_BUFSIZE];
return ehea_plpar_hcall9(H_DISABLE_AND_GET_HEA,
- outs,
+ outs,
adapter_handle, /* R4 */
H_DISABLE_GET_EHEA_WQE_P, /* R5 */
qp_handle, /* R6 */
- 0, 0, 0, 0, 0, 0); /* R7-R12 */
+ 0, 0, 0, 0, 0, 0); /* R7-R12 */
}
u64 ehea_h_free_resource(const u64 adapter_handle, const u64 res_handle,
@@ -483,9 +483,9 @@ u64 ehea_h_free_resource(const u64 adapter_handle, const u64 res_handle,
{
return ehea_plpar_hcall_norets(H_FREE_RESOURCE,
adapter_handle, /* R4 */
- res_handle, /* R5 */
+ res_handle, /* R5 */
force_bit,
- 0, 0, 0, 0); /* R7-R10 */
+ 0, 0, 0, 0); /* R7-R10 */
}
u64 ehea_h_alloc_resource_mr(const u64 adapter_handle, const u64 vaddr,
@@ -493,13 +493,13 @@ u64 ehea_h_alloc_resource_mr(const u64 adapter_handle, const u64 vaddr,
const u32 pd, u64 *mr_handle, u32 *lkey)
{
u64 hret;
- u64 outs[PLPAR_HCALL9_BUFSIZE];
+ u64 outs[PLPAR_HCALL9_BUFSIZE];
hret = ehea_plpar_hcall9(H_ALLOC_HEA_RESOURCE,
outs,
adapter_handle, /* R4 */
5, /* R5 */
- vaddr, /* R6 */
+ vaddr, /* R6 */
length, /* R7 */
(((u64) access_ctrl) << 32ULL), /* R8 */
pd, /* R9 */
@@ -619,8 +619,8 @@ u64 ehea_h_error_data(const u64 adapter_handle, const u64 ressource_handle,
void *rblock)
{
return ehea_plpar_hcall_norets(H_ERROR_DATA,
- adapter_handle, /* R4 */
- ressource_handle, /* R5 */
- virt_to_abs(rblock), /* R6 */
- 0, 0, 0, 0); /* R7-R12 */
+ adapter_handle, /* R4 */
+ ressource_handle, /* R5 */
+ virt_to_abs(rblock), /* R6 */
+ 0, 0, 0, 0); /* R7-R12 */
}
diff --git a/drivers/net/ehea/ehea_phyp.h b/drivers/net/ehea/ehea_phyp.h
index faa191d..f3628c8 100644
--- a/drivers/net/ehea/ehea_phyp.h
+++ b/drivers/net/ehea/ehea_phyp.h
@@ -93,7 +93,7 @@ static inline void hcp_epas_ctor(struct h_epas *epas, u64 paddr_kernel,
static inline void hcp_epas_dtor(struct h_epas *epas)
{
if (epas->kernel.addr)
- iounmap((void __iomem*)((u64)epas->kernel.addr & PAGE_MASK));
+ iounmap((void __iomem *)((u64)epas->kernel.addr & PAGE_MASK));
epas->user.addr = 0;
epas->kernel.addr = 0;
@@ -388,23 +388,23 @@ u64 ehea_h_modify_ehea_qp(const u64 adapter_handle,
const u64 qp_handle,
const u64 sel_mask,
void *cb_addr,
- u64 * inv_attr_id,
- u64 * proc_mask, u16 * out_swr, u16 * out_rwr);
+ u64 *inv_attr_id,
+ u64 *proc_mask, u16 *out_swr, u16 *out_rwr);
u64 ehea_h_alloc_resource_eq(const u64 adapter_handle,
- struct ehea_eq_attr *eq_attr, u64 * eq_handle);
+ struct ehea_eq_attr *eq_attr, u64 *eq_handle);
u64 ehea_h_alloc_resource_cq(const u64 adapter_handle,
struct ehea_cq_attr *cq_attr,
- u64 * cq_handle, struct h_epas *epas);
+ u64 *cq_handle, struct h_epas *epas);
u64 ehea_h_alloc_resource_qp(const u64 adapter_handle,
struct ehea_qp_init_attr *init_attr,
const u32 pd,
- u64 * qp_handle, struct h_epas *h_epas);
+ u64 *qp_handle, struct h_epas *h_epas);
-#define H_REG_RPAGE_PAGE_SIZE EHEA_BMASK_IBM(48,55)
-#define H_REG_RPAGE_QT EHEA_BMASK_IBM(62,63)
+#define H_REG_RPAGE_PAGE_SIZE EHEA_BMASK_IBM(48, 55)
+#define H_REG_RPAGE_QT EHEA_BMASK_IBM(62, 63)
u64 ehea_h_register_rpage(const u64 adapter_handle,
const u8 pagesize,
@@ -426,7 +426,7 @@ u64 ehea_h_free_resource(const u64 adapter_handle, const u64 res_handle,
u64 ehea_h_alloc_resource_mr(const u64 adapter_handle, const u64 vaddr,
const u64 length, const u32 access_ctrl,
- const u32 pd, u64 * mr_handle, u32 * lkey);
+ const u32 pd, u64 *mr_handle, u32 *lkey);
u64 ehea_h_register_rpage_mr(const u64 adapter_handle, const u64 mr_handle,
const u8 pagesize, const u8 queue_type,
@@ -439,8 +439,8 @@ u64 ehea_h_register_smr(const u64 adapter_handle, const u64 orig_mr_handle,
u64 ehea_h_query_ehea(const u64 adapter_handle, void *cb_addr);
/* output param R5 */
-#define H_MEHEAPORT_CAT EHEA_BMASK_IBM(40,47)
-#define H_MEHEAPORT_PN EHEA_BMASK_IBM(48,63)
+#define H_MEHEAPORT_CAT EHEA_BMASK_IBM(40, 47)
+#define H_MEHEAPORT_PN EHEA_BMASK_IBM(48, 63)
u64 ehea_h_query_ehea_port(const u64 adapter_handle, const u16 port_num,
const u8 cb_cat, const u64 select_mask,
--
1.5.3.7
^ permalink raw reply related
* [PATCH 3/5] ehea: fix main checkpatch complaints
From: Doug Maxey @ 2008-01-29 6:50 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Jan-Bernd Themann
In-Reply-To: <1201589459-30598-1-git-send-email-dwm@austin.ibm.com>
Cc: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Doug Maxey <dwm@austin.ibm.com>
---
drivers/net/ehea/ehea_main.c | 87 ++++++++++++++++++++++--------------------
1 files changed, 46 insertions(+), 41 deletions(-)
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 869e160..99ea46a 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -6,9 +6,9 @@
* (C) Copyright IBM Corp. 2006
*
* Authors:
- * Christoph Raisch <raisch@de.ibm.com>
- * Jan-Bernd Themann <themann@de.ibm.com>
- * Thomas Klein <tklein@de.ibm.com>
+ * Christoph Raisch <raisch@de.ibm.com>
+ * Jan-Bernd Themann <themann@de.ibm.com>
+ * Thomas Klein <tklein@de.ibm.com>
*
*
* This program is free software; you can redistribute it and/or modify
@@ -54,11 +54,11 @@ static int rq1_entries = EHEA_DEF_ENTRIES_RQ1;
static int rq2_entries = EHEA_DEF_ENTRIES_RQ2;
static int rq3_entries = EHEA_DEF_ENTRIES_RQ3;
static int sq_entries = EHEA_DEF_ENTRIES_SQ;
-static int use_mcs = 0;
-static int use_lro = 0;
+static int use_mcs;
+static int use_lro;
static int lro_max_aggr = EHEA_LRO_MAX_AGGR;
static int num_tx_qps = EHEA_NUM_TX_QP;
-static int prop_carrier_state = 0;
+static int prop_carrier_state;
module_param(msg_level, int, 0);
module_param(rq1_entries, int, 0);
@@ -94,9 +94,9 @@ MODULE_PARM_DESC(lro_max_aggr, " LRO: Max packets to be aggregated. Default = "
MODULE_PARM_DESC(use_lro, " Large Receive Offload, 1: enable, 0: disable, "
"Default = 0");
-static int port_name_cnt = 0;
+static int port_name_cnt;
static LIST_HEAD(adapter_list);
-u64 ehea_driver_flags = 0;
+u64 ehea_driver_flags;
struct work_struct ehea_rereg_mr_task;
struct semaphore dlpar_mem_lock;
@@ -121,12 +121,13 @@ static struct of_platform_driver ehea_driver = {
.remove = ehea_remove,
};
-void ehea_dump(void *adr, int len, char *msg) {
+void ehea_dump(void *adr, int len, char *msg)
+{
int x;
unsigned char *deb = adr;
for (x = 0; x < len; x += 16) {
printk(DRV_NAME " %s adr=%p ofs=%04x %016lx %016lx\n", msg,
- deb, x, *((u64*)&deb[0]), *((u64*)&deb[8]));
+ deb, x, *((u64 *)&deb[0]), *((u64 *)&deb[8]));
deb += 16;
}
}
@@ -518,7 +519,8 @@ static int ehea_proc_rwqes(struct net_device *dev,
last_wqe_index = wqe_index;
rmb();
if (!ehea_check_cqe(cqe, &rq)) {
- if (rq == 1) { /* LL RQ1 */
+ if (rq == 1) {
+ /* LL RQ1 */
skb = get_skb_by_index_ll(skb_arr_rq1,
skb_arr_rq1_len,
wqe_index);
@@ -531,10 +533,11 @@ static int ehea_proc_rwqes(struct net_device *dev,
if (!skb)
break;
}
- skb_copy_to_linear_data(skb, ((char*)cqe) + 64,
+ skb_copy_to_linear_data(skb, ((char *)cqe) + 64,
cqe->num_bytes_transfered - 4);
ehea_fill_skb(dev, skb, cqe);
- } else if (rq == 2) { /* RQ2 */
+ } else if (rq == 2) {
+ /* RQ2 */
skb = get_skb_by_index(skb_arr_rq2,
skb_arr_rq2_len, cqe);
if (unlikely(!skb)) {
@@ -544,7 +547,8 @@ static int ehea_proc_rwqes(struct net_device *dev,
}
ehea_fill_skb(dev, skb, cqe);
processed_rq2++;
- } else { /* RQ3 */
+ } else {
+ /* RQ3 */
skb = get_skb_by_index(skb_arr_rq3,
skb_arr_rq3_len, cqe);
if (unlikely(!skb)) {
@@ -592,7 +596,7 @@ static struct ehea_cqe *ehea_proc_cqes(struct ehea_port_res *pr, int my_quota)
unsigned long flags;
cqe = ehea_poll_cq(send_cq);
- while(cqe && (quota > 0)) {
+ while (cqe && (quota > 0)) {
ehea_inc_cq(send_cq);
cqe_counter++;
@@ -643,7 +647,8 @@ static struct ehea_cqe *ehea_proc_cqes(struct ehea_port_res *pr, int my_quota)
static int ehea_poll(struct napi_struct *napi, int budget)
{
- struct ehea_port_res *pr = container_of(napi, struct ehea_port_res, napi);
+ struct ehea_port_res *pr = container_of(napi, struct ehea_port_res,
+ napi);
struct net_device *dev = pr->port->netdev;
struct ehea_cqe *cqe;
struct ehea_cqe *cqe_skb = NULL;
@@ -743,8 +748,9 @@ int ehea_sense_port_attr(struct ehea_port *port)
u64 hret;
struct hcp_ehea_port_cb0 *cb0;
- cb0 = kzalloc(PAGE_SIZE, GFP_ATOMIC); /* May be called via */
- if (!cb0) { /* ehea_neq_tasklet() */
+ /* may be called via ehea_neq_tasklet() */
+ cb0 = kzalloc(PAGE_SIZE, GFP_ATOMIC);
+ if (!cb0) {
ehea_error("no mem for cb0");
ret = -ENOMEM;
goto out;
@@ -762,7 +768,7 @@ int ehea_sense_port_attr(struct ehea_port *port)
/* MAC address */
port->mac_addr = cb0->port_mac_addr << 16;
- if (!is_valid_ether_addr((u8*)&port->mac_addr)) {
+ if (!is_valid_ether_addr((u8 *)&port->mac_addr)) {
ret = -EADDRNOTAVAIL;
goto out_free;
}
@@ -994,7 +1000,7 @@ static void ehea_parse_eqe(struct ehea_adapter *adapter, u64 eqe)
static void ehea_neq_tasklet(unsigned long data)
{
- struct ehea_adapter *adapter = (struct ehea_adapter*)data;
+ struct ehea_adapter *adapter = (struct ehea_adapter *)data;
struct ehea_eqe *eqe;
u64 event_mask;
@@ -1204,7 +1210,7 @@ int ehea_rem_smrs(struct ehea_port_res *pr)
static int ehea_init_q_skba(struct ehea_q_skb_arr *q_skba, int max_q_entries)
{
- int arr_size = sizeof(void*) * max_q_entries;
+ int arr_size = sizeof(void *) * max_q_entries;
q_skba->arr = vmalloc(arr_size);
if (!q_skba->arr)
@@ -1489,7 +1495,7 @@ static inline void write_swqe2_data(struct sk_buff *skb, struct net_device *dev,
nfrags = skb_shinfo(skb)->nr_frags;
sg1entry = &swqe->u.immdata_desc.sg_entry;
- sg_list = (struct ehea_vsgentry*)&swqe->u.immdata_desc.sg_list;
+ sg_list = (struct ehea_vsgentry *)&swqe->u.immdata_desc.sg_list;
swqe->descriptors = 0;
sg1entry_contains_frag_data = 0;
@@ -1542,7 +1548,7 @@ static int ehea_broadcast_reg_helper(struct ehea_port *port, u32 hcallid)
reg_type, port->mac_addr, 0, hcallid);
if (hret != H_SUCCESS) {
ehea_error("%sregistering bc address failed (tagged)",
- hcallid == H_REG_BCMC ? "" : "de");
+ hcallid == H_REG_BCMC ? "" : "de");
ret = -EIO;
goto out_herr;
}
@@ -1732,7 +1738,7 @@ static void ehea_allmulti(struct net_device *dev, int enable)
}
}
-static void ehea_add_multicast_entry(struct ehea_port* port, u8* mc_mac_addr)
+static void ehea_add_multicast_entry(struct ehea_port *port, u8 *mc_mac_addr)
{
struct ehea_mc_list *ehea_mcl_entry;
u64 hret;
@@ -1791,11 +1797,10 @@ static void ehea_set_multicast_list(struct net_device *dev)
goto out;
}
- for (i = 0, k_mcl_entry = dev->mc_list;
- i < dev->mc_count;
- i++, k_mcl_entry = k_mcl_entry->next) {
+ for (i = 0, k_mcl_entry = dev->mc_list; i < dev->mc_count; i++,
+ k_mcl_entry = k_mcl_entry->next)
ehea_add_multicast_entry(port, k_mcl_entry->dmi_addr);
- }
+
}
out:
return;
@@ -1925,12 +1930,12 @@ static inline int ehea_hash_skb(struct sk_buff *skb, int num_qps)
if ((skb->protocol == htons(ETH_P_IP)) &&
(ip_hdr(skb)->protocol == IPPROTO_TCP)) {
- tcp = (struct tcphdr*)(skb_network_header(skb) + (ip_hdr(skb)->ihl * 4));
+ tcp = (struct tcphdr *)(skb_network_header(skb) +
+ (ip_hdr(skb)->ihl * 4));
tmp = (tcp->source + (tcp->dest << 16)) % 31;
tmp += ip_hdr(skb)->daddr % 31;
return tmp % num_qps;
- }
- else
+ } else
return 0;
}
@@ -2122,7 +2127,7 @@ int ehea_activate_qp(struct ehea_adapter *adapter, struct ehea_qp *qp)
u64 hret;
u16 dummy16 = 0;
u64 dummy64 = 0;
- struct hcp_modify_qp_cb0* cb0;
+ struct hcp_modify_qp_cb0 *cb0;
cb0 = kzalloc(PAGE_SIZE, GFP_KERNEL);
if (!cb0) {
@@ -2248,7 +2253,7 @@ static int ehea_clean_all_portres(struct ehea_port *port)
int ret = 0;
int i;
- for(i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++)
+ for (i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++)
ret |= ehea_clean_portres(port, &port->port_res[i]);
ret |= ehea_destroy_eq(port->qp_eq);
@@ -2300,7 +2305,7 @@ static int ehea_up(struct net_device *dev)
goto out_clean_pr;
}
- for(i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++) {
+ for (i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++) {
ret = ehea_activate_qp(port->adapter, port->port_res[i].qp);
if (ret) {
ehea_error("activate_qp failed");
@@ -2308,7 +2313,7 @@ static int ehea_up(struct net_device *dev)
}
}
- for(i = 0; i < port->num_def_qps; i++) {
+ for (i = 0; i < port->num_def_qps; i++) {
ret = ehea_fill_port_res(&port->port_res[i]);
if (ret) {
ehea_error("out_free_irqs");
@@ -2425,7 +2430,7 @@ int ehea_stop_qps(struct net_device *dev)
{
struct ehea_port *port = netdev_priv(dev);
struct ehea_adapter *adapter = port->adapter;
- struct hcp_modify_qp_cb0* cb0;
+ struct hcp_modify_qp_cb0 *cb0;
int ret = -EIO;
int dret;
int i;
@@ -2490,7 +2495,7 @@ out:
return ret;
}
-void ehea_update_rqs(struct ehea_qp *orig_qp, struct ehea_port_res * pr)
+void ehea_update_rqs(struct ehea_qp *orig_qp, struct ehea_port_res *pr)
{
struct ehea_qp qp = *orig_qp;
struct ehea_qp_init_attr *init_attr = &qp.init_attr;
@@ -2530,7 +2535,7 @@ int ehea_restart_qps(struct net_device *dev)
int ret = 0;
int i;
- struct hcp_modify_qp_cb0* cb0;
+ struct hcp_modify_qp_cb0 *cb0;
u64 hret;
u64 dummy64 = 0;
u16 dummy16 = 0;
@@ -3109,7 +3114,7 @@ static ssize_t ehea_probe_port(struct device *dev,
of_node_put(eth_dn);
if (port) {
- for (i=0; i < EHEA_MAX_PORTS; i++)
+ for (i = 0; i < EHEA_MAX_PORTS; i++)
if (!adapter->port[i]) {
adapter->port[i] = port;
break;
@@ -3144,7 +3149,7 @@ static ssize_t ehea_remove_port(struct device *dev,
ehea_shutdown_single_port(port);
- for (i=0; i < EHEA_MAX_PORTS; i++)
+ for (i = 0; i < EHEA_MAX_PORTS; i++)
if (adapter->port[i] == port) {
adapter->port[i] = NULL;
break;
@@ -3313,7 +3318,7 @@ static int ehea_reboot_notifier(struct notifier_block *nb,
}
static struct notifier_block ehea_reboot_nb = {
- .notifier_call = ehea_reboot_notifier,
+ .notifier_call = ehea_reboot_notifier,
};
static int check_module_parm(void)
--
1.5.3.7
^ permalink raw reply related
* [PATCH 5/5] ehea: fix qmr checkpatch complaints
From: Doug Maxey @ 2008-01-29 6:50 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Jan-Bernd Themann
In-Reply-To: <1201589459-30598-1-git-send-email-dwm@austin.ibm.com>
Cc: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Doug Maxey <dwm@austin.ibm.com>
---
drivers/net/ehea/ehea_qmr.c | 32 ++++++++++++++++----------------
drivers/net/ehea/ehea_qmr.h | 16 ++++++++--------
2 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c
index 83b7643..d522e90 100644
--- a/drivers/net/ehea/ehea_qmr.c
+++ b/drivers/net/ehea/ehea_qmr.c
@@ -33,8 +33,6 @@
struct ehea_busmap ehea_bmap = { 0, 0, NULL };
-extern u64 ehea_driver_flags;
-extern struct work_struct ehea_rereg_mr_task;
static void *hw_qpageit_get_inc(struct hw_queue *queue)
@@ -65,7 +63,7 @@ static int hw_queue_ctor(struct hw_queue *queue, const u32 nr_of_pages,
}
queue->queue_length = nr_of_pages * pagesize;
- queue->queue_pages = kmalloc(nr_of_pages * sizeof(void*), GFP_KERNEL);
+ queue->queue_pages = kmalloc(nr_of_pages * sizeof(void *), GFP_KERNEL);
if (!queue->queue_pages) {
ehea_error("no mem for queue_pages");
return -ENOMEM;
@@ -78,11 +76,11 @@ static int hw_queue_ctor(struct hw_queue *queue, const u32 nr_of_pages,
*/
i = 0;
while (i < nr_of_pages) {
- u8 *kpage = (u8*)get_zeroed_page(GFP_KERNEL);
+ u8 *kpage = (u8 *)get_zeroed_page(GFP_KERNEL);
if (!kpage)
goto out_nomem;
for (k = 0; k < pages_per_kpage && i < nr_of_pages; k++) {
- (queue->queue_pages)[i] = (struct ehea_page*)kpage;
+ (queue->queue_pages)[i] = (struct ehea_page *)kpage;
kpage += pagesize;
i++;
}
@@ -235,8 +233,8 @@ int ehea_destroy_cq(struct ehea_cq *cq)
return 0;
hcp_epas_dtor(&cq->epas);
-
- if ((hret = ehea_destroy_cq_res(cq, NORMAL_FREE)) == H_R_STATE) {
+ hret = ehea_destroy_cq_res(cq, NORMAL_FREE);
+ if (hret == H_R_STATE) {
ehea_error_data(cq->adapter, cq->fw_handle);
hret = ehea_destroy_cq_res(cq, FORCE_FREE);
}
@@ -301,13 +299,13 @@ struct ehea_eq *ehea_create_eq(struct ehea_adapter *adapter,
if (i == (eq->attr.nr_pages - 1)) {
/* last page */
vpage = hw_qpageit_get_inc(&eq->hw_queue);
- if ((hret != H_SUCCESS) || (vpage)) {
+ if ((hret != H_SUCCESS) || (vpage))
goto out_kill_hwq;
- }
+
} else {
- if ((hret != H_PAGE_REGISTERED) || (!vpage)) {
+ if ((hret != H_PAGE_REGISTERED) || (!vpage))
goto out_kill_hwq;
- }
+
}
}
@@ -331,7 +329,7 @@ struct ehea_eqe *ehea_poll_eq(struct ehea_eq *eq)
unsigned long flags;
spin_lock_irqsave(&eq->spinlock, flags);
- eqe = (struct ehea_eqe*)hw_eqit_eq_get_inc_valid(&eq->hw_queue);
+ eqe = (struct ehea_eqe *)hw_eqit_eq_get_inc_valid(&eq->hw_queue);
spin_unlock_irqrestore(&eq->spinlock, flags);
return eqe;
@@ -364,7 +362,8 @@ int ehea_destroy_eq(struct ehea_eq *eq)
hcp_epas_dtor(&eq->epas);
- if ((hret = ehea_destroy_eq_res(eq, NORMAL_FREE)) == H_R_STATE) {
+ hret = ehea_destroy_eq_res(eq, NORMAL_FREE);
+ if (hret == H_R_STATE) {
ehea_error_data(eq->adapter, eq->fw_handle);
hret = ehea_destroy_eq_res(eq, FORCE_FREE);
}
@@ -546,7 +545,8 @@ int ehea_destroy_qp(struct ehea_qp *qp)
hcp_epas_dtor(&qp->epas);
- if ((hret = ehea_destroy_qp_res(qp, NORMAL_FREE)) == H_R_STATE) {
+ hret = ehea_destroy_qp_res(qp, NORMAL_FREE);
+ if (hret == H_R_STATE) {
ehea_error_data(qp->adapter, qp->fw_handle);
hret = ehea_destroy_qp_res(qp, FORCE_FREE);
}
@@ -559,7 +559,7 @@ int ehea_destroy_qp(struct ehea_qp *qp)
return 0;
}
-int ehea_create_busmap( void )
+int ehea_create_busmap(void)
{
u64 vaddr = EHEA_BUSMAP_START;
unsigned long high_section_index = 0;
@@ -595,7 +595,7 @@ int ehea_create_busmap( void )
return 0;
}
-void ehea_destroy_busmap( void )
+void ehea_destroy_busmap(void)
{
vfree(ehea_bmap.vaddr);
}
diff --git a/drivers/net/ehea/ehea_qmr.h b/drivers/net/ehea/ehea_qmr.h
index bc62d38..0bb6f92 100644
--- a/drivers/net/ehea/ehea_qmr.h
+++ b/drivers/net/ehea/ehea_qmr.h
@@ -41,8 +41,8 @@
#define EHEA_SECTSIZE (1UL << 24)
#define EHEA_PAGES_PER_SECTION (EHEA_SECTSIZE >> EHEA_PAGESHIFT)
-#if (1UL << SECTION_SIZE_BITS) < EHEA_SECTSIZE
-#error eHEA module can't work if kernel sectionsize < ehea sectionsize
+#if ((1UL << SECTION_SIZE_BITS) < EHEA_SECTSIZE)
+#error eHEA module cannot work if kernel sectionsize < ehea sectionsize
#endif
/* Some abbreviations used here:
@@ -188,8 +188,8 @@ struct ehea_eqe {
u64 entry;
};
-#define ERROR_DATA_LENGTH EHEA_BMASK_IBM(52,63)
-#define ERROR_DATA_TYPE EHEA_BMASK_IBM(0,7)
+#define ERROR_DATA_LENGTH EHEA_BMASK_IBM(52, 63)
+#define ERROR_DATA_TYPE EHEA_BMASK_IBM(0, 7)
static inline void *hw_qeit_calc(struct hw_queue *queue, u64 q_offset)
{
@@ -279,7 +279,7 @@ static inline void *hw_qeit_eq_get_inc(struct hw_queue *queue)
static inline void *hw_eqit_eq_get_inc_valid(struct hw_queue *queue)
{
void *retvalue = hw_qeit_get(queue);
- u32 qe = *(u8*)retvalue;
+ u32 qe = *(u8 *)retvalue;
if ((qe >> 7) == (queue->toggle_state & 1))
hw_qeit_eq_get_inc(queue);
else
@@ -364,7 +364,7 @@ struct ehea_cq *ehea_create_cq(struct ehea_adapter *adapter, int cqe,
int ehea_destroy_cq(struct ehea_cq *cq);
-struct ehea_qp *ehea_create_qp(struct ehea_adapter * adapter, u32 pd,
+struct ehea_qp *ehea_create_qp(struct ehea_adapter *adapter, u32 pd,
struct ehea_qp_init_attr *init_attr);
int ehea_destroy_qp(struct ehea_qp *qp);
@@ -378,8 +378,8 @@ int ehea_rem_mr(struct ehea_mr *mr);
void ehea_error_data(struct ehea_adapter *adapter, u64 res_handle);
-int ehea_create_busmap( void );
-void ehea_destroy_busmap( void );
+int ehea_create_busmap(void);
+void ehea_destroy_busmap(void);
u64 ehea_map_vaddr(void *caddr);
#endif /* __EHEA_QMR_H__ */
--
1.5.3.7
^ permalink raw reply related
* [PATCH 1/5] ehea: fix ehea.h checkpatch complaints
From: Doug Maxey @ 2008-01-29 6:50 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Jan-Bernd Themann
In-Reply-To: <1201589459-30598-1-git-send-email-dwm@austin.ibm.com>
Cc: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Doug Maxey <dwm@austin.ibm.com>
---
drivers/net/ehea/ehea.h | 3 +++
drivers/net/ehea/ehea_hw.h | 8 ++++----
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h
index 5f82a46..88fb53e 100644
--- a/drivers/net/ehea/ehea.h
+++ b/drivers/net/ehea/ehea.h
@@ -458,4 +458,7 @@ void ehea_set_ethtool_ops(struct net_device *netdev);
int ehea_sense_port_attr(struct ehea_port *port);
int ehea_set_portspeed(struct ehea_port *port, u32 port_speed);
+extern u64 ehea_driver_flags;
+extern struct work_struct ehea_rereg_mr_task;
+
#endif /* __EHEA_H__ */
diff --git a/drivers/net/ehea/ehea_hw.h b/drivers/net/ehea/ehea_hw.h
index 1af7ca4..567981b 100644
--- a/drivers/net/ehea/ehea_hw.h
+++ b/drivers/net/ehea/ehea_hw.h
@@ -29,10 +29,10 @@
#ifndef __EHEA_HW_H__
#define __EHEA_HW_H__
-#define QPX_SQA_VALUE EHEA_BMASK_IBM(48,63)
-#define QPX_RQ1A_VALUE EHEA_BMASK_IBM(48,63)
-#define QPX_RQ2A_VALUE EHEA_BMASK_IBM(48,63)
-#define QPX_RQ3A_VALUE EHEA_BMASK_IBM(48,63)
+#define QPX_SQA_VALUE EHEA_BMASK_IBM(48, 63)
+#define QPX_RQ1A_VALUE EHEA_BMASK_IBM(48, 63)
+#define QPX_RQ2A_VALUE EHEA_BMASK_IBM(48, 63)
+#define QPX_RQ3A_VALUE EHEA_BMASK_IBM(48, 63)
#define QPTEMM_OFFSET(x) offsetof(struct ehea_qptemm, x)
--
1.5.3.7
^ permalink raw reply related
* [PATCH 2/5] ehea: fix ethtool checkpatch complaints
From: Doug Maxey @ 2008-01-29 6:50 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Jan-Bernd Themann
In-Reply-To: <1201589459-30598-1-git-send-email-dwm@austin.ibm.com>
Cc: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Doug Maxey <dwm@austin.ibm.com>
---
drivers/net/ehea/ehea_ethtool.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ehea/ehea_ethtool.c b/drivers/net/ehea/ehea_ethtool.c
index 679f40e..d768852 100644
--- a/drivers/net/ehea/ehea_ethtool.c
+++ b/drivers/net/ehea/ehea_ethtool.c
@@ -40,7 +40,7 @@ static int ehea_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
return ret;
if (netif_carrier_ok(dev)) {
- switch(port->port_speed) {
+ switch (port->port_speed) {
case EHEA_SPEED_10M: cmd->speed = SPEED_10; break;
case EHEA_SPEED_100M: cmd->speed = SPEED_100; break;
case EHEA_SPEED_1G: cmd->speed = SPEED_1000; break;
@@ -78,7 +78,7 @@ static int ehea_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
goto doit;
}
- switch(cmd->speed) {
+ switch (cmd->speed) {
case SPEED_10:
if (cmd->duplex == DUPLEX_FULL)
sp = H_SPEED_10M_F;
--
1.5.3.7
^ permalink raw reply related
* [PATCH 0/5] ehea: fixups for checkpatch
From: Doug Maxey @ 2008-01-29 6:50 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Jan-Bernd Themann
A set of fixups that silences checkpatch.
++doug
---
drivers/net/ehea/ehea.h | 3 +
drivers/net/ehea/ehea_ethtool.c | 4 +-
drivers/net/ehea/ehea_hw.h | 8 +-
drivers/net/ehea/ehea_main.c | 87 +++++++++++----------
drivers/net/ehea/ehea_phyp.c | 158 +++++++++++++++++++-------------------
drivers/net/ehea/ehea_phyp.h | 22 +++---
drivers/net/ehea/ehea_qmr.c | 32 ++++----
drivers/net/ehea/ehea_qmr.h | 16 ++--
8 files changed, 169 insertions(+), 161 deletions(-)
^ permalink raw reply
* Re: [PATCH] [POWERPC] 85xx: some minor cleanups for stx_gp3 and tqm85xx
From: Kumar Gala @ 2008-01-29 6:24 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev
In-Reply-To: <20080129054708.GB6422@localhost.localdomain>
On Jan 28, 2008, at 11:47 PM, David Gibson wrote:
> On Fri, Jan 25, 2008 at 10:39:38AM -0600, Kumar Gala wrote:
>> * "simple-bus" covers all our needs for of_platform_bus_probe()
>> * make device tree name just 'soc' not 'soc85..'
>
> Getting rid of the device_type="soc" would be nice, too...
Agreed, but one thing at a time. We need to define a compat that is
the equivalent of what we are using SoC for today. (simple-bus + the
range property details on chip registers) If we can come up with
something compat name that is defined as such that I'm all for remoing
device_type=soc.
- k
^ permalink raw reply
* Re: [-mm PATCH] updates for hotplug memory remove
From: Yasunori Goto @ 2008-01-29 5:18 UTC (permalink / raw)
To: Badari Pulavarty; +Cc: linux-mm, Andrew Morton, linuxppc-dev
In-Reply-To: <1201566946.29357.18.camel@dyn9047017100.beaverton.ibm.com>
Hello. Badari-san.
Is your patch for notification the event of removing to firmware, right?
Have you ever tested hotadd(probe) of the removed memory?
I'm afraid there are some differences of the status between pre hot-add
section and the removed section by this patch. I think the mem_section of
removed memory should be invalidated at least.
But anyway, this is a great first step for physical memory remove.
Thanks.
> On Mon, 2008-01-28 at 16:31 -0800, Badari Pulavarty wrote:
>
>
> > 2) Can you replace the following patch with this ?
> >
> > add-remove_memory-for-ppc64-2.patch
> >
> > I found that, I do need arch-specific hooks to get the memory remove
> > working on ppc64 LPAR. Earlier, I tried to make remove_memory() arch
> > neutral, but we do need arch specific hooks.
> >
> > Thanks,
> > Badari
>
> Andrew,
>
> Here is the patch which provides arch-specific code to complete memory
> remove on ppc64 LPAR. So far, it works fine in my testing - but waiting
> for ppc-experts for review and completeness.
>
> FYI.
>
> Thanks,
> Badari
>
> For memory remove, we need to clean up htab mappings for the
> section of the memory we are removing.
>
> This patch implements support for removing htab bolted mappings
> for ppc64 lpar. Other sub-archs, may need to implement similar
> functionality for the hotplug memory remove to work.
>
> Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
> ---
> arch/powerpc/mm/hash_utils_64.c | 23 +++++++++++++++++++++++
> arch/powerpc/mm/mem.c | 4 +++-
> arch/powerpc/platforms/pseries/lpar.c | 15 +++++++++++++++
> include/asm-powerpc/machdep.h | 2 ++
> include/asm-powerpc/sparsemem.h | 1 +
> 5 files changed, 44 insertions(+), 1 deletion(-)
>
> Index: linux-2.6.24-rc8/arch/powerpc/mm/hash_utils_64.c
> ===================================================================
> --- linux-2.6.24-rc8.orig/arch/powerpc/mm/hash_utils_64.c 2008-01-25 08:04:32.000000000 -0800
> +++ linux-2.6.24-rc8/arch/powerpc/mm/hash_utils_64.c 2008-01-28 11:45:40.000000000 -0800
> @@ -191,6 +191,24 @@ int htab_bolt_mapping(unsigned long vsta
> return ret < 0 ? ret : 0;
> }
>
> +static void htab_remove_mapping(unsigned long vstart, unsigned long vend,
> + int psize, int ssize)
> +{
> + unsigned long vaddr;
> + unsigned int step, shift;
> +
> + shift = mmu_psize_defs[psize].shift;
> + step = 1 << shift;
> +
> + if (!ppc_md.hpte_removebolted) {
> + printk("Sub-arch doesn't implement hpte_removebolted\n");
> + return;
> + }
> +
> + for (vaddr = vstart; vaddr < vend; vaddr += step)
> + ppc_md.hpte_removebolted(vaddr, psize, ssize);
> +}
> +
> static int __init htab_dt_scan_seg_sizes(unsigned long node,
> const char *uname, int depth,
> void *data)
> @@ -436,6 +454,11 @@ void create_section_mapping(unsigned lon
> _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX,
> mmu_linear_psize, mmu_kernel_ssize));
> }
> +
> +void remove_section_mapping(unsigned long start, unsigned long end)
> +{
> + htab_remove_mapping(start, end, mmu_linear_psize, mmu_kernel_ssize);
> +}
> #endif /* CONFIG_MEMORY_HOTPLUG */
>
> static inline void make_bl(unsigned int *insn_addr, void *func)
> Index: linux-2.6.24-rc8/include/asm-powerpc/sparsemem.h
> ===================================================================
> --- linux-2.6.24-rc8.orig/include/asm-powerpc/sparsemem.h 2008-01-15 20:22:48.000000000 -0800
> +++ linux-2.6.24-rc8/include/asm-powerpc/sparsemem.h 2008-01-25 08:18:11.000000000 -0800
> @@ -20,6 +20,7 @@
>
> #ifdef CONFIG_MEMORY_HOTPLUG
> extern void create_section_mapping(unsigned long start, unsigned long end);
> +extern void remove_section_mapping(unsigned long start, unsigned long end);
> #ifdef CONFIG_NUMA
> extern int hot_add_scn_to_nid(unsigned long scn_addr);
> #else
> Index: linux-2.6.24-rc8/arch/powerpc/mm/mem.c
> ===================================================================
> --- linux-2.6.24-rc8.orig/arch/powerpc/mm/mem.c 2008-01-25 08:16:37.000000000 -0800
> +++ linux-2.6.24-rc8/arch/powerpc/mm/mem.c 2008-01-25 08:20:33.000000000 -0800
> @@ -156,7 +156,9 @@ int remove_memory(u64 start, u64 size)
> ret = offline_pages(start_pfn, end_pfn, 120 * HZ);
> if (ret)
> goto out;
> - /* Arch-specific calls go here - next patch */
> +
> + start = (unsigned long)__va(start);
> + remove_section_mapping(start, start + size);
> out:
> return ret;
> }
> Index: linux-2.6.24-rc8/arch/powerpc/platforms/pseries/lpar.c
> ===================================================================
> --- linux-2.6.24-rc8.orig/arch/powerpc/platforms/pseries/lpar.c 2008-01-15 20:22:48.000000000 -0800
> +++ linux-2.6.24-rc8/arch/powerpc/platforms/pseries/lpar.c 2008-01-28 14:10:58.000000000 -0800
> @@ -520,6 +520,20 @@ static void pSeries_lpar_hpte_invalidate
> BUG_ON(lpar_rc != H_SUCCESS);
> }
>
> +static void pSeries_lpar_hpte_removebolted(unsigned long ea,
> + int psize, int ssize)
> +{
> + unsigned long slot, vsid, va;
> +
> + vsid = get_kernel_vsid(ea, ssize);
> + va = hpt_va(ea, vsid, ssize);
> +
> + slot = pSeries_lpar_hpte_find(va, psize, ssize);
> + BUG_ON(slot == -1);
> +
> + pSeries_lpar_hpte_invalidate(slot, va, psize, ssize, 0);
> +}
> +
> /* Flag bits for H_BULK_REMOVE */
> #define HBR_REQUEST 0x4000000000000000UL
> #define HBR_RESPONSE 0x8000000000000000UL
> @@ -597,6 +611,7 @@ void __init hpte_init_lpar(void)
> ppc_md.hpte_updateboltedpp = pSeries_lpar_hpte_updateboltedpp;
> ppc_md.hpte_insert = pSeries_lpar_hpte_insert;
> ppc_md.hpte_remove = pSeries_lpar_hpte_remove;
> + ppc_md.hpte_removebolted = pSeries_lpar_hpte_removebolted;
> ppc_md.flush_hash_range = pSeries_lpar_flush_hash_range;
> ppc_md.hpte_clear_all = pSeries_lpar_hptab_clear;
> }
> Index: linux-2.6.24-rc8/include/asm-powerpc/machdep.h
> ===================================================================
> --- linux-2.6.24-rc8.orig/include/asm-powerpc/machdep.h 2008-01-25 08:04:41.000000000 -0800
> +++ linux-2.6.24-rc8/include/asm-powerpc/machdep.h 2008-01-28 11:45:17.000000000 -0800
> @@ -68,6 +68,8 @@ struct machdep_calls {
> unsigned long vflags,
> int psize, int ssize);
> long (*hpte_remove)(unsigned long hpte_group);
> + void (*hpte_removebolted)(unsigned long ea,
> + int psize, int ssize);
> void (*flush_hash_range)(unsigned long number, int local);
>
> /* special for kexec, to be called in real mode, linar mapping is
>
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
--
Yasunori Goto
^ permalink raw reply
* Re: [PATCH] [POWERPC] 85xx: some minor cleanups for stx_gp3 and tqm85xx
From: David Gibson @ 2008-01-29 5:47 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <Pine.LNX.4.64.0801251039220.17501@blarg.am.freescale.net>
On Fri, Jan 25, 2008 at 10:39:38AM -0600, Kumar Gala wrote:
> * "simple-bus" covers all our needs for of_platform_bus_probe()
> * make device tree name just 'soc' not 'soc85..'
Getting rid of the device_type="soc" would be nice, too...
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCHv3 2.6.25] i2c: adds support for i2c bus on Freescale CPM1/CPM2 controllers
From: Scott Wood @ 2008-01-28 16:49 UTC (permalink / raw)
To: Jochen Friedrich
Cc: Jean Delvare, linuxppc-dev list, Kernel, Linux, Linux I2C
In-Reply-To: <479A185D.6010406@scram.de>
On Fri, Jan 25, 2008 at 06:11:57PM +0100, Jochen Friedrich wrote:
> diff --git a/arch/powerpc/boot/dts/mpc866ads.dts b/arch/powerpc/boot/dts/mpc866ads.dts
> index daf9433..80c08bf 100644
> --- a/arch/powerpc/boot/dts/mpc866ads.dts
> +++ b/arch/powerpc/boot/dts/mpc866ads.dts
> @@ -169,6 +169,16 @@
> fsl,cpm-command = <0000>;
> linux,network-index = <1>;
> };
> +
> + i2c@860 {
> + compatible = "fsl,mpc866-i2c",
> + "fsl,cpm1-i2c",
> + "fsl,cpm-i2c";
> + reg = <860 20 3c80 30>;
> + interrupts = <10 3>;
> + interrupt-parent = <&Cpm_pic>;
The label is &CPM_PIC in the current mpc866ads.dts.
-Scott
^ permalink raw reply
* Re: [PATCH 0/9] 83xx DTS fixes and v1 conversions
From: Paul Gortmaker @ 2008-01-28 16:46 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <54AD0075-E36B-4A95-BFD9-C750E590513F@kernel.crashing.org>
Kumar Gala wrote:
>
> On Jan 28, 2008, at 9:51 AM, Paul Gortmaker wrote:
>
>> Kumar Gala wrote:
>>> On Mon, 28 Jan 2008, Paul Gortmaker wrote:
>>>
>>>
>>>> This series incorporates my earlier qe/muram fix before converting
>>>> the existing mpc83xx DTS files to v1 format. I've also redone the
>>>> mpc834x_mds with the IRQs as decimal as per Kumar's comments and
>>>> re-included that too. I've kept each board as a separate commit
>>>> in case one of them conflicts with what someone else is working on.
>>>>
>>>> Boards covered are: 8349mds, 8349mitx, 8349mitx-gp, 836x_mds,
>>>> 8323_mds, 8323_rdb, and the 8313_rdb. Plus a small tweak to the
>>>> sbc8349 (it was already v1 -- but IRQs were in hex.)
>>>>
>>>> I've fed all the files to DTC before and after to ensure the
>>>> output is the same after the conversion.
>>>>
>>>> I'm not aware of any explicit rules for what is hex vs decimal.
>>>> I've tried to keep things that are usually discussed in decimal
>>>> as decimal quantities (i.e. cache size, IRQ, counts, indicies)
>>>> and all other data that you'd normally expect in hex (addresses,
>>>> IRQ flags, masks) as hex -- including prefixing 0x on values from
>>>> zero to 10 where it tends to make rows of numbers (e.g. ranges)
>>>> align for better readability, even though it isn't required.
>>>>
>>>>
>>>
>>> Can you regen these patches (2..9) againast my latest tree. Also, a
>>> single patch that cleans up all the boards is sufficient.
>>>
>>
>> The patches should be current to your tree still as of today; they
>> are based on:
>>
>> f09f415ea23272ae68f9322f90246680d46f4868 not-for-merge
>> branch 'for-2.6.25' of
>> git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc
>>
>> My patch #1 with all four qe/muram boards was posted earlier here:
>>
>> http://ozlabs.org/pipermail/linuxppc-dev/2008-January/050767.html
>>
>> Let me know what you need them based against and I can respin
>> as required.
>
> I've pushed out a bunch of stuff today.
>
> commit 390167efa329d11099957108fc23d1ad15c3f37e
>
> I'm expect a respin since the patches don't currently apply to my tree.
OK - no problem, I've pulled todays updates; I'll rebase and resend.
P.
>
> - k
>
^ permalink raw reply
* Re: Preferred GIT URL for arch/powerpc, and BINUTILS
From: Josh Boyer @ 2008-01-29 1:48 UTC (permalink / raw)
To: Steve Heflin; +Cc: linuxppc-embedded
In-Reply-To: <20080128194352.206f3ead@zod.rchland.ibm.com>
On Mon, 28 Jan 2008 19:43:52 -0600
Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
> On Mon, 28 Jan 2008 17:46:47 -0500
> Steve Heflin <sheflin@newagemicro.com> wrote:
>
> > At 02:30 PM 1/28/2008, Steve Heflin wrote:
> > >Josh, you're a life saver!! Your GIT tree is exactly what I've been
> > >looking for. I have an AMCC440EPx based product that makes heavy use
> > >of all the devices embedded in the microcontroller. I'll be able to
> > >give that platform a very good testing.
> > >
> > >Now can you help me with BINUTILS? What version do you use and can
> > >you point me to a decent GIT tree for it? I tried to use version
> > >2.18 and the build blows up because it tries to "strip" a script file
> > >"embedspu".
> >
> > Whoa! I spoke too soon. Upon attempting a "make menuconfig" on the
> > 2.6.24-rc8 which I cloned from your git tree, I don't even SEE the
> > powerpc architecture appearing! What's up?
>
> I dunno. I never use make menuconfig. I typically do:
>
> make ARCH=powerpc sequoia_defconfig
>
> or something similar if I'm cross-building from x86. Otherwise if I'm
> on the G5, it's just:
>
> make sequoia_defconfig
Oh, and that's on the for-2.6.25 branch of my tree. I'll update the
master soon-ish to match the powerpc git tree.
josh
^ permalink raw reply
* Re: Preferred GIT URL for arch/powerpc, and BINUTILS
From: Josh Boyer @ 2008-01-29 1:43 UTC (permalink / raw)
To: Steve Heflin; +Cc: linuxppc-embedded
In-Reply-To: <20080128224710.9C1C4DDEE1@ozlabs.org>
On Mon, 28 Jan 2008 17:46:47 -0500
Steve Heflin <sheflin@newagemicro.com> wrote:
> At 02:30 PM 1/28/2008, Steve Heflin wrote:
> >Josh, you're a life saver!! Your GIT tree is exactly what I've been
> >looking for. I have an AMCC440EPx based product that makes heavy use
> >of all the devices embedded in the microcontroller. I'll be able to
> >give that platform a very good testing.
> >
> >Now can you help me with BINUTILS? What version do you use and can
> >you point me to a decent GIT tree for it? I tried to use version
> >2.18 and the build blows up because it tries to "strip" a script file
> >"embedspu".
>
> Whoa! I spoke too soon. Upon attempting a "make menuconfig" on the
> 2.6.24-rc8 which I cloned from your git tree, I don't even SEE the
> powerpc architecture appearing! What's up?
I dunno. I never use make menuconfig. I typically do:
make ARCH=powerpc sequoia_defconfig
or something similar if I'm cross-building from x86. Otherwise if I'm
on the G5, it's just:
make sequoia_defconfig
josh
^ permalink raw reply
* Re: [PATCH 5/5] [POWERPC] fsl_soc, legacy_serial: add support for "soc" compatible matching
From: Scott Wood @ 2008-01-25 19:03 UTC (permalink / raw)
To: avorontsov; +Cc: linuxppc-dev list, Yoder Stuart
In-Reply-To: <20080125185341.GA13450@localhost.localdomain>
Anton Vorontsov wrote:
> $ grep qe@ arch/powerpc/boot/dts/*
> arch/powerpc/boot/dts/mpc832x_mds.dts: qe@e0100000 {
> arch/powerpc/boot/dts/mpc832x_rdb.dts: qe@e0100000 {
> arch/powerpc/boot/dts/mpc836x_mds.dts: qe@e0100000 {
> arch/powerpc/boot/dts/mpc8568mds.dts: qe@e0080000 {
>
> ^^^ if the practice is wrong, then we should fix it, and then
> -immr would be the good name indeed (just as I've said previously).
It's wrong, and we should fix it. It would make sense if the QE block
were relocatable separately from IMMR (but even if it were, the QE
compatible should be fsl,xxxx-qe or similar, so no conflict with
fsl,xxxx-immr) -- but it isn't, at least on the 8323 and 8360 (I don't
have an 8568 manual handy).
-Scott
^ permalink raw reply
* Re: [PATCH UCC TDM 3/3 ] Modified Documentation to explain dtsentries for TDM driver
From: Scott Wood @ 2008-01-25 18:13 UTC (permalink / raw)
To: Aggrwal Poonam
Cc: Barkowski Michael, netdev, Gala Kumar, linux-kernel, rubini,
linuxppc-dev, Kalra Ashish, Cutler Richard, akpm, Tabi Timur
In-Reply-To: <FBA61160C48B8D438F3323FEFB4EF2C279AFF5@zin33exm24.fsl.freescale.net>
Aggrwal Poonam wrote:
> The device tree already has a brg-frequency property in qe node which
> is the value of BRGCLK.
Yes, I'm saying it belongs as brg/clock-frequency. :-)
CPM1/2 already do this.
-Scott
^ permalink raw reply
* Re: [-mm PATCH] updates for hotplug memory remove
From: Badari Pulavarty @ 2008-01-29 0:35 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-mm, linuxppc-dev
In-Reply-To: <1201566682.29357.15.camel@dyn9047017100.beaverton.ibm.com>
On Mon, 2008-01-28 at 16:31 -0800, Badari Pulavarty wrote:
> 2) Can you replace the following patch with this ?
>
> add-remove_memory-for-ppc64-2.patch
>
> I found that, I do need arch-specific hooks to get the memory remove
> working on ppc64 LPAR. Earlier, I tried to make remove_memory() arch
> neutral, but we do need arch specific hooks.
>
> Thanks,
> Badari
Andrew,
Here is the patch which provides arch-specific code to complete memory
remove on ppc64 LPAR. So far, it works fine in my testing - but waiting
for ppc-experts for review and completeness.
FYI.
Thanks,
Badari
For memory remove, we need to clean up htab mappings for the
section of the memory we are removing.
This patch implements support for removing htab bolted mappings
for ppc64 lpar. Other sub-archs, may need to implement similar
functionality for the hotplug memory remove to work.
Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
---
arch/powerpc/mm/hash_utils_64.c | 23 +++++++++++++++++++++++
arch/powerpc/mm/mem.c | 4 +++-
arch/powerpc/platforms/pseries/lpar.c | 15 +++++++++++++++
include/asm-powerpc/machdep.h | 2 ++
include/asm-powerpc/sparsemem.h | 1 +
5 files changed, 44 insertions(+), 1 deletion(-)
Index: linux-2.6.24-rc8/arch/powerpc/mm/hash_utils_64.c
===================================================================
--- linux-2.6.24-rc8.orig/arch/powerpc/mm/hash_utils_64.c 2008-01-25 08:04:32.000000000 -0800
+++ linux-2.6.24-rc8/arch/powerpc/mm/hash_utils_64.c 2008-01-28 11:45:40.000000000 -0800
@@ -191,6 +191,24 @@ int htab_bolt_mapping(unsigned long vsta
return ret < 0 ? ret : 0;
}
+static void htab_remove_mapping(unsigned long vstart, unsigned long vend,
+ int psize, int ssize)
+{
+ unsigned long vaddr;
+ unsigned int step, shift;
+
+ shift = mmu_psize_defs[psize].shift;
+ step = 1 << shift;
+
+ if (!ppc_md.hpte_removebolted) {
+ printk("Sub-arch doesn't implement hpte_removebolted\n");
+ return;
+ }
+
+ for (vaddr = vstart; vaddr < vend; vaddr += step)
+ ppc_md.hpte_removebolted(vaddr, psize, ssize);
+}
+
static int __init htab_dt_scan_seg_sizes(unsigned long node,
const char *uname, int depth,
void *data)
@@ -436,6 +454,11 @@ void create_section_mapping(unsigned lon
_PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX,
mmu_linear_psize, mmu_kernel_ssize));
}
+
+void remove_section_mapping(unsigned long start, unsigned long end)
+{
+ htab_remove_mapping(start, end, mmu_linear_psize, mmu_kernel_ssize);
+}
#endif /* CONFIG_MEMORY_HOTPLUG */
static inline void make_bl(unsigned int *insn_addr, void *func)
Index: linux-2.6.24-rc8/include/asm-powerpc/sparsemem.h
===================================================================
--- linux-2.6.24-rc8.orig/include/asm-powerpc/sparsemem.h 2008-01-15 20:22:48.000000000 -0800
+++ linux-2.6.24-rc8/include/asm-powerpc/sparsemem.h 2008-01-25 08:18:11.000000000 -0800
@@ -20,6 +20,7 @@
#ifdef CONFIG_MEMORY_HOTPLUG
extern void create_section_mapping(unsigned long start, unsigned long end);
+extern void remove_section_mapping(unsigned long start, unsigned long end);
#ifdef CONFIG_NUMA
extern int hot_add_scn_to_nid(unsigned long scn_addr);
#else
Index: linux-2.6.24-rc8/arch/powerpc/mm/mem.c
===================================================================
--- linux-2.6.24-rc8.orig/arch/powerpc/mm/mem.c 2008-01-25 08:16:37.000000000 -0800
+++ linux-2.6.24-rc8/arch/powerpc/mm/mem.c 2008-01-25 08:20:33.000000000 -0800
@@ -156,7 +156,9 @@ int remove_memory(u64 start, u64 size)
ret = offline_pages(start_pfn, end_pfn, 120 * HZ);
if (ret)
goto out;
- /* Arch-specific calls go here - next patch */
+
+ start = (unsigned long)__va(start);
+ remove_section_mapping(start, start + size);
out:
return ret;
}
Index: linux-2.6.24-rc8/arch/powerpc/platforms/pseries/lpar.c
===================================================================
--- linux-2.6.24-rc8.orig/arch/powerpc/platforms/pseries/lpar.c 2008-01-15 20:22:48.000000000 -0800
+++ linux-2.6.24-rc8/arch/powerpc/platforms/pseries/lpar.c 2008-01-28 14:10:58.000000000 -0800
@@ -520,6 +520,20 @@ static void pSeries_lpar_hpte_invalidate
BUG_ON(lpar_rc != H_SUCCESS);
}
+static void pSeries_lpar_hpte_removebolted(unsigned long ea,
+ int psize, int ssize)
+{
+ unsigned long slot, vsid, va;
+
+ vsid = get_kernel_vsid(ea, ssize);
+ va = hpt_va(ea, vsid, ssize);
+
+ slot = pSeries_lpar_hpte_find(va, psize, ssize);
+ BUG_ON(slot == -1);
+
+ pSeries_lpar_hpte_invalidate(slot, va, psize, ssize, 0);
+}
+
/* Flag bits for H_BULK_REMOVE */
#define HBR_REQUEST 0x4000000000000000UL
#define HBR_RESPONSE 0x8000000000000000UL
@@ -597,6 +611,7 @@ void __init hpte_init_lpar(void)
ppc_md.hpte_updateboltedpp = pSeries_lpar_hpte_updateboltedpp;
ppc_md.hpte_insert = pSeries_lpar_hpte_insert;
ppc_md.hpte_remove = pSeries_lpar_hpte_remove;
+ ppc_md.hpte_removebolted = pSeries_lpar_hpte_removebolted;
ppc_md.flush_hash_range = pSeries_lpar_flush_hash_range;
ppc_md.hpte_clear_all = pSeries_lpar_hptab_clear;
}
Index: linux-2.6.24-rc8/include/asm-powerpc/machdep.h
===================================================================
--- linux-2.6.24-rc8.orig/include/asm-powerpc/machdep.h 2008-01-25 08:04:41.000000000 -0800
+++ linux-2.6.24-rc8/include/asm-powerpc/machdep.h 2008-01-28 11:45:17.000000000 -0800
@@ -68,6 +68,8 @@ struct machdep_calls {
unsigned long vflags,
int psize, int ssize);
long (*hpte_remove)(unsigned long hpte_group);
+ void (*hpte_removebolted)(unsigned long ea,
+ int psize, int ssize);
void (*flush_hash_range)(unsigned long number, int local);
/* special for kexec, to be called in real mode, linar mapping is
^ permalink raw reply
* Re: [PATCH 4/9] enable FSL SATA driver config for Freescale SoCs
From: Kim Phillips @ 2008-01-25 17:38 UTC (permalink / raw)
To: Kumar Gala; +Cc: linux-ide, linuxppc-dev, jgarzik, Jerry Huang
In-Reply-To: <089EA00D-8EAB-417D-9A4B-FA500D23FF8D@kernel.crashing.org>
On Fri, 25 Jan 2008 10:04:08 -0600
Kumar Gala <galak@kernel.crashing.org> wrote:
>
> On Jan 24, 2008, at 8:46 PM, Kim Phillips wrote:
>
> > The mpc8315 shares the same SATA controller as the mpc837x,
> > and likelihood is that future SoCs from Freescale will also.
> >
> > Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
> > Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
> > ---
> > Kumar, let me know if you want me to post this to the ata list (I'm
> > assuming it's not necessary).
>
> It is necessary so they are aware. CC jgarizk, but we'll take it via
> powerpc.
>
> - k
>
ok, cc'ing Jeff, linux-ide here:
From: Kim Phillips <kim.phillips@freescale.com>
Date: Thu, 24 Jan 2008 01:49:24 -0600
Subject: [PATCH] enable FSL SATA driver config for Freescale SoCs
The mpc8315 shares the same SATA controller as the mpc837x,
and likelihood is that future SoCs from Freescale will also.
Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
---
drivers/ata/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 64b4964..75939dd 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -184,7 +184,7 @@ config PATA_ACPI
config SATA_FSL
tristate "Freescale 3.0Gbps SATA support"
- depends on PPC_MPC837x
+ depends on FSL_SOC
help
This option enables support for Freescale 3.0Gbps SATA controller.
It can be found on MPC837x and MPC8315.
--
1.5.2.2
^ permalink raw reply related
* [-mm PATCH] updates for hotplug memory remove
From: Badari Pulavarty @ 2008-01-29 0:31 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-mm, pbadari, linuxppc-dev
Hi Andrew,
Here are the updates for hotplug memory remove code currently in -mm.
1) Please don't push this patch to mainline (for the merge window).
memory-hotplug-add-removable-to-sysfs-to-show-memblock-removability.patch
I didn't find this consistently useful - even though memory is marked
removable, I found cases where I can't move it. When we get it right,
we can push it at that time. Please leave this in -mm.
2) Can you replace the following patch with this ?
add-remove_memory-for-ppc64-2.patch
I found that, I do need arch-specific hooks to get the memory remove
working on ppc64 LPAR. Earlier, I tried to make remove_memory() arch
neutral, but we do need arch specific hooks.
Thanks,
Badari
Supply ppc64 remove_memory() function. Arch specific is still
being reviewed by Paul Mackerras.
From: Badari Pulavarty <pbadari@us.ibm.com>
---
arch/powerpc/mm/mem.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
Index: linux-2.6.24-rc8/arch/powerpc/mm/mem.c
===================================================================
--- linux-2.6.24-rc8.orig/arch/powerpc/mm/mem.c 2008-01-25 08:04:32.000000000 -0800
+++ linux-2.6.24-rc8/arch/powerpc/mm/mem.c 2008-01-25 08:16:37.000000000 -0800
@@ -145,6 +145,22 @@ walk_memory_resource(unsigned long start
return (*func)(start_pfn, nr_pages, arg);
}
+#ifdef CONFIG_MEMORY_HOTREMOVE
+int remove_memory(u64 start, u64 size)
+{
+ unsigned long start_pfn, end_pfn;
+ int ret;
+
+ start_pfn = start >> PAGE_SHIFT;
+ end_pfn = start_pfn + (size >> PAGE_SHIFT);
+ ret = offline_pages(start_pfn, end_pfn, 120 * HZ);
+ if (ret)
+ goto out;
+ /* Arch-specific calls go here - next patch */
+out:
+ return ret;
+}
+#endif /* CONFIG_MEMORY_HOTREMOVE */
#endif /* CONFIG_MEMORY_HOTPLUG */
void show_mem(void)
^ permalink raw reply
* Re: [PATCH] [NET]: Remove PowerPC code from fec.c
From: Greg Ungerer @ 2008-01-28 23:58 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-m68k, uClinux list, Kernel, Linux, linuxppc-dev list,
netdev@vger.kernel.org, Scott Wood, Garzik, Jeff
In-Reply-To: <Pine.LNX.4.64.0801251544480.13060@anakin>
> ---------- Forwarded message ----------
> Date: Fri, 25 Jan 2008 15:33:45 +0100
> From: Jochen Friedrich <jochen@scram.de>
> To: "Garzik, Jeff" <jgarzik@pobox.com>
> Cc: Vitaly Bordug <vitb@kernel.crashing.org>,
> Scott Wood <scottwood@freescale.com>,
> Kumar Gala <galak@kernel.crashing.org>,
> Geert Uytterhoeven <geert@linux-m68k.org>,
> "Kernel, Linux" <linux-kernel@vger.kernel.org>,
> "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
> linuxppc-dev list <linuxppc-dev@ozlabs.org>,
linux-m68k@vger.kernel.org
> Subject: [PATCH] [NET]: Remove PowerPC code from fec.c
>
> fec.c is only used on M68k Coldfire CPUs. Remove leftover
> PowerPC code from this driver.
I was always hoping that this driver would be supported on both
architectures. After all the underlying eth device is essentially
the same on both.
Anyway... I don't have a problem with this patch, looks ok
the me.
Acked-by: Greg Ungerer <gerg@uclinux.org>
Regards
Greg
> Signed-off-by: Jochen Friedrich <jochen@scram.de>
> ---
> drivers/net/fec.c | 136
+---------------------------------------------------
> 1 files changed, 3 insertions(+), 133 deletions(-)
>
> diff --git a/drivers/net/fec.c b/drivers/net/fec.c
> index 0fbf1bb..0499cbb 100644
> --- a/drivers/net/fec.c
> +++ b/drivers/net/fec.c
> @@ -23,6 +23,9 @@
> *
> * Bug fixes and cleanup by Philippe De Muyter (phdm@macqel.be)
> * Copyright (c) 2004-2006 Macq Electronique SA.
> + *
> + * This driver is now only used on ColdFire processors. Remove
conditional
> + * Powerpc code.
> */
>
> #include <linux/module.h>
> @@ -49,17 +52,9 @@
> #include <asm/pgtable.h>
> #include <asm/cacheflush.h>
>
> -#if defined(CONFIG_M523x) || defined(CONFIG_M527x) || \
> - defined(CONFIG_M5272) || defined(CONFIG_M528x) || \
> - defined(CONFIG_M520x) || defined(CONFIG_M532x)
> #include <asm/coldfire.h>
> #include <asm/mcfsim.h>
> #include "fec.h"
> -#else
> -#include <asm/8xx_immap.h>
> -#include <asm/mpc8xx.h>
> -#include "commproc.h"
> -#endif
>
> #if defined(CONFIG_FEC2)
> #define FEC_MAX_PORTS 2
> @@ -1223,14 +1218,9 @@ static phy_info_t const * const phy_info[] = {
>
> /*
------------------------------------------------------------------------- */
> #if !defined(CONFIG_M532x)
> -#ifdef CONFIG_RPXCLASSIC
> -static void
> -mii_link_interrupt(void *dev_id);
> -#else
> static irqreturn_t
> mii_link_interrupt(int irq, void * dev_id);
> #endif
> -#endif
>
> #if defined(CONFIG_M5272)
> /*
> @@ -1800,121 +1790,6 @@ static void __inline__ fec_uncache(unsigned
long addr)
> /*
------------------------------------------------------------------------- */
>
>
> -#else
> -
> -/*
> - * Code specific to the MPC860T setup.
> - */
> -static void __inline__ fec_request_intrs(struct net_device *dev)
> -{
> - volatile immap_t *immap;
> -
> - immap = (immap_t *)IMAP_ADDR; /* pointer to internal registers */
> -
> - if (request_8xxirq(FEC_INTERRUPT, fec_enet_interrupt, 0, "fec",
dev) != 0)
> - panic("Could not allocate FEC IRQ!");
> -
> -#ifdef CONFIG_RPXCLASSIC
> - /* Make Port C, bit 15 an input that causes interrupts.
> - */
> - immap->im_ioport.iop_pcpar &= ~0x0001;
> - immap->im_ioport.iop_pcdir &= ~0x0001;
> - immap->im_ioport.iop_pcso &= ~0x0001;
> - immap->im_ioport.iop_pcint |= 0x0001;
> - cpm_install_handler(CPMVEC_PIO_PC15, mii_link_interrupt, dev);
> -
> - /* Make LEDS reflect Link status.
> - */
> - *((uint *) RPX_CSR_ADDR) &= ~BCSR2_FETHLEDMODE;
> -#endif
> -#ifdef CONFIG_FADS
> - if (request_8xxirq(SIU_IRQ2, mii_link_interrupt, 0, "mii", dev) != 0)
> - panic("Could not allocate MII IRQ!");
> -#endif
> -}
> -
> -static void __inline__ fec_get_mac(struct net_device *dev)
> -{
> - bd_t *bd;
> -
> - bd = (bd_t *)__res;
> - memcpy(dev->dev_addr, bd->bi_enetaddr, ETH_ALEN);
> -
> -#ifdef CONFIG_RPXCLASSIC
> - /* The Embedded Planet boards have only one MAC address in
> - * the EEPROM, but can have two Ethernet ports. For the
> - * FEC port, we create another address by setting one of
> - * the address bits above something that would have (up to
> - * now) been allocated.
> - */
> - dev->dev_adrd[3] |= 0x80;
> -#endif
> -}
> -
> -static void __inline__ fec_set_mii(struct net_device *dev, struct
fec_enet_private *fep)
> -{
> - extern uint _get_IMMR(void);
> - volatile immap_t *immap;
> - volatile fec_t *fecp;
> -
> - fecp = fep->hwp;
> - immap = (immap_t *)IMAP_ADDR; /* pointer to internal registers */
> -
> - /* Configure all of port D for MII.
> - */
> - immap->im_ioport.iop_pdpar = 0x1fff;
> -
> - /* Bits moved from Rev. D onward.
> - */
> - if ((_get_IMMR() & 0xffff) < 0x0501)
> - immap->im_ioport.iop_pddir = 0x1c58; /* Pre rev. D */
> - else
> - immap->im_ioport.iop_pddir = 0x1fff; /* Rev. D and later */
> -
> - /* Set MII speed to 2.5 MHz
> - */
> - fecp->fec_mii_speed = fep->phy_speed =
> - ((bd->bi_busfreq * 1000000) / 2500000) & 0x7e;
> -}
> -
> -static void __inline__ fec_enable_phy_intr(void)
> -{
> - volatile fec_t *fecp;
> -
> - fecp = fep->hwp;
> -
> - /* Enable MII command finished interrupt
> - */
> - fecp->fec_ivec = (FEC_INTERRUPT/2) << 29;
> -}
> -
> -static void __inline__ fec_disable_phy_intr(void)
> -{
> -}
> -
> -static void __inline__ fec_phy_ack_intr(void)
> -{
> -}
> -
> -static void __inline__ fec_localhw_setup(void)
> -{
> - volatile fec_t *fecp;
> -
> - fecp = fep->hwp;
> - fecp->fec_r_hash = PKT_MAXBUF_SIZE;
> - /* Enable big endian and don't care about SDMA FC.
> - */
> - fecp->fec_fun_code = 0x78000000;
> -}
> -
> -static void __inline__ fec_uncache(unsigned long addr)
> -{
> - pte_t *pte;
> - pte = va_to_pte(mem_addr);
> - pte_val(*pte) |= _PAGE_NO_CACHE;
> - flush_tlb_page(init_mm.mmap, mem_addr);
> -}
> -
> #endif
>
> /*
------------------------------------------------------------------------- */
> @@ -2126,13 +2001,8 @@ mii_discover_phy(uint mii_reg, struct
net_device *dev)
>
> /* This interrupt occurs when the PHY detects a link change.
> */
> -#ifdef CONFIG_RPXCLASSIC
> -static void
> -mii_link_interrupt(void *dev_id)
> -#else
> static irqreturn_t
> mii_link_interrupt(int irq, void * dev_id)
> -#endif
> {
> struct net_device *dev = dev_id;
> struct fec_enet_private *fep = netdev_priv(dev);
------------------------------------------------------------------------
Greg Ungerer -- Chief Software Dude EMAIL: gerg@snapgear.com
SnapGear -- a Secure Computing Company PHONE: +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
^ permalink raw reply
* Re: PATCH[1/1] 8xx: Add clock-frequency to .dts brg entries
From: Bryan O'Donoghue @ 2008-01-28 23:55 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20080128155012.GA27054@ld0162-tx32.am.freescale.net>
On Mon, 2008-01-28 at 09:50 -0600, Scott Wood wrote:
> On Mon, Jan 28, 2008 at 01:53:11AM +0000, Bryan O'Donoghue wrote:
> > cpm_uart_core has a dependency on fsl,cpm-brg/clock-frequency, this
> > means that a .dts that uses the cpm uart driver needs to supply a
> > clock-frequency entry for get_brgfreq to return a meaningful number.
> >
> > Included is a patchset which adds the correct brgclk to the adder port -
> > @ 50Mhz and also adds an entry for mpc885ads - which I've noticed is
> > missing a clock-frequency entry.
>
> It's not missing -- it's added by the bootwrapper.
>
> -Scott
Hmm..
You mean that arch/powerpc/boot/mpc8xx.c mpc8xx_set_clocks is supposed
to be adding this field ?
I see arch/powerpc/boot/wrapper.a has a reference to the function but -
and this time I've checked all documentation - there's no mention of how
to use this library at all... it _looks_ to me like this isn't being
linked in any way.
It for sure is nowhere in the uImage - and I've taken the preferred
route of making a uImage with .dtb - genreated from adder875-uboot.dts
dtc -O -o adder875-uboot.dtb arch/powerpc/boot/dts/adder875-uboot.dtb
cpm_uart depends on "fsl,cpm-brg" and a field called "clock-frequency"
as I understand it that's
fsl,cpm-brg
|_clock-frequency
whereas mpc8xx_set_clocks seems to add
/soc/cpm/brg
|_clock-frequency
So unless I'm not understanding the structure of the tree - possible - I
don't see how /soc/cpm/brg => clock-frequency could /possibly/ satisfy
get_brgfreq in fsl_soc.c
If there's something other then making a uImage and dtb and booting
these from u-boot that I'm supposed to be doing here ... it'd help if
you could say..
Otherwise in order to get the UART working using a uImage + dbt I've
found it necessary to add this field to the .dts....
mpc866ads.dts - also has a "fsl,cpm-brg" => clock-frequency entry in
linux/arch/powerpc/boot/dts/mpc866ads.dts - and to me this looks like
the correct approach for get_brgfreq to function properly...
What do you think ?
^ permalink raw reply
* Re: Linux boot on a ppc 405
From: Grant Likely @ 2008-01-28 23:04 UTC (permalink / raw)
To: Ricardo Ayres Severo; +Cc: Stephen Neuendorffer, linuxppc-embedded
In-Reply-To: <5ee408090801281500q467fe03anf00a5a31a5473846@mail.gmail.com>
On 1/28/08, Ricardo Ayres Severo <severo.ricardo@gmail.com> wrote:
> Steve,
>
> I tried that, but the System.map is not the real memory address, it's
> processed by the mmu isn't it?
>
> This is my System.map: c01e0cc4 b __log_buf
> when I try to look at the position 0xc01e0cc4 the debugger returns:
> Error: Cannot access memory at address 0xc01e0cc4
Drop the kernel offset of 0xc0000000
So; 0xc01e0cc4 becomes 0x001e0cc4 after reset.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply
* RE: Linux boot on a ppc 405
From: Stephen Neuendorffer @ 2008-01-28 23:02 UTC (permalink / raw)
To: Ricardo Ayres Severo; +Cc: linuxppc-embedded
In-Reply-To: <5ee408090801281500q467fe03anf00a5a31a5473846@mail.gmail.com>
I've you've reset the processor, then the MMU has been reset too, in
which case your
log_buf will most likely be at 1e0cc4. The 'trick' is that resetting
the processor
leaves the memory intact.
Steve
> -----Original Message-----
> From: Ricardo Ayres Severo [mailto:severo.ricardo@gmail.com]
> Sent: Monday, January 28, 2008 3:00 PM
> To: Stephen Neuendorffer
> Cc: linuxppc-embedded@ozlabs.org
> Subject: Re: Linux boot on a ppc 405
>=20
> Steve,
>=20
> I tried that, but the System.map is not the real memory address, it's
> processed by the mmu isn't it?
>=20
> This is my System.map: c01e0cc4 b __log_buf
> when I try to look at the position 0xc01e0cc4 the debugger returns:
> Error: Cannot access memory at address 0xc01e0cc4
>=20
> Am I doing something wrong?
>=20
> Thanks,
>=20
> On Jan 28, 2008 8:55 PM, Stephen Neuendorffer
> <stephen.neuendorffer@xilinx.com> wrote:
> >
> > You have to look at the System.map file, find the __log_buf symbol,
and
> > then look at the address manually.
> >
> > Steve
> >
> >
> > > -----Original Message-----
> > > From:
linuxppc-embedded-bounces+stephen=3Dneuendorffer.name@ozlabs.org
> > [mailto:linuxppc-embedded-
> > > bounces+stephen=3Dneuendorffer.name@ozlabs.org] On Behalf Of =
Ricardo
> > Ayres Severo
> > > Sent: Monday, January 28, 2008 2:53 PM
> > > Cc: linuxppc-embedded@ozlabs.org
> > > Subject: Re: Linux boot on a ppc 405
> > >
> > > Grant,
> > >
> > > my output is the following:
> > >
> > > loaded at: 00400000 004E919C
> > >
> > > board data at: 00000000 0000007C
> > >
> > > relocated to: 00404040 004040BC
> > >
> > > zimage at: 00404E2C 004E620A
> > >
> > > avail ram: 004EA000 8DA05119
> > >
> > >
> > > Linux/PPC load: console=3DttyUL0,9600
> > >
> > > Uncompressing Linux...done.
> > >
> > > Now booting the kernel
> > >
> > >
> > >
> > > nothing shows up next.
> > > I tried to look at __log_buf but the debugger doesn't recognize
it.
> > > The debugger only knows the code of the part that boots the
kernel.
> > > I also tried setting ttyUL0 and ttyS0 for the linux console.
> > > Any ideas of how I can get the real position of __log_buf?
> > >
> > > Thanks,
> > >
> > > On Jan 27, 2008 7:15 PM, Grant Likely <grant.likely@secretlab.ca>
> > wrote:
> > > > On 1/27/08, Ricardo Severo <severo.ricardo@gmail.com> wrote:
> > > > > Hi all,
> > > > >
> > > > > I am working with a Xilinx Virtex II Pro evaluation board,
wich
> > has two
> > > > > PowerPC 405 and I'm trying to boot a vanilla linux kernel
> > 2.6.23.14.
> > > > > Until now I've manged to make it uncompress the kernel, but it
> > doesn't boot.
> > > > > My question is how the initial execution (the one who
uncompresses
> > the
> > > > > kernel image) transfers the processor to the kernel itself.
I've
> > looked
> > > > > in the arch/ppc/boot/simple/relocate.S code and it jumps to
the
> > position
> > > > > 0x0 after uncompressing, is it right? The kernel is
uncompressed
> > at that
> > > > > position?
> > > >
> > > > Post your output log please.
> > > >
> > > > If your getting a message that the kernel is uncompressing, but
you
> > > > don't have any output beyond that then most likely your console
is
> > not
> > > > setup correctly. If you've got a debugger, look at memory at
the
> > > > __log_buf location to see if there are any boot logs there.
> > > >
> > > > Cheers,
> > > > g.
> > > >
> > > >
> > > > --
> > > > Grant Likely, B.Sc., P.Eng.
> > > > Secret Lab Technologies Ltd.
> > > >
> > >
> > >
> > >
> > > --
> > > Ricardo Ayres Severo <severo.ricardo@gmail.com>
> >
> > > _______________________________________________
> > > Linuxppc-embedded mailing list
> > > Linuxppc-embedded@ozlabs.org
> > > https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> >
> >
> >
>=20
>=20
>=20
> --
> Ricardo Ayres Severo <severo.ricardo@gmail.com>
^ permalink raw reply
* Re: Linux boot on a ppc 405
From: Ricardo Ayres Severo @ 2008-01-28 23:00 UTC (permalink / raw)
To: Stephen Neuendorffer; +Cc: linuxppc-embedded
In-Reply-To: <20080128225505.22226C20071@mail131-dub.bigfish.com>
Steve,
I tried that, but the System.map is not the real memory address, it's
processed by the mmu isn't it?
This is my System.map: c01e0cc4 b __log_buf
when I try to look at the position 0xc01e0cc4 the debugger returns:
Error: Cannot access memory at address 0xc01e0cc4
Am I doing something wrong?
Thanks,
On Jan 28, 2008 8:55 PM, Stephen Neuendorffer
<stephen.neuendorffer@xilinx.com> wrote:
>
> You have to look at the System.map file, find the __log_buf symbol, and
> then look at the address manually.
>
> Steve
>
>
> > -----Original Message-----
> > From: linuxppc-embedded-bounces+stephen=neuendorffer.name@ozlabs.org
> [mailto:linuxppc-embedded-
> > bounces+stephen=neuendorffer.name@ozlabs.org] On Behalf Of Ricardo
> Ayres Severo
> > Sent: Monday, January 28, 2008 2:53 PM
> > Cc: linuxppc-embedded@ozlabs.org
> > Subject: Re: Linux boot on a ppc 405
> >
> > Grant,
> >
> > my output is the following:
> >
> > loaded at: 00400000 004E919C
> >
> > board data at: 00000000 0000007C
> >
> > relocated to: 00404040 004040BC
> >
> > zimage at: 00404E2C 004E620A
> >
> > avail ram: 004EA000 8DA05119
> >
> >
> > Linux/PPC load: console=ttyUL0,9600
> >
> > Uncompressing Linux...done.
> >
> > Now booting the kernel
> >
> >
> >
> > nothing shows up next.
> > I tried to look at __log_buf but the debugger doesn't recognize it.
> > The debugger only knows the code of the part that boots the kernel.
> > I also tried setting ttyUL0 and ttyS0 for the linux console.
> > Any ideas of how I can get the real position of __log_buf?
> >
> > Thanks,
> >
> > On Jan 27, 2008 7:15 PM, Grant Likely <grant.likely@secretlab.ca>
> wrote:
> > > On 1/27/08, Ricardo Severo <severo.ricardo@gmail.com> wrote:
> > > > Hi all,
> > > >
> > > > I am working with a Xilinx Virtex II Pro evaluation board, wich
> has two
> > > > PowerPC 405 and I'm trying to boot a vanilla linux kernel
> 2.6.23.14.
> > > > Until now I've manged to make it uncompress the kernel, but it
> doesn't boot.
> > > > My question is how the initial execution (the one who uncompresses
> the
> > > > kernel image) transfers the processor to the kernel itself. I've
> looked
> > > > in the arch/ppc/boot/simple/relocate.S code and it jumps to the
> position
> > > > 0x0 after uncompressing, is it right? The kernel is uncompressed
> at that
> > > > position?
> > >
> > > Post your output log please.
> > >
> > > If your getting a message that the kernel is uncompressing, but you
> > > don't have any output beyond that then most likely your console is
> not
> > > setup correctly. If you've got a debugger, look at memory at the
> > > __log_buf location to see if there are any boot logs there.
> > >
> > > Cheers,
> > > g.
> > >
> > >
> > > --
> > > Grant Likely, B.Sc., P.Eng.
> > > Secret Lab Technologies Ltd.
> > >
> >
> >
> >
> > --
> > Ricardo Ayres Severo <severo.ricardo@gmail.com>
>
> > _______________________________________________
> > Linuxppc-embedded mailing list
> > Linuxppc-embedded@ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>
>
--
Ricardo Ayres Severo <severo.ricardo@gmail.com>
^ permalink raw reply
* RE: Linux boot on a ppc 405
From: Stephen Neuendorffer @ 2008-01-28 22:55 UTC (permalink / raw)
To: Ricardo Ayres Severo; +Cc: linuxppc-embedded
In-Reply-To: <5ee408090801281453l3e6fe3e5x2f8f1b0b130ad163@mail.gmail.com>
You have to look at the System.map file, find the __log_buf symbol, and
then look at the address manually.
Steve
> -----Original Message-----
> From: linuxppc-embedded-bounces+stephen=3Dneuendorffer.name@ozlabs.org
[mailto:linuxppc-embedded-
> bounces+stephen=3Dneuendorffer.name@ozlabs.org] On Behalf Of Ricardo
Ayres Severo
> Sent: Monday, January 28, 2008 2:53 PM
> Cc: linuxppc-embedded@ozlabs.org
> Subject: Re: Linux boot on a ppc 405
>=20
> Grant,
>=20
> my output is the following:
>=20
> loaded at: 00400000 004E919C
>=20
> board data at: 00000000 0000007C
>=20
> relocated to: 00404040 004040BC
>=20
> zimage at: 00404E2C 004E620A
>=20
> avail ram: 004EA000 8DA05119
>=20
>=20
> Linux/PPC load: console=3DttyUL0,9600
>=20
> Uncompressing Linux...done.
>=20
> Now booting the kernel
>=20
>=20
>=20
> nothing shows up next.
> I tried to look at __log_buf but the debugger doesn't recognize it.
> The debugger only knows the code of the part that boots the kernel.
> I also tried setting ttyUL0 and ttyS0 for the linux console.
> Any ideas of how I can get the real position of __log_buf?
>=20
> Thanks,
>=20
> On Jan 27, 2008 7:15 PM, Grant Likely <grant.likely@secretlab.ca>
wrote:
> > On 1/27/08, Ricardo Severo <severo.ricardo@gmail.com> wrote:
> > > Hi all,
> > >
> > > I am working with a Xilinx Virtex II Pro evaluation board, wich
has two
> > > PowerPC 405 and I'm trying to boot a vanilla linux kernel
2.6.23.14.
> > > Until now I've manged to make it uncompress the kernel, but it
doesn't boot.
> > > My question is how the initial execution (the one who uncompresses
the
> > > kernel image) transfers the processor to the kernel itself. I've
looked
> > > in the arch/ppc/boot/simple/relocate.S code and it jumps to the
position
> > > 0x0 after uncompressing, is it right? The kernel is uncompressed
at that
> > > position?
> >
> > Post your output log please.
> >
> > If your getting a message that the kernel is uncompressing, but you
> > don't have any output beyond that then most likely your console is
not
> > setup correctly. If you've got a debugger, look at memory at the
> > __log_buf location to see if there are any boot logs there.
> >
> > Cheers,
> > g.
> >
> >
> > --
> > Grant Likely, B.Sc., P.Eng.
> > Secret Lab Technologies Ltd.
> >
>=20
>=20
>=20
> --
> Ricardo Ayres Severo <severo.ricardo@gmail.com>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply
* Re: Linux boot on a ppc 405
From: Ricardo Ayres Severo @ 2008-01-28 22:53 UTC (permalink / raw)
Cc: linuxppc-embedded
In-Reply-To: <fa686aa40801271315m5ba4ea08p913fd6235eb1d240@mail.gmail.com>
Grant,
my output is the following:
loaded at: 00400000 004E919C
board data at: 00000000 0000007C
relocated to: 00404040 004040BC
zimage at: 00404E2C 004E620A
avail ram: 004EA000 8DA05119
Linux/PPC load: console=ttyUL0,9600
Uncompressing Linux...done.
Now booting the kernel
nothing shows up next.
I tried to look at __log_buf but the debugger doesn't recognize it.
The debugger only knows the code of the part that boots the kernel.
I also tried setting ttyUL0 and ttyS0 for the linux console.
Any ideas of how I can get the real position of __log_buf?
Thanks,
On Jan 27, 2008 7:15 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
> On 1/27/08, Ricardo Severo <severo.ricardo@gmail.com> wrote:
> > Hi all,
> >
> > I am working with a Xilinx Virtex II Pro evaluation board, wich has two
> > PowerPC 405 and I'm trying to boot a vanilla linux kernel 2.6.23.14.
> > Until now I've manged to make it uncompress the kernel, but it doesn't boot.
> > My question is how the initial execution (the one who uncompresses the
> > kernel image) transfers the processor to the kernel itself. I've looked
> > in the arch/ppc/boot/simple/relocate.S code and it jumps to the position
> > 0x0 after uncompressing, is it right? The kernel is uncompressed at that
> > position?
>
> Post your output log please.
>
> If your getting a message that the kernel is uncompressing, but you
> don't have any output beyond that then most likely your console is not
> setup correctly. If you've got a debugger, look at memory at the
> __log_buf location to see if there are any boot logs there.
>
> Cheers,
> g.
>
>
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
>
--
Ricardo Ayres Severo <severo.ricardo@gmail.com>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox