* [2.6.19 PATCH 5/7] ehea: main header files
From: Jan-Bernd Themann @ 2006-08-22 12:55 UTC (permalink / raw)
To: netdev
Cc: Thomas Klein, Jan-Bernd Themann, linux-kernel, linux-ppc,
Christoph Raisch, Marcus Eder
Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
drivers/net/ehea/ehea.h | 437 +++++++++++++++++++++++++++++++++++++++++++++
drivers/net/ehea/ehea_hw.h | 290 +++++++++++++++++++++++++++++
2 files changed, 727 insertions(+)
--- linux-2.6.18-rc4-git1-orig/drivers/net/ehea/ehea.h 1969-12-31 16:00:00.000000000 -0800
+++ kernel/drivers/net/ehea/ehea.h 2006-08-22 06:05:29.284374423 -0700
@@ -0,0 +1,437 @@
+/*
+ * linux/drivers/net/ehea/ehea.h
+ *
+ * eHEA ethernet device driver for IBM eServer System p
+ *
+ * (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>
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __EHEA_H__
+#define __EHEA_H__
+
+#include <linux/module.h>
+#include <linux/ethtool.h>
+#include <linux/vmalloc.h>
+#include <linux/if_vlan.h>
+
+#include <asm/ibmebus.h>
+#include <asm/abs_addr.h>
+#include <asm/io.h>
+
+#define DRV_NAME "ehea"
+#define DRV_VERSION "EHEA_0019"
+
+#define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER)
+
+#define EHEA_MAX_ENTRIES_RQ1 32767
+#define EHEA_MAX_ENTRIES_RQ2 16383
+#define EHEA_MAX_ENTRIES_RQ3 16383
+#define EHEA_MAX_ENTRIES_SQ 32767
+#define EHEA_MIN_ENTRIES_QP 127
+
+#define EHEA_NUM_TX_QP 1
+
+#ifdef EHEA_SMALL_QUEUES
+#define EHEA_MAX_CQE_COUNT 1023
+#define EHEA_DEF_ENTRIES_SQ 1023
+#define EHEA_DEF_ENTRIES_RQ1 4095
+#define EHEA_DEF_ENTRIES_RQ2 1023
+#define EHEA_DEF_ENTRIES_RQ3 1023
+#define EHEA_SWQE_REFILL_TH 100
+#else
+#define EHEA_MAX_CQE_COUNT 32000
+#define EHEA_DEF_ENTRIES_SQ 16000
+#define EHEA_DEF_ENTRIES_RQ1 32080
+#define EHEA_DEF_ENTRIES_RQ2 4020
+#define EHEA_DEF_ENTRIES_RQ3 4020
+#define EHEA_SWQE_REFILL_TH 1000
+#endif
+
+#define EHEA_MAX_ENTRIES_EQ 20
+
+#define EHEA_SG_SQ 2
+#define EHEA_SG_RQ1 1
+#define EHEA_SG_RQ2 0
+#define EHEA_SG_RQ3 0
+
+#define EHEA_MAX_PACKET_SIZE 9022 /* for jumbo frames */
+#define EHEA_RQ2_PKT_SIZE 1522
+#define EHEA_LL_PKT_SIZE 256 /* low latency */
+
+#define EHEA_POLL_MAX_RWQE 1000
+
+/* Send completion signaling */
+#define EHEA_SIG_IV_LONG 4
+
+/* Protection Domain Identifier */
+#define EHEA_PD_ID 0xaabcdeff
+
+#define EHEA_RQ2_THRESHOLD 1
+#define EHEA_RQ3_THRESHOLD 9 /* use RQ3 threshold of 1522 bytes */
+
+#define EHEA_SPEED_10G 10000
+#define EHEA_SPEED_1G 1000
+#define EHEA_SPEED_100M 100
+#define EHEA_SPEED_10M 10
+
+/* Broadcast/Multicast registration types */
+#define EHEA_BCMC_SCOPE_ALL 0x08
+#define EHEA_BCMC_SCOPE_SINGLE 0x00
+#define EHEA_BCMC_MULTICAST 0x04
+#define EHEA_BCMC_BROADCAST 0x00
+#define EHEA_BCMC_UNTAGGED 0x02
+#define EHEA_BCMC_TAGGED 0x00
+#define EHEA_BCMC_VLANID_ALL 0x01
+#define EHEA_BCMC_VLANID_SINGLE 0x00
+
+/* Use this define to kmallocate pHYP control blocks */
+#define H_CB_ALIGNMENT 4096
+
+#define EHEA_CACHE_LINE 128
+
+/* Memory Regions */
+#define EHEA_MR_MAX_TX_PAGES 20
+#define EHEA_MR_TX_DATA_PN 3
+#define EHEA_MR_ACC_CTRL 0x00800000
+#define EHEA_RWQES_PER_MR_RQ2 10
+#define EHEA_RWQES_PER_MR_RQ3 10
+
+#define EHEA_WATCH_DOG_TIMEOUT 10*HZ
+
+
+void ehea_set_ethtool_ops(struct net_device *netdev);
+
+/* utility functions */
+
+#define ehea_info(fmt, args...) \
+ printk(KERN_INFO DRV_NAME ": " fmt "\n", ## args)
+
+#define ehea_error(fmt, args...) \
+ printk(KERN_ERR DRV_NAME ": Error in %s: " fmt "\n", __func__, ## args)
+
+#ifdef DEBUG
+#define ehea_debug(fmt, args...) \
+ printk(KERN_DEBUG DRV_NAME ": " fmt, ## args)
+#else
+#define ehea_debug(fmt, args...) do {} while (0)
+#endif
+
+void ehea_dump(void *adr, int len, char *msg);
+
+#define EHEA_BMASK(pos, length) (((pos) << 16) + (length))
+
+#define EHEA_BMASK_IBM(from, to) (((63 - to) << 16) + ((to) - (from) + 1))
+
+#define EHEA_BMASK_SHIFTPOS(mask) (((mask) >> 16) & 0xffff)
+
+#define EHEA_BMASK_MASK(mask) \
+ (0xffffffffffffffffULL >> ((64 - (mask)) & 0xffff))
+
+#define EHEA_BMASK_SET(mask, value) \
+ ((EHEA_BMASK_MASK(mask) & ((u64)(value))) << EHEA_BMASK_SHIFTPOS(mask))
+
+#define EHEA_BMASK_GET(mask, value) \
+ (EHEA_BMASK_MASK(mask) & (((u64)(value)) >> EHEA_BMASK_SHIFTPOS(mask)))
+
+/*
+ * Generic ehea page
+ */
+struct ehea_page {
+ u8 entries[PAGE_SIZE];
+};
+
+/*
+ * Generic queue in linux kernel virtual memory
+ */
+struct hw_queue {
+ u64 current_q_offset; /* current queue entry */
+ struct ehea_page **queue_pages; /* array of pages belonging to queue */
+ u32 qe_size; /* queue entry size */
+ u32 queue_length; /* queue length allocated in bytes */
+ u32 pagesize;
+ u32 toggle_state; /* toggle flag - per page */
+ u32 reserved; /* 64 bit alignment */
+};
+
+/*
+ * For pSeries this is a 64bit memory address where
+ * I/O memory is mapped into CPU address space
+ */
+struct h_epa {
+ u64 fw_handle;
+};
+
+struct h_epas {
+ struct h_epa kernel; /* kernel space accessible resource,
+ set to 0 if unused */
+ struct h_epa user; /* user space accessible resource
+ set to 0 if unused */
+ u32 pid; /* PID of userspace epa checking */
+};
+
+struct ehea_qp;
+struct ehea_cq;
+struct ehea_eq;
+struct ehea_port;
+struct ehea_av;
+
+/*
+ * Queue attributes passed to ehea_create_qp()
+ */
+struct ehea_qp_init_attr {
+ /* input parameter */
+ u32 qp_token; /* queue token */
+ u8 low_lat_rq1;
+ u8 signalingtype; /* cqe generation flag */
+ u8 rq_count; /* num of receive queues */
+ u8 eqe_gen; /* eqe generation flag */
+ u16 max_nr_send_wqes; /* max number of send wqes */
+ u16 max_nr_rwqes_rq1; /* max number of receive wqes */
+ u16 max_nr_rwqes_rq2;
+ u16 max_nr_rwqes_rq3;
+ u8 wqe_size_enc_sq;
+ u8 wqe_size_enc_rq1;
+ u8 wqe_size_enc_rq2;
+ u8 wqe_size_enc_rq3;
+ u8 swqe_imm_data_len; /* immediate data length for swqes */
+ u16 port_nr;
+ u16 rq2_threshold;
+ u16 rq3_threshold;
+ u64 send_cq_handle;
+ u64 recv_cq_handle;
+ u64 aff_eq_handle;
+
+ /* output parameter */
+ u32 qp_nr;
+ u16 act_nr_send_wqes;
+ u16 act_nr_rwqes_rq1;
+ u16 act_nr_rwqes_rq2;
+ u16 act_nr_rwqes_rq3;
+ u8 act_wqe_size_enc_sq;
+ u8 act_wqe_size_enc_rq1;
+ u8 act_wqe_size_enc_rq2;
+ u8 act_wqe_size_enc_rq3;
+ u32 nr_sq_pages;
+ u32 nr_rq1_pages;
+ u32 nr_rq2_pages;
+ u32 nr_rq3_pages;
+ u32 liobn_sq;
+ u32 liobn_rq1;
+ u32 liobn_rq2;
+ u32 liobn_rq3;
+};
+
+/*
+ * Event Queue attributes, passed as paramter
+ */
+struct ehea_eq_attr {
+ u32 type;
+ u32 max_nr_of_eqes;
+ u8 eqe_gen; /* generate eqe flag */
+ u64 eq_handle;
+ u32 act_nr_of_eqes;
+ u32 nr_pages;
+ u32 ist1; /* Interrupt service token */
+ u32 ist2;
+ u32 ist3;
+ u32 ist4;
+};
+
+
+/*
+ * Event Queue
+ */
+struct ehea_eq {
+ struct ehea_adapter *adapter;
+ struct hw_queue hw_queue;
+ u64 fw_handle;
+ struct h_epas epas;
+ spinlock_t spinlock;
+ struct ehea_eq_attr attr;
+};
+
+/*
+ * HEA Queues
+ */
+struct ehea_qp {
+ struct ehea_adapter *adapter;
+ u64 fw_handle; /* QP handle for firmware calls */
+ struct hw_queue hw_squeue;
+ struct hw_queue hw_rqueue1;
+ struct hw_queue hw_rqueue2;
+ struct hw_queue hw_rqueue3;
+ struct h_epas epas;
+ struct ehea_qp_init_attr init_attr;
+};
+
+/*
+ * Completion Queue attributes
+ */
+struct ehea_cq_attr {
+ /* input parameter */
+ u32 max_nr_of_cqes;
+ u32 cq_token;
+ u64 eq_handle;
+
+ /* output parameter */
+ u32 act_nr_of_cqes;
+ u32 nr_pages;
+};
+
+/*
+ * Completion Queue
+ */
+struct ehea_cq {
+ struct ehea_adapter *adapter;
+ u64 fw_handle;
+ struct hw_queue hw_queue;
+ struct h_epas epas;
+ struct ehea_cq_attr attr;
+};
+
+/*
+ * Memory Region
+ */
+struct ehea_mr {
+ u64 handle;
+ u64 vaddr;
+ u32 lkey;
+};
+
+/*
+ * Port state information
+ */
+struct port_state {
+ int poll_max_processed;
+ int poll_receive_errors;
+ int ehea_poll;
+ int queue_stopped;
+ int min_swqe_avail;
+ u64 sqc_stop_sum;
+ int pkt_send;
+ int pkt_xmit;
+ int send_tasklet;
+ int nwqe;
+};
+
+#define EHEA_IRQ_NAME_SIZE 20
+
+/*
+ * Port resources
+ */
+struct ehea_port_res {
+ struct ehea_mr send_mr; /* send memory region */
+ struct ehea_mr recv_mr; /* receive memory region */
+ spinlock_t xmit_lock;
+ struct ehea_port *port;
+ char int_recv_name[EHEA_IRQ_NAME_SIZE];
+ char int_send_name[EHEA_IRQ_NAME_SIZE];
+ struct ehea_qp *qp;
+ struct ehea_cq *send_cq;
+ struct ehea_cq *recv_cq;
+ struct ehea_eq *send_eq;
+ struct ehea_eq *recv_eq;
+ spinlock_t send_lock;
+ struct sk_buff **skb_arr_rq1; /* skb array for rq1 */
+ struct sk_buff **skb_arr_rq2;
+ struct sk_buff **skb_arr_rq3;
+ struct sk_buff **skb_arr_sq;
+ int skb_arr_rq1_len;
+ int skb_arr_rq2_len;
+ int skb_arr_rq3_len;
+ int skb_arr_sq_len;
+ int skb_rq2_index;
+ int skb_rq3_index;
+ int skb_sq_index;
+ int os_skbs_rq2; /* outstanding skbs for rq2 */
+ int os_skbs_rq3;
+ spinlock_t netif_queue;
+ atomic_t swqe_avail;
+ int swqe_ll_count;
+ int swqe_count;
+ u32 swqe_id_counter;
+ u64 tx_packets;
+ struct tasklet_struct send_comp_task;
+ spinlock_t recv_lock;
+ struct port_state p_state;
+ u64 rx_packets;
+ u32 poll_counter;
+};
+
+
+struct ehea_adapter {
+ u64 handle;
+ u8 num_ports;
+ struct ehea_port *port[16];
+ struct ehea_eq *neq; /* notification event queue */
+ struct workqueue_struct *ehea_wq;
+ struct tasklet_struct neq_tasklet;
+ struct ehea_mr mr;
+ u32 pd; /* protection domain */
+ u64 max_mc_mac; /* max number of multicast mac addresses */
+};
+
+
+struct ehea_mc_list {
+ struct list_head list;
+ u64 macaddr;
+};
+
+#define EHEA_PORT_UP 1
+#define EHEA_PORT_DOWN 0
+#define EHEA_MAX_PORT_RES 16
+struct ehea_port {
+ struct ehea_adapter *adapter; /* adapter that owns this port */
+ struct net_device *netdev;
+ struct net_device_stats stats;
+ struct ehea_port_res port_res[EHEA_MAX_PORT_RES];
+ struct device_node *of_dev_node; /* Open Firmware Device Node */
+ struct ehea_mc_list *mc_list; /* Multicast MAC addresses */
+ struct vlan_group *vgrp;
+ struct ehea_eq *qp_eq;
+ struct work_struct reset_task;
+ struct semaphore port_lock;
+ char int_aff_name[EHEA_IRQ_NAME_SIZE];
+ int allmulti; /* Indicates IFF_ALLMULTI state */
+ int promisc; /* Indicates IFF_PROMISC state */
+ int num_tx_qps;
+ u64 mac_addr;
+ u32 logical_port_id;
+ u32 port_speed;
+ u32 msg_enable;
+ u32 sig_comp_iv;
+ u32 state;
+ u8 full_duplex;
+ u8 num_def_qps;
+};
+
+struct port_res_cfg {
+ int max_entries_rcq;
+ int max_entries_scq;
+ int max_entries_sq;
+ int max_entries_rq1;
+ int max_entries_rq2;
+ int max_entries_rq3;
+};
+
+#endif /* __EHEA_H__ */
--- linux-2.6.18-rc4-git1-orig/drivers/net/ehea/ehea_hw.h 1969-12-31 16:00:00.000000000 -0800
+++ kernel/drivers/net/ehea/ehea_hw.h 2006-08-22 06:05:29.271374306 -0700
@@ -0,0 +1,290 @@
+/*
+ * linux/drivers/net/ehea/ehea_hw.h
+ *
+ * eHEA ethernet device driver for IBM eServer System p
+ *
+ * (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>
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#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 QPTEMM_OFFSET(x) offsetof(struct ehea_qptemm, x)
+
+struct ehea_qptemm {
+ u64 qpx_hcr;
+ u64 qpx_c;
+ u64 qpx_herr;
+ u64 qpx_aer;
+ u64 qpx_sqa;
+ u64 qpx_sqc;
+ u64 qpx_rq1a;
+ u64 qpx_rq1c;
+ u64 qpx_st;
+ u64 qpx_aerr;
+ u64 qpx_tenure;
+ u64 qpx_reserved1[(0x098 - 0x058) / 8];
+ u64 qpx_portp;
+ u64 qpx_reserved2[(0x100 - 0x0A0) / 8];
+ u64 qpx_t;
+ u64 qpx_sqhp;
+ u64 qpx_sqptp;
+ u64 qpx_reserved3[(0x140 - 0x118) / 8];
+ u64 qpx_sqwsize;
+ u64 qpx_reserved4[(0x170 - 0x148) / 8];
+ u64 qpx_sqsize;
+ u64 qpx_reserved5[(0x1B0 - 0x178) / 8];
+ u64 qpx_sigt;
+ u64 qpx_wqecnt;
+ u64 qpx_rq1hp;
+ u64 qpx_rq1ptp;
+ u64 qpx_rq1size;
+ u64 qpx_reserved6[(0x220 - 0x1D8) / 8];
+ u64 qpx_rq1wsize;
+ u64 qpx_reserved7[(0x240 - 0x228) / 8];
+ u64 qpx_pd;
+ u64 qpx_scqn;
+ u64 qpx_rcqn;
+ u64 qpx_aeqn;
+ u64 reserved49;
+ u64 qpx_ram;
+ u64 qpx_reserved8[(0x300 - 0x270) / 8];
+ u64 qpx_rq2a;
+ u64 qpx_rq2c;
+ u64 qpx_rq2hp;
+ u64 qpx_rq2ptp;
+ u64 qpx_rq2size;
+ u64 qpx_rq2wsize;
+ u64 qpx_rq2th;
+ u64 qpx_rq3a;
+ u64 qpx_rq3c;
+ u64 qpx_rq3hp;
+ u64 qpx_rq3ptp;
+ u64 qpx_rq3size;
+ u64 qpx_rq3wsize;
+ u64 qpx_rq3th;
+ u64 qpx_lpn;
+ u64 qpx_reserved9[(0x400 - 0x378) / 8];
+ u64 reserved_ext[(0x500 - 0x400) / 8];
+ u64 reserved2[(0x1000 - 0x500) / 8];
+};
+
+#define MRx_HCR_LPARID_VALID EHEA_BMASK_IBM(0, 0)
+
+#define MRMWMM_OFFSET(x) offsetof(struct ehea_mrmwmm, x)
+
+struct ehea_mrmwmm {
+ u64 mrx_hcr;
+ u64 mrx_c;
+ u64 mrx_herr;
+ u64 mrx_aer;
+ u64 mrx_pp;
+ u64 reserved1;
+ u64 reserved2;
+ u64 reserved3;
+ u64 reserved4[(0x200 - 0x40) / 8];
+ u64 mrx_ctl[64];
+};
+
+#define QPEDMM_OFFSET(x) offsetof(struct ehea_qpedmm, x)
+
+struct ehea_qpedmm {
+
+ u64 reserved0[(0x400) / 8];
+ u64 qpedx_phh;
+ u64 qpedx_ppsgp;
+ u64 qpedx_ppsgu;
+ u64 qpedx_ppdgp;
+ u64 qpedx_ppdgu;
+ u64 qpedx_aph;
+ u64 qpedx_apsgp;
+ u64 qpedx_apsgu;
+ u64 qpedx_apdgp;
+ u64 qpedx_apdgu;
+ u64 qpedx_apav;
+ u64 qpedx_apsav;
+ u64 qpedx_hcr;
+ u64 reserved1[4];
+ u64 qpedx_rrl0;
+ u64 qpedx_rrrkey0;
+ u64 qpedx_rrva0;
+ u64 reserved2;
+ u64 qpedx_rrl1;
+ u64 qpedx_rrrkey1;
+ u64 qpedx_rrva1;
+ u64 reserved3;
+ u64 qpedx_rrl2;
+ u64 qpedx_rrrkey2;
+ u64 qpedx_rrva2;
+ u64 reserved4;
+ u64 qpedx_rrl3;
+ u64 qpedx_rrrkey3;
+ u64 qpedx_rrva3;
+};
+
+#define CQX_FECADDER EHEA_BMASK_IBM(32, 63)
+#define CQX_FEC_CQE_CNT EHEA_BMASK_IBM(32, 63)
+#define CQX_N1_GENERATE_COMP_EVENT EHEA_BMASK_IBM(0, 0)
+#define CQX_EP_EVENT_PENDING EHEA_BMASK_IBM(0, 0)
+
+#define CQTEMM_OFFSET(x) offsetof(struct ehea_cqtemm, x)
+
+struct ehea_cqtemm {
+ u64 cqx_hcr;
+ u64 cqx_c;
+ u64 cqx_herr;
+ u64 cqx_aer;
+ u64 cqx_ptp;
+ u64 cqx_tp;
+ u64 cqx_fec;
+ u64 cqx_feca;
+ u64 cqx_ep;
+ u64 cqx_eq;
+ u64 reserved1;
+ u64 cqx_n0;
+ u64 cqx_n1;
+ u64 reserved2[(0x1000 - 0x60) / 8];
+};
+
+#define EQTEMM_OFFSET(x) offsetof(struct ehea_eqtemm, x)
+
+struct ehea_eqtemm {
+ u64 EQx_HCR;
+ u64 EQx_C;
+ u64 EQx_HERR;
+ u64 EQx_AER;
+ u64 EQx_PTP;
+ u64 EQx_TP;
+ u64 EQx_SSBA;
+ u64 EQx_PSBA;
+ u64 EQx_CEC;
+ u64 EQx_MEQL;
+ u64 EQx_XISBI;
+ u64 EQx_XISC;
+ u64 EQx_IT;
+};
+
+static inline u64 epa_load(struct h_epa epa, u32 offset)
+{
+ u64 addr = epa.fw_handle + offset;
+ return *(volatile u64*)addr;
+}
+
+static inline void epa_store(struct h_epa epa, u32 offset, u64 value)
+{
+ u64 addr = epa.fw_handle + offset;
+ *(u64*)addr = value;
+ epa_load(epa, offset); /* synchronize explicitly to eHEA */
+}
+
+static inline void epa_store_acc(struct h_epa epa, u32 offset, u64 value)
+{
+ u64 addr = epa.fw_handle + offset;
+ *(u64*)addr = value;
+}
+
+#define epa_store_eq(epa, offset, value)\
+ epa_store(epa, EQTEMM_OFFSET(offset), value)
+#define epa_load_eq(epa, offset)\
+ epa_load(epa, EQTEMM_OFFSET(offset))
+
+#define epa_store_cq(epa, offset, value)\
+ epa_store(epa, CQTEMM_OFFSET(offset), value)
+#define epa_load_cq(epa, offset)\
+ epa_load(epa, CQTEMM_OFFSET(offset))
+
+#define epa_store_qp(epa, offset, value)\
+ epa_store(epa, QPTEMM_OFFSET(offset), value)
+#define epa_load_qp(epa, offset)\
+ epa_load(epa, QPTEMM_OFFSET(offset))
+
+#define epa_store_qped(epa, offset, value)\
+ epa_store(epa, QPEDMM_OFFSET(offset), value)
+#define epa_load_qped(epa, offset)\
+ epa_load(epa, QPEDMM_OFFSET(offset))
+
+#define epa_store_mrmw(epa, offset, value)\
+ epa_store(epa, MRMWMM_OFFSET(offset), value)
+#define epa_load_mrmw(epa, offset)\
+ epa_load(epa, MRMWMM_OFFSET(offset))
+
+#define epa_store_base(epa, offset, value)\
+ epa_store(epa, HCAGR_OFFSET(offset), value)
+#define epa_load_base(epa, offset)\
+ epa_load(epa, HCAGR_OFFSET(offset))
+
+static inline void ehea_update_sqa(struct ehea_qp *qp, u16 nr_wqes)
+{
+ struct h_epa epa = qp->epas.kernel;
+ epa_store_acc(epa, QPTEMM_OFFSET(qpx_sqa),
+ EHEA_BMASK_SET(QPX_SQA_VALUE, nr_wqes));
+}
+
+static inline void ehea_update_rq3a(struct ehea_qp *qp, u16 nr_wqes)
+{
+ struct h_epa epa = qp->epas.kernel;
+ epa_store_acc(epa, QPTEMM_OFFSET(qpx_rq3a),
+ EHEA_BMASK_SET(QPX_RQ1A_VALUE, nr_wqes));
+}
+
+static inline void ehea_update_rq2a(struct ehea_qp *qp, u16 nr_wqes)
+{
+ struct h_epa epa = qp->epas.kernel;
+ epa_store_acc(epa, QPTEMM_OFFSET(qpx_rq2a),
+ EHEA_BMASK_SET(QPX_RQ1A_VALUE, nr_wqes));
+}
+
+static inline void ehea_update_rq1a(struct ehea_qp *qp, u16 nr_wqes)
+{
+ struct h_epa epa = qp->epas.kernel;
+ epa_store_acc(epa, QPTEMM_OFFSET(qpx_rq1a),
+ EHEA_BMASK_SET(QPX_RQ1A_VALUE, nr_wqes));
+}
+
+static inline void ehea_update_feca(struct ehea_cq *cq, u32 nr_cqes)
+{
+ struct h_epa epa = cq->epas.kernel;
+ epa_store_acc(epa, CQTEMM_OFFSET(cqx_feca),
+ EHEA_BMASK_SET(CQX_FECADDER, nr_cqes));
+}
+
+static inline void ehea_reset_cq_n1(struct ehea_cq *cq)
+{
+ struct h_epa epa = cq->epas.kernel;
+ epa_store_cq(epa, cqx_n1,
+ EHEA_BMASK_SET(CQX_N1_GENERATE_COMP_EVENT, 1));
+}
+
+static inline void ehea_reset_cq_ep(struct ehea_cq *my_cq)
+{
+ struct h_epa epa = my_cq->epas.kernel;
+ epa_store_acc(epa, CQTEMM_OFFSET(cqx_ep),
+ EHEA_BMASK_SET(CQX_EP_EVENT_PENDING, 0));
+}
+
+#endif /* __EHEA_HW_H__ */
^ permalink raw reply
* [2.6.19 PATCH 6/7] ehea: eHEA Makefile
From: Jan-Bernd Themann @ 2006-08-22 12:56 UTC (permalink / raw)
To: netdev
Cc: Thomas Klein, Jan-Bernd Themann, linux-kernel, linux-ppc,
Christoph Raisch, Marcus Eder
Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
drivers/net/ehea/Makefile | 7 +++++++
1 file changed, 7 insertions(+)
--- linux-2.6.18-rc4-git1-orig/drivers/net/ehea/Makefile 1969-12-31 16:00:00.000000000 -0800
+++ kernel/drivers/net/ehea/Makefile 2006-08-22 06:05:26.965093280 -0700
@@ -0,0 +1,7 @@
+#
+# Makefile for the eHEA ethernet device driver for IBM eServer System p
+#
+
+ehea-y = ehea_main.o ehea_phyp.o ehea_qmr.o ehea_ethtool.o ehea_phyp.o
+obj-$(CONFIG_EHEA) += ehea.o
+
^ permalink raw reply
* [2.6.19 PATCH 7/7] ehea: Makefile & Kconfig
From: Jan-Bernd Themann @ 2006-08-22 12:57 UTC (permalink / raw)
To: netdev
Cc: Thomas Klein, Jan-Bernd Themann, linux-kernel, linux-ppc,
Christoph Raisch, Marcus Eder
Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
drivers/net/Kconfig | 9 +++++++++
drivers/net/Makefile | 1 +
2 files changed, 10 insertions(+)
diff -Nurp -X dontdiff linux-2.6.18-rc4-git1/drivers/net/Kconfig patched_kernel/drivers/net/Kconfig
--- linux-2.6.18-rc4-git1/drivers/net/Kconfig 2006-08-06 11:20:11.000000000 -0700
+++ patched_kernel/drivers/net/Kconfig 2006-08-22 06:00:49.545435280 -0700
@@ -2277,6 +2277,15 @@ config CHELSIO_T1
To compile this driver as a module, choose M here: the module
will be called cxgb.
+config EHEA
+ tristate "eHEA Ethernet support"
+ depends on IBMEBUS
+ ---help---
+ This driver supports the IBM pSeries eHEA ethernet adapter.
+
+ To compile the driver as a module, choose M here. The module
+ will be called ehea.
+
config IXGB
tristate "Intel(R) PRO/10GbE support"
depends on PCI
diff -Nurp -X dontdiff linux-2.6.18-rc4-git1/drivers/net/Makefile patched_kernel/drivers/net/Makefile
--- linux-2.6.18-rc4-git1/drivers/net/Makefile 2006-08-06 11:20:11.000000000 -0700
+++ patched_kernel/drivers/net/Makefile 2006-08-22 05:53:59.254861851 -0700
@@ -10,6 +10,7 @@ obj-$(CONFIG_E1000) += e1000/
obj-$(CONFIG_IBM_EMAC) += ibm_emac/
obj-$(CONFIG_IXGB) += ixgb/
obj-$(CONFIG_CHELSIO_T1) += chelsio/
+obj-$(CONFIG_EHEA) += ehea/
obj-$(CONFIG_BONDING) += bonding/
obj-$(CONFIG_GIANFAR) += gianfar_driver.o
^ permalink raw reply
* Re: [2.6.19 PATCH 3/7] ehea: queue management
From: Arnd Bergmann @ 2006-08-22 14:01 UTC (permalink / raw)
To: Jan-Bernd Themann
Cc: Thomas Klein, Jan-Bernd Themann, netdev, linux-kernel, linux-ppc,
Christoph Raisch, Marcus Eder
In-Reply-To: <200608221453.49667.ossthema@de.ibm.com>
T24gVHVlc2RheSAyMiBBdWd1c3QgMjAwNiAxNDo1MywgSmFuLUJlcm5kIFRoZW1hbm4gd3JvdGU6
Cj4gK6CgoKCgoKB1NjQgcnBhZ2UgPSAwOwo+ICugoKCgoKCgaW50IHJldDsKPiAroKCgoKCgoGlu
dCBjbnQgPSAwOwo+ICugoKCgoKCgdm9pZCAqdnBhZ2UgPSBOVUxMOwo+ICsKPiAroKCgoKCgoHJl
dCA9IGh3X3F1ZXVlX2N0b3IoaHdfcXVldWUsIG5yX3BhZ2VzLCBFSEVBX1BBR0VTSVpFLCB3cWVf
c2l6ZSk7Cj4gK6CgoKCgoKBpZiAocmV0KQo+ICugoKCgoKCgoKCgoKCgoKByZXR1cm4gcmV0Owo+
ICsKPiAroKCgoKCgoGZvciAoY250ID0gMDsgY250IDwgbnJfcGFnZXM7IGNudCsrKSB7Cj4gK6Cg
oKCgoKCgoKCgoKCgoHZwYWdlID0gaHdfcXBhZ2VpdF9nZXRfaW5jKGh3X3F1ZXVlKTsKPiAroKCg
oKCgoKCgoKCgoKCgaWYgKCF2cGFnZSkgewo+ICugoKCgoKCgoKCgoKCgoKCgoKCgoKCgoGVoZWFf
ZXJyb3IoImh3X3FwYWdlaXRfZ2V0X2luYyBmYWlsZWQiKTsKPiAroKCgoKCgoKCgoKCgoKCgoKCg
oKCgoKBnb3RvIHFwX2FsbG9jX3JlZ2lzdGVyX2V4aXQwOwo+ICugoKCgoKCgoKCgoKCgoKB9Cj4g
K6CgoKCgoKCgoKCgoKCgoHJwYWdlID0gdmlydF90b19hYnModnBhZ2UpOwoKQXMgc29tZW9uZSBt
ZW50aW9uZWQgYmVmb3JlLCB0aGUgaW5pdGlhbGl6YXRpb24gdG8gMCBvciBOVUxMCmlzIHBvaW50
bGVzcyBoZXJlLCBhcyB0aGUgdmFyaWFibGVzIGFyZSBhbHdheXMgYXNzaWduZWQgYmVmb3JlCnRo
ZXkgYXJlIHVzZWQuIFRoZXJlIGFyZSBhIG51bWJlciBvZiBvdGhlciBwbGFjZXMgaW4geW91cgpj
b2RlIHRoYXQgZG8gc2ltaWxhciB0aGluZ3MsIHlvdSBzaG91bGQgcHJvYmFibHkgZ28gdGhyb3Vn
aAp0aGVzZSBhbmQgcmVtb3ZlIHRoZSBpbml0aWFsaXplcnMuCgpJZiB5b3UgaW5kZWVkIG5lZWQg
c29tZXRoaW5nIHRvIGJlIGluaXRpYWxpemVkLCBpdCBpcyBnb29kIHByYWN0aWNlCnRvIGRvIHRo
ZSBpbml0aWFsaXphdGlvbiBhcyBsYXRlIGFzIHBvc3NpYmxlLCBlLmcuCgoJaW50IGZvbzsKCS4u
LgoJZm9vID0gMDsKCWRvX2Zvbyhmb28pOwoKdG8gbWFrZSBpdCBjbGVhciB0aGF0IHlvdSBoYXZl
IGEgcmVhc29uIHRvIGluaXRpYWxpemUgaXQuCgoJQXJuZCA8PjwK
^ permalink raw reply
* Re: ioremap() fails for >64 MB
From: Matt Porter @ 2006-08-22 14:22 UTC (permalink / raw)
To: Phil.Nitschke; +Cc: linuxppc-embedded
In-Reply-To: <1156232469.26041.19.camel@caxton.int.avalon.com.au>
On Tue, Aug 22, 2006 at 05:11:09PM +0930, Phil Nitschke wrote:
> Hi all,
>
> I have 2 GB memory on a 7448 processor, and want to reserve a huge chunk
> of it at boot-time, then ioremap() it into the kernel space inside a
> device driver. So far I've succeeded with 64 MB, but can't go any
> higher, as mm/vmalloc.c tells me: "allocation failed: out of vmalloc
> space - use vmalloc=<size> to increase size."
>
> So I tried adding a vmalloc line to the kernel command line as follows:
> Kernel cmd line: root=/dev/nfs rw mem=1920M vmalloc=1024M nfsroot=...
Yeah, that suggestion is bogus. That option can't help with getting
more vmalloc space in this case.
> So the vmalloc=<size> argument has made no difference. What do I need
> to do to make this work?
Go to the "Advanced setup" menu. There's a number of options to provide
fine-grained control of the PPC kernel virtual address space. The key
here is that you have lots of RAM. By default 768MB will be mapped into
kernel lowmem space. This is mapped from 0xc0000000-0xefffffff. You
probably have highmem on (I hope), so there is a highmem pool at
0xfe000000. Your vmalloc space should start at 0xf1000000 (16 MB offset
past end of lowmem). Any io_block_map() calls will further constrain your
vmalloc space below the highmem pool. I imagine you have stuff
permanently mapped that way down through about 0xf6000000 which would
leave just about around 64MB+ for vmalloc space.
The quick test is to modify the "Set maximum low memory" option to
0x20000000 (512MB). This should immediately give you and additional
256MB of vmalloc space as the vmalloc range will now start at
0xe1000000. If that works to allow a 128MB ioremap and you still need
much bigger ioremaps, you can also set "virtual address of kernel base"
down to 0xa0000000 or 0x80000000.
That said, why don't you just use alloc_bootmem() to reserve memory
for your driver at boot time? Then there's no need to bother with
ioremap for your driver then. Just save the pointer to your reserved
area somewhere and then use the space in your driver. A lot of people
use this approach for unusual cases like this. If you need something
dynamic (i.e. with cmdline control) alloc, then bigphysarea is basically
a wrapper around bootmem allocation.
-Matt
^ permalink raw reply
* TEMAC problem on ML403 with U-boot.
From: Ming Liu @ 2006-08-22 14:18 UTC (permalink / raw)
To: lombardo; +Cc: linuxppc-embedded
Dear Frank,
In your ML403 design which is booted by U-boot, do you use the normal
10/100M Enet MAC or TEMAC? Is TEMAC supported by U-Boot 1.1.4? In my design
I use TEMAC and it works well when I boot my Linux directly using Xilinx
EDK bootloader. However it fails when using U-boot......
Thanks for your telling.
Regards
Ming
_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
^ permalink raw reply
* Re: [2.6.19 PATCH 3/7] ehea: queue management
From: Jan-Bernd Themann @ 2006-08-22 13:51 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Thomas Klein, Jan-Bernd Themann, netdev, linux-kernel, linux-ppc,
Christoph Raisch, Marcus Eder
In-Reply-To: <200608221601.24882.arnd.bergmann@de.ibm.com>
Hi,
On Tuesday 22 August 2006 16:01, Arnd Bergmann wrote:
> > +=A0=A0=A0=A0=A0=A0=A0u64 rpage =3D 0;
> > +=A0=A0=A0=A0=A0=A0=A0int ret;
> > +=A0=A0=A0=A0=A0=A0=A0int cnt =3D 0;
> > +=A0=A0=A0=A0=A0=A0=A0void *vpage =3D NULL;
> > +
> > +=A0=A0=A0=A0=A0=A0=A0ret =3D hw_queue_ctor(hw_queue, nr_pages, EHEA_PA=
GESIZE, wqe_size);
> > +=A0=A0=A0=A0=A0=A0=A0if (ret)
> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0return ret;
> > +
> > +=A0=A0=A0=A0=A0=A0=A0for (cnt =3D 0; cnt < nr_pages; cnt++) {
> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0vpage =3D hw_qpageit_get_=
inc(hw_queue);
> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (!vpage) {
> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0e=
hea_error("hw_qpageit_get_inc failed");
> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0g=
oto qp_alloc_register_exit0;
> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0}
> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0rpage =3D virt_to_abs(vpa=
ge);
>=20
> As someone mentioned before, the initialization to 0 or NULL
> is pointless here, as the variables are always assigned before
> they are used. There are a number of other places in your
> code that do similar things, you should probably go through
> these and remove the initializers.
>=20
> If you indeed need something to be initialized, it is good practice
> to do the initialization as late as possible, e.g.
>=20
> int foo;
> ...
> foo =3D 0;
> do_foo(foo);
>=20
> to make it clear that you have a reason to initialize it.
>=20
> Arnd <><
>=20
Agreed. We started to remove some but apparrently not all.
We'll go through the code and remove them where possible.
^ permalink raw reply
* Artesyn PM/PPC 750 U-Boot/Linux support? Datasheet?
From: mahesh.roy @ 2006-08-22 14:15 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1.1: Type: text/plain, Size: 1011 bytes --]
hi man
i saw ur mail and wanted the datasheet of ppc 750 board.
so if u can kindly mail it me i ll be grateful to u.
Mahesh Roy
Designation : Project Engineer
Extn : 74162
Direct : 0484-3054162
Mobile : +91-9895572846
(8:30 am to 9:00 pm)
(MON to FRI)
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
[-- Attachment #1.2: Type: text/html, Size: 2715 bytes --]
[-- Attachment #2: aleabanr.gif --]
[-- Type: image/gif, Size: 7830 bytes --]
[-- Attachment #3: Leaves Bkgrd.jpg --]
[-- Type: image/jpeg, Size: 4389 bytes --]
^ permalink raw reply
* Re: ML40X, ppc 405 crash
From: Wade Maxfield @ 2006-08-22 14:51 UTC (permalink / raw)
To: alva; +Cc: ppc
In-Reply-To: <000001c6c5d9$184dba00$8500a8c0@dc.roysiu.servebbs.com>
[-- Attachment #1: Type: text/plain, Size: 8024 bytes --]
I SINCERELY APOLOGIZE!!!! I MADE A MISTAKE!
I sent this email to the wrong address! I've got to look to see how I did
this.
please ignore this message!!
thanks,
wade
On 8/22/06, alva <vows_siu@yahoo.com.hk> wrote:
>
> So can u access your NFS mapped partition? If you can access every FILEs
> on the partition, running updatedb ought to index the NFS partition also.
> Then "locate fixdep" is just to find the local indexed database and display
> the matched result --- I just don't understand the problem. Please state
> more what have you done in order to let us help you.
>
>
>
>
>
> -----Original Message-----
> *From:* linuxppc-embedded-bounces+vows_siu=yahoo.com.hk@ozlabs.org[mailto:
> linuxppc-embedded-bounces+vows_siu=yahoo.com.hk@ozlabs.org] *On Behalf Of
> *Wade Maxfield
> *Sent:* Tuesday, August 22, 2006 5:34 AM
> *To:* ppc
> *Subject:* ML40X, ppc 405 crash
>
>
>
>
> I was running NFS on ML40X. I did a "updatedb" and then immediately,
> "locate fixdep"
>
> I got the following crash
>
> root@ml403:/home/moduletest# updatedb
> locate fixdep
> eth0: Could not transmit buffer.
> eth0: Could not transmit buffer.
> eth0: Could not transmit buffer.
> Oops: kernel access of bad area, sig: 11 [#1]
> PREEMPT
> NIP: C01D0F74 LR: C01D0910 SP: C28B1930 REGS: c28b1880 TRAP: 0300 Not
> tainted
> MSR: 00029030 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
> DAR: 00000004, DSISR: 00800000
> TASK = c0b034c0[5097] 'frcode' THREAD: c28b0000
> Last syscall: 234
> GPR00: 00000000 C28B1930 C0B034C0 C35E3200 C03CC380 C276E810 000005E8
> C3CE8880
> GPR08: 00000002 00000000 C3CE890C 00000000 33003599 10018E04 100C3208
> C02DCE08
> GPR16: C00DB1CC C02DCE08 00000002 0000000A C28B1DF8 C02E0000 C02A0000
> C3A30940
> GPR24: 00000000 00000000 00000000 C3A30940 00000000 C35E3200 C3CE8880
> C03A8800
> NIP [c01d0f74] pfifo_fast_dequeue+0x40/0x74
> LR [c01d0910] qdisc_restart+0x30/0x2b4
> Call trace:
> [c01c1e94] dev_queue_xmit+0x264/0x318
> [c01dd8dc] ip_finish_output+0x140/0x2cc
> [c01dddb0] ip_queue_xmit+0x348/0x53c
> [c01ef628] tcp_transmit_skb+0x324/0x7f8
> [c01f05fc] tcp_write_xmit+0x14c/0x31c
> [c01ed360] __tcp_data_snd_check+0xc8/0xfc
> [c01ed9a4] tcp_rcv_established+0x2c0/0x8ac
> [c01f7250] tcp_v4_do_rcv+0x184/0x374
> [c01f7d9c] tcp_v4_rcv+0x95c/0xa4c
> [c01da000] ip_local_deliver+0x120/0x298
> [c01da86c] ip_rcv+0x400/0x508
> [c01c2614] netif_receive_skb+0x24c/0x2fc
> [c01c276c] process_backlog+0xa8/0x1a0
> [c01c2908] net_rx_action+0xa4/0x1cc
> [c001bef4] ___do_softirq+0x7c/0x114
> Kernel panic - not syncing: Aiee, killing interrupt handler!
> <0>Rebooting in 180 seconds..
>
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Here is the kernel build and boot information. (I use the demo compact
> flash disk image shipped with the ml403 as an intermediate. I've not yet
> been able to get a small enough build to fit on 412 meg using your tools.)
>
> Linux version 2.6.10_mvl401-ml40x (root@localhost.localdomain) (gcc
> version 3.4.3 (MontaV
> ista 3.4.3-25.0.107.0601076 2006-07-21)) #1 Fri Aug 18 14:43:45 CDT 2006
> Xilinx ML40x Reference System (Virtex-4 FX)
> Port by MontaVista Software, Inc. (source@mvista.com)
> Built 1 zonelists
> Kernel command line: console=ttyS0,115200 ip=on root=/dev/xsysace2 rw
> Xilinx INTC #0 at 0xD1000FC0 mapped to 0xFDFFEFC0
> PID hash table entries: 512 (order: 9, 8192 bytes)
> hr_time_init: arch_to_nsec = 6990506, nsec_to_arch = 1288490158
> Console: colour dummy device 80x25
> Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
> Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
> Memory: 61824k available (2244k kernel code, 640k data, 140k init, 0k
> highmem)
> Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
> spawn_desched_task(00000000)
> desched cpu_callback 3/00000000
> ksoftirqd started up.
> desched cpu_callback 2/00000000
> desched thread 0 started up.
> NET: Registered protocol family 16
> Registering platform device 'xilinx_emac.0'. Parent at platform
> Registering platform device 'xilinx_fb.0'. Parent at platform
> Registering platform device 'xilinx_sysace.0'. Parent at platform
> Registering platform device 'xilinx_iic.0'. Parent at platform
> Registering platform device 'xilinx_gpio.0'. Parent at platform
> Registering platform device 'xilinx_gpio.1'. Parent at platform
> Registering platform device 'xilinx_gpio.2'. Parent at platform
> Registering platform device 'xilinx_ps2.0'. Parent at platform
> Registering platform device 'xilinx_ps2.1'. Parent at platform
> Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
> Console: switching to colour frame buffer device 80x30
> xgpio #0 at 0x90000000 mapped to 0xC505C000
> xgpio #1 at 0x90001000 mapped to 0xC505E000
> xgpio #2 at 0x90002000 mapped to 0xC5060000
> xilinx_ps2 #0 at 0xA9000000 mapped to 0xC5062000
> xilinx_ps2 #1 at 0xA9001000 mapped to 0xC5064000
> Serial: 8250/16550 driver $Revision: 1.90 $ 5 ports, IRQ sharing disabled
> Registering platform device 'serial8250'. Parent at platform
> ttyS0 at MMIO 0x0 (irq = 9) is a 16450
> io scheduler noop registered
> io scheduler anticipatory registered
> io scheduler deadline registered
> io scheduler cfq registered
> RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
> loop: loaded (max 8 devices)
> elevator: using anticipatory as default io scheduler
> System ACE at 0xCF000000 mapped to 0xC5066000, irq=3, 500472KB
> xsysace: xsysace1 xsysace2
> PPP generic driver version 2.4.2
> PPP Deflate Compression module registered
> NET: Registered protocol family 24
> xemac 0: using fifo mode.
> eth0: Xilinx EMAC #0 at 0x60000000 mapped to 0xC5068000, irq=0
> i2c /dev entries driver
> xilinx_iic.0 #0 at 0xA8000000 mapped to 0xC506E000, irq=6
> mice: PS/2 mouse device common for all mice
> atkbd.c: keyboard reset failed on xilinxps2/serio0
> atkbd.c: keyboard reset failed on xilinxps2/serio1
> NET: Registered protocol family 2
> IP: routing cache hash table of 512 buckets, 4Kbytes
> TCP: Hash tables configured (established 4096 bind 8192)
> NET: Registered protocol family 1
> NET: Registered protocol family 17
> Sending DHCP requests ., OK
> IP-Config: Got DHCP answer from 0.0.0.0, my address is 172.17.6.49
> IP-Config: Complete:
> device=eth0, addr= 172.17.6.49, mask=255.255.254.0, gw=172.17.7.254,
> host=172.17.6.49, domain= precisiondrilling.com, nis-domain=(none),
> bootserver=0.0.0.0, rootserver=0.0.0.0, rootpath=
> EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
> VFS: Mounted root (ext2 filesystem).
> Freeing unused kernel memory: 140k init
> INIT: version 2.78 booting
> Activating swap...
> Checking all file systems...
> fsck 1.27 (8-Mar-2002)
> Calculating module dependencies... depmod: QM_MODULES: Function not
> implemented
>
> done.
> Loading modules:
> modprobe: QM_MODULES: Function not implemented
>
> Mounting local filesystems...
> nothing was mounted
> Cleaning: /etc/network/ifstate.
> Setting up IP spoofing protection: rp_filter.
> Disable TCP/IP Explicit Congestion Notification: done.
> Configuring network interfaces: done.
> Starting portmap daemon: portmap.
> Starting dhcpcd on eth0
> Running ntpdate to synchronize clock.
> Cleaning: /tmp /var/lock /var/rundhcpcd[775]: dhcpConfig: ioctl SIOCADDRT:
> File exists
>
> .
> INIT: Entering runlevel: 3
> Starting kernel log daemon: klogd.
> Starting system log daemon: syslogd.
> Hostname: ml403.
> Creating barrier for shutdown
> Starting X11 session for user 'linux'
> Welcome to the ML403 Evaluation Board
> (C) 2004 Xilinx, Inc - Systems Engineering Group
>
>
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.11.4/424 - Release Date: 2006/8/21
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.11.4/424 - Release Date: 2006/8/21
>
[-- Attachment #2: Type: text/html, Size: 12346 bytes --]
^ permalink raw reply
* [PATCH] make checkstack work with ARCH=powerpc
From: Johannes Berg @ 2006-08-22 14:57 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Paul Mackerras
This patch adds 'powerpc' architecture support to checkstack.pl.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
--- wireless-dev.orig/scripts/checkstack.pl 2006-08-22 15:47:37.000000000 +0200
+++ wireless-dev/scripts/checkstack.pl 2006-08-22 15:47:40.000000000 +0200
@@ -62,6 +62,8 @@ my (@stack, $re, $x, $xs);
} elsif ($arch eq 'ppc64') {
#XXX
$re = qr/.*stdu.*r1,-($x{1,8})\(r1\)/o;
+ } elsif ($arch eq 'powerpc') {
+ $re = qr/.*st[dw]u.*r1,-($x{1,8})\(r1\)/o;
} elsif ($arch =~ /^s390x?$/) {
# 11160: a7 fb ff 60 aghi %r15,-160
$re = qr/.*ag?hi.*\%r15,-(([0-9]{2}|[3-9])[0-9]{2})/o;
^ permalink raw reply
* Re: SystemAce Driver.
From: sudheer @ 2006-08-22 15:07 UTC (permalink / raw)
To: sudheer; +Cc: raja_chidambaram82, linuxppc-embedded
In-Reply-To: <44DC5F21.8000906@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4720 bytes --]
Hello Raja,
We too are working on customized board with amcc 440SPe processor &
xilinx System Ace controller. The System Ace controller is connected to
compact flash driver.
We use u-boot 1.1.2 as bootloader & linux kernel - 2.6.16-2.
System ace is connected to amcc440SPE processor via GPIO and External
Peripheral Bus Controller(EBC).
While booting the linux, it crashes when i am trying to
access(read/write) a system ace register.
In the u-boot though i have support, as of now i am not doing anything
with system ace as it not required now.
In u-boot/include/configs/custom_board.h, i could see
#define CFG_ACE_BASE 0xe0000000 /* Xilinx ACE controller
- Compact Flash */
So i have used this address in Linux driver to to ioremap to access
the ace registers. Though i could do ioremap, it crashes while booting
exactly when it is trying the access any ace register.
I doubt with the address i have used . But could not get any clue from
the docs given.
I want to know how to access the system ace registers and how to get
the address to ioremap. Please let me know if any details required and
also if i am missing any fundamentals.
Thanks & Regards
Sudheer
sudheer wrote:
> Hi Ameet,
>
> Firstly, thanks for the mail.
>
> I am able to compile the linux-2.6.16 and got the ace support files with
> the patch.
> While compiling got some errors with xparameters, but am rectify them.
>
> I need to wait for the hardware to test the source.
>
> Thanks & Regards
> Sudheer
>
>
> Ameet Patil wrote:
>
>> Hi Sudheer,
>> Frank has already answered your questions. If you have any problems
>> with the SysAce patch... do let me know. I have written a small
>> tutorial here if it helps...
>>
>> http://linux.get2knowmore.com
>>
>>
>> -Ameet
>>
>> sudheer wrote:
>>
>>> Hello Ameet Patil
>>>
>>> I am looking for linux kernel source 2.6.16 with system ace
>>> controller support. I downloaded the linux-2.6.16 and linux-2.6.17-1
>>> source from kernel.org but could not find any files related to system
>>> ace controller ( No xilinx_sysace directory in drivers/block/) . I
>>> have checked penguinppc.org also but could not get it.
>>>
>>> Can you please send to me the link where i could download the
>>> linuxppc-2.6.16 source with system ace support.
>>>
>>> Thanks & Regards
>>> Sudheer
>>>
>>> Ameet Patil wrote:
>>>
>>>> Hi Raja,
>>>> I have ported the Xilinx System ACE driver to 2.6 kernel. Find
>>>> the latest one here:
>>>> http://www.cs.york.ac.uk/rtslab/demos/amos/xupv2pro/patches/linuxppc-2.6.17.1-sysace-1.2.patch
>>>>
>>>>
>>>> NOTE: this patch wouldn't work if you are using the TEMAC driver. In
>>>> which case use the -after-TEMAC patch found in the patches folder
>>>> above.
>>>>
>>>> Check the following discussions (threads) for more details:
>>>> 1. "Xilinx SystemACE driver for 2.6"
>>>> 2. "Xilinx BSP for linux 2.6"
>>>> 3. "Kernel hangs after "Now booting the kernel"."
>>>>
>>>> cheers,
>>>> -Ameet
>>>>
>>>> Raja Chidambaram wrote:
>>>>
>>>>
>>>>> Hi all,
>>>>> We are working on customized board with amcc 440SPe
>>>>> processor & xilinx System Ace controller. The System
>>>>> Ace controller is connected to compact flash driver.
>>>>>
>>>>> We use u-boot 1.2 as bootloader & linux kernel
>>>>> 2.6.16-2.
>>>>>
>>>>> On the process the u-boot is able to detect compact
>>>>> flash through Xilinx SystemAce controller & able to
>>>>> load the kernel image into compact flash.But when the
>>>>> linux boot's up it not able to detect the System Ace
>>>>> controller or compact flash.
>>>>>
>>>>> Note:we need to have the root file system in compact
>>>>> flash.
>>>>>
>>>>> Is their any drivers available for SystemAce
>>>>> controller on linux 2.6,if their how to get it.please
>>>>> help me in this
>>>>> with regards
>>>>> raja
>>>>>
>>>>>
>>>>>
>>>>> __________________________________________________
>>>>> Do You Yahoo!?
>>>>> Tired of spam? Yahoo! Mail has the best spam protection around
>>>>> http://mail.yahoo.com _______________________________________________
>>>>> Linuxppc-embedded mailing list
>>>>> Linuxppc-embedded@ozlabs.org
>>>>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>>>>>
>>>>>
>>>>>
>>>> _______________________________________________
>>>> Linuxppc-embedded mailing list
>>>> Linuxppc-embedded@ozlabs.org
>>>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>>>>
>>>>
>>>>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>
[-- Attachment #2: Type: text/html, Size: 5974 bytes --]
^ permalink raw reply
* Deactivate serial console?
From: Lee Revell @ 2006-08-22 16:18 UTC (permalink / raw)
To: ppc
We're developing a PPC440 based system for a customer who requires that
it be possible to disable/enable the serial console without a reboot.
Is this possible without hacking the kernel?
Lee
^ permalink raw reply
* Re: [PATCH ] powerpc: Add tsi108/9 and non standard mpic support
From: Adrian Cox @ 2006-08-22 17:15 UTC (permalink / raw)
To: Zang Roy-r61911
Cc: Yang Xin-Xin-r48390, Paul Mackerras, Alexandre.Bounine,
linuxppc-dev list
In-Reply-To: <7EA18FDD2DC2154AA3BD6D2F22A62A0E19E353@zch01exm23.fsl.freescale.net>
On Tue, 2006-08-22 at 18:07 +0800, Zang Roy-r61911 wrote:
> The patch adds new hardware information table for mpic. This
> enables mpic code to deal with mpic controller with
> hardware behavior difference.
> + TSI108_CPU_BASE,
> + TSI108_CPU_STRIDE,
> + TSI108_CPU_IPI_DISPATCH_0,
> + TSI108_CPU_IPI_DISPATCH_STRIDE,
> + TSI108_CPU_CURRENT_TASK_PRI,
This isn't actually enough to get SMP working on a Tsi109, as the Tsi109
mailbox and doorbell registers don't behave like standard MPIC IPIs.
So far I've experimented with a hack that uses the doorbell registers:
Doorbell 0 delivers IPI 0 to processor 0
Doorbell 1 delivers IPI 1 to processor 0
Doorbell 2 delivers IPI 0 to processor 1
Doorbell 3 delivers IPI 1 to processor 1
I don't support IPI 2 and IPI 3, though it would be possible to use the
mailbox registers in a similar scheme. This approach works, but I've not
worked out how to cleanly integrate this with the rest of the MPIC
driver, and won't have any time to do this in the near future.
--
Adrian Cox <adrian@humboldt.co.uk>
^ permalink raw reply
* linux 2.4.33 build question
From: Don Russell @ 2006-08-22 17:21 UTC (permalink / raw)
To: linuxppc-embedded
Hi,
Id like to build the 2.4.33 version of Linux for the ads8272 board but
I get an error that says I must use an older gcc version .
The error comes from init/main.c and rejects anything greater than 3.
The readme says to use the 2.95 compiler.
I downloaded the ELDK 3.0 and it failed also. (Its actually 3.1) There
doesn't seem to be a 2.95 distro in the ELDK. So naturally I tried
taking out the version check and of course it failed elswhere in the build.
If gcc 2.95 is truly required for building 2.4 , where can I get the
toolchain, or do I have to build it ?
Does this linux version (2.4) also require an older u-boot?
Thanks
^ permalink raw reply
* RE: Deactivate serial console?
From: Lee Revell @ 2006-08-22 17:55 UTC (permalink / raw)
To: Howard, Marc; +Cc: ppc
In-Reply-To: <91B22F93A880FA48879475E134D6F0BE02EEA435@CA1EXCLV02.adcorp.kla-tencor.com>
On Tue, 2006-08-22 at 10:46 -0700, Howard, Marc wrote:
> stty -F /dev/console 0
Thanks - so if I read the man page correctly the 0 is interpreted as 0
baud, and I would re-enable it by "stty -F /dev/console 115200"?
Lee
^ permalink raw reply
* RE: Deactivate serial console?
From: Lee Revell @ 2006-08-22 17:57 UTC (permalink / raw)
To: Howard, Marc; +Cc: ppc
In-Reply-To: <91B22F93A880FA48879475E134D6F0BE02EEA435@CA1EXCLV02.adcorp.kla-tencor.com>
On Tue, 2006-08-22 at 10:46 -0700, Howard, Marc wrote:
> "stty -F /dev/console 0" or the equivalent in code does the trick for me
> but it might be implementation dependent.
>
That works for disabling the console but now I can't re-enable it. stty
-F /dev/console 115200 does not restore serial console access.
Lee
> Marc W. Howard
>
> > -----Original Message-----
> > From:
> > linuxppc-embedded-bounces+marc.howard=kla-tencor.com@ozlabs.or
> g [mailto:linuxppc-embedded-bounces+marc.howard=kla->
> tencor.com@ozlabs.org] On Behalf Of Lee Revell
> > Sent: Tuesday, August 22, 2006 9:19 AM
> > To: ppc
> > Subject: Deactivate serial console?
> >
> > We're developing a PPC440 based system for a customer who
> > requires that
> > it be possible to disable/enable the serial console without a reboot.
> > Is this possible without hacking the kernel?
> >
> > Lee
> >
> > _______________________________________________
> > Linuxppc-embedded mailing list
> > Linuxppc-embedded@ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> >
>
^ permalink raw reply
* RE: Artesyn PM/PPC 750 U-Boot/Linux support? Datasheet?
From: alva @ 2006-08-22 18:08 UTC (permalink / raw)
To: mahesh.roy, linuxppc-embedded
In-Reply-To: <4F626504A2D3BD4FB5D2551E6DC2F2BB3C3215@BLR-EC-MBX01.wipro.com>
[-- Attachment #1.1: Type: text/plain, Size: 1852 bytes --]
You can find nearly all the power pc datasheet from IBM (ibm.com) own
web site. I think the most important feature of this 750 series ppc is
its capability to run 4 instructions per cycle and have built-in FPU.
-----Original Message-----
From: linuxppc-embedded-bounces+vows_siu=yahoo.com.hk@ozlabs.org
[mailto:linuxppc-embedded-bounces+vows_siu=yahoo.com.hk@ozlabs.org] On
Behalf Of mahesh.roy@wipro.com
Sent: Tuesday, August 22, 2006 10:16 PM
To: linuxppc-embedded@ozlabs.org
Subject: Artesyn PM/PPC 750 U-Boot/Linux support? Datasheet?
hi man
i saw ur mail and wanted the datasheet of ppc 750 board.
so if u can kindly mail it me i ll be grateful to u.
Mahesh Roy
Designation : Project Engineer
Extn : 74162
Direct : 0484-3054162
Mobile : +91-9895572846
(8:30 am to 9:00 pm)
(MON to FRI)
The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.
www.wipro.com
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.4/424 - Release Date:
2006/8/21
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.4/424 - Release Date:
2006/8/21
[-- Attachment #1.2: Type: text/html, Size: 7687 bytes --]
[-- Attachment #2: image001.jpg --]
[-- Type: image/jpeg, Size: 4389 bytes --]
[-- Attachment #3: image002.gif --]
[-- Type: image/gif, Size: 7830 bytes --]
^ permalink raw reply
* Re: Artesyn PM/PPC 750 U-Boot/Linux support? Datasheet?
From: David Hawkins @ 2006-08-22 18:15 UTC (permalink / raw)
To: alva; +Cc: mahesh.roy, linuxppc-embedded
In-Reply-To: <000001c6c615$f765e1e0$8500a8c0@dc.roysiu.servebbs.com>
alva wrote:
> You can find nearly all the power pc datasheet from IBM (ibm.com) own
> web site. I think the most important feature of this 750 series ppc is
> its capability to run 4 instructions per cycle and have built-in FPU.
>
What he wanted was the user manual.
The product from Artesyn is end-of-life, so when I asked,
they gave me the datasheet and schematics for the board.
You can buy the modules on eBay for about $50ea.
I've sent him links to the documents.
If anyone wants them, just ask :)
Dave
^ permalink raw reply
* RE: Deactivate serial console?
From: Lee Revell @ 2006-08-22 18:27 UTC (permalink / raw)
To: Howard, Marc; +Cc: ppc
In-Reply-To: <1156269458.10565.182.camel@mindpipe>
On Tue, 2006-08-22 at 13:57 -0400, Lee Revell wrote:
> On Tue, 2006-08-22 at 10:46 -0700, Howard, Marc wrote:
> > "stty -F /dev/console 0" or the equivalent in code does the trick for me
> > but it might be implementation dependent.
> >
>
> That works for disabling the console but now I can't re-enable it. stty
> -F /dev/console 115200 does not restore serial console access.
OK, for the benefit of the list readers, this solution does work.
However the disable command must be issued from telnet/SSH prompt - if
issued from the a serial console, the serial console locks up and cannot
be restored without a reboot.
Lee
^ permalink raw reply
* RE: Deactivate serial console?
From: Howard, Marc @ 2006-08-22 17:46 UTC (permalink / raw)
To: Lee Revell, ppc
"stty -F /dev/console 0" or the equivalent in code does the trick for me
but it might be implementation dependent.
Marc W. Howard
> -----Original Message-----
> From:=20
> linuxppc-embedded-bounces+marc.howard=3Dkla-tencor.com@ozlabs.or
g [mailto:linuxppc-embedded-bounces+marc.howard=3Dkla->
tencor.com@ozlabs.org] On Behalf Of Lee Revell
> Sent: Tuesday, August 22, 2006 9:19 AM
> To: ppc
> Subject: Deactivate serial console?
>=20
> We're developing a PPC440 based system for a customer who=20
> requires that
> it be possible to disable/enable the serial console without a reboot.
> Is this possible without hacking the kernel?
>=20
> Lee
>=20
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>=20
^ permalink raw reply
* Re: boot problems on pseries
From: dtutty @ 2006-08-22 16:50 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20060821145624.GA30464@aepfle.de>
On Mon, Aug 21, 2006 at 04:56:24PM +0200, Olaf Hering wrote:
> On Sun, Aug 20, 2006 at 01:00:56PM -0400, dtutty@porchlight.ca wrote:
>
> > Does anyone have a link to a boot/root floppy set that will work?
>
> openSuSE will likely work, but do you have any details of the boot
> failures and what exactly you have tried so far?
>
>
Boot failures:
1. CD not recognized as bootable, so use OF manually.
2. OF manually will boot yaboot.
3. yaboot doesn't find its config in the /etc directory
of the cd, nor in the / directory of the CD with the
yaboot executable.
4. when manually from yaboot attempt to boot a kernel
image, get either:
a) CLAIMED FAILED
b) incorrect ELF format
(something like that, I wasn't there
when the tech got that one)
c) not a valid kernel image
At no point do I get any indication that the linux kernel has had a
chance to try booting; it doesn't get that far.
Thanks,
I'll look at SuSE and see if there's a free-download of a boot floppy.
Doug.
^ permalink raw reply
* atomic operations in user space
From: Xupei Liang @ 2006-08-22 20:50 UTC (permalink / raw)
To: linuxppc-embedded
Hi,
On the PPC platform, can I use the atomic operations
defined in the kernel, e.g. atomic_add(),
atomic_dec(), etc. in the user space programs?
I compiled the following program:
#include <asm-ppc/atomic.h>
int main()
{
atomic_t atom;
atomic_add(1, &atom);
return (0);
}
I am able to compile it and the atomic_add seems to be
translated into the correct instructions. Can anybody
please confirm? Thanks.
Regards,
Terry Liang
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply
* Re: ioremap() fails for >64 MB
From: David H. Lynch Jr. @ 2006-08-22 21:05 UTC (permalink / raw)
To: Alex Zeffertt; +Cc: linuxppc-embedded
In-Reply-To: <44EAC56D.5020508@cambridgebroadband.com>
[-- Attachment #1: Type: text/plain, Size: 1550 bytes --]
is ioremap() failing or is vmalloc failing ?
ioremap should just assign a virtual address to a physical address -
does it actually allocate anything ?
I beleive I am ioremap()ing a greater than 64MB Flash ROM and I do
not think it is failing.
Alex Zeffertt wrote:
> Phil Nitschke wrote:
>
>> Hi all,
>>
>> I have 2 GB memory on a 7448 processor, and want to reserve a huge chunk
>> of it at boot-time, then ioremap() it into the kernel space inside a
>> device driver. So far I've succeeded with 64 MB, but can't go any
>> higher, as mm/vmalloc.c tells me: "allocation failed: out of vmalloc
>> space - use vmalloc=<size> to increase size."
>>
>>
>
> I remember reading in Linux Device Drivers that you can use the bigphysarea
> patch to allocate large memory, as long as you do it at boot time. It seems
> it's been ported to 2.6 too:
>
> http://lwn.net/Articles/111132/
>
> Alex
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
--
Dave Lynch DLA Systems
Software Development: Embedded Linux
717.627.3770 dhlii@dlasys.net http://www.dlasys.net
fax: 1.253.369.9244 Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.
"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein
[-- Attachment #2: Type: text/html, Size: 2435 bytes --]
^ permalink raw reply
* Re: [PATCH 2/2] uninorth: Add module param 'aperture' for aperture size
From: Benjamin Herrenschmidt @ 2006-08-22 22:17 UTC (permalink / raw)
To: Michel Dänzer; +Cc: linuxppc-dev, davej
In-Reply-To: <1156236954.16513.141.camel@thor.lorrainebruecke.local>
> > It's basically expected that we set it ourselves and a module option
> > doesn't seem like a terribly good idea to me...
>
> Well, wasn't it you who suggested this? :)
Possibly, I don't always have good ideas :) I would rather have that
size be configured by the client driver... oh well, let's workaround
that for now by using a better default _and_ the module option.
> > Maybe we should just have the driver default to something more sensible
> > in addition to what AGPSize comes from userland ? like 64M ?
>
> Might be a good idea.
>
>
^ permalink raw reply
* Re: atomic operations in user space
From: Arnd Bergmann @ 2006-08-22 22:23 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: Xupei Liang
In-Reply-To: <20060822205024.98433.qmail@web36105.mail.mud.yahoo.com>
Am Tuesday 22 August 2006 22:50 schrieb Xupei Liang:
> #include <asm-ppc/atomic.h>
>
> int main()
> {
> =A0=A0=A0=A0=A0=A0=A0=A0atomic_t atom;
>
> =A0=A0=A0=A0=A0=A0=A0=A0atomic_add(1, &atom);
> =A0=A0=A0=A0=A0=A0=A0=A0return (0);
> }
>
> I am able to compile it and the atomic_add seems to be
> translated into the correct instructions. Can anybody
> please confirm? Thanks.
No, you can't do that, the kernel headers are not generally
working in user space, recent kernel versions protect you
from doing this.
If you don't have a library providing you with atomic operations,
you can copy the inline functions from the kernel, which will
work fine, but require that your app is GPL licensed.
Arnd <><
^ 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