From a235ef2c632a096cdb2b02379c89b49e97faaaa4 Mon Sep 17 00:00:00 2001 From: Alex Bounine Date: Mon, 11 Feb 2008 14:33:40 -0500 Subject: Tsi108_eth: add missing linking to driver data Bug fix for tsi108_eth network driver. This patch adds missing linking to driver data. Signed-off-by: Alexandre Bounine Signed-off-by: Jeff Garzik --- drivers/net/tsi108_eth.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c index 35d15e85007..6f222d7e912 100644 --- a/drivers/net/tsi108_eth.c +++ b/drivers/net/tsi108_eth.c @@ -1629,6 +1629,7 @@ tsi108_init_one(struct platform_device *pdev) goto register_fail; } + platform_set_drvdata(pdev, dev); printk(KERN_INFO "%s: Tsi108 Gigabit Ethernet, MAC: %s\n", dev->name, print_mac(mac, dev->dev_addr)); #ifdef DEBUG -- cgit v1.2.3-18-g5258 From 6a87155a39f538f9d13cebf2c9b7c19bd41d7da9 Mon Sep 17 00:00:00 2001 From: Alex Bounine Date: Mon, 11 Feb 2008 14:35:26 -0500 Subject: Tsi108_eth: fix detection of 1000Mb mode Bug fix for tsi108_eth network driver. This patch fixes a problem with detection of 1000Mb speed. Signed-off-by: Alexandre Bounine Signed-off-by: Jeff Garzik --- drivers/net/tsi108_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c index 6f222d7e912..2e87876d662 100644 --- a/drivers/net/tsi108_eth.c +++ b/drivers/net/tsi108_eth.c @@ -1287,6 +1287,7 @@ static void tsi108_init_phy(struct net_device *dev) spin_lock_irqsave(&phy_lock, flags); } + data->mii_if.supports_gmii = mii_check_gmii_support(&data->mii_if); printk(KERN_DEBUG "PHY_STAT reg contains %08x\n", phyval); data->phy_ok = 1; data->init_media = 1; @@ -1584,7 +1585,6 @@ tsi108_init_one(struct platform_device *pdev) data->mii_if.phy_id = einfo->phy; data->mii_if.phy_id_mask = 0x1f; data->mii_if.reg_num_mask = 0x1f; - data->mii_if.supports_gmii = mii_check_gmii_support(&data->mii_if); data->phy = einfo->phy; data->phy_type = einfo->phy_type; -- cgit v1.2.3-18-g5258 From 85bbe2158340dafb060fc7fe55a8208fe08cae26 Mon Sep 17 00:00:00 2001 From: Alex Bounine Date: Mon, 11 Feb 2008 14:35:49 -0500 Subject: Tsi108_eth: remove not needed code Code clean-up for tsi108_eth network driver. This patch removes not needed dummy read and the corresponding comment. The PHY logic requires two reads from the status register to get current link status. This is done correctly inside mii_check_media(). Signed-off-by: Alexandre Bounine Signed-off-by: Jeff Garzik --- drivers/net/tsi108_eth.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c index 2e87876d662..5a730ba8b1a 100644 --- a/drivers/net/tsi108_eth.c +++ b/drivers/net/tsi108_eth.c @@ -297,18 +297,11 @@ static void tsi108_check_phy(struct net_device *dev) u32 speed; unsigned long flags; - /* Do a dummy read, as for some reason the first read - * after a link becomes up returns link down, even if - * it's been a while since the link came up. - */ - spin_lock_irqsave(&phy_lock, flags); if (!data->phy_ok) goto out; - tsi108_read_mii(data, MII_BMSR); - duplex = mii_check_media(&data->mii_if, netif_msg_link(data), data->init_media); data->init_media = 0; -- cgit v1.2.3-18-g5258 From b1aefe58c21de4265223b563ae923b50f4c4be08 Mon Sep 17 00:00:00 2001 From: Alex Bounine Date: Mon, 11 Feb 2008 14:36:12 -0500 Subject: Tsi108_eth: fix link recovery after disconnect Bug fix for tsi108_eth network driver. This patch fixes a problem with link recovery after connection was lost. Signed-off-by: Alexandre Bounine Signed-off-by: Jeff Garzik --- drivers/net/tsi108_eth.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c index 5a730ba8b1a..bc3848962bb 100644 --- a/drivers/net/tsi108_eth.c +++ b/drivers/net/tsi108_eth.c @@ -338,22 +338,21 @@ static void tsi108_check_phy(struct net_device *dev) TSI_WRITE(TSI108_MAC_CFG2, mac_cfg2_reg); TSI_WRITE(TSI108_EC_PORTCTRL, portctrl_reg); + } - if (data->link_up == 0) { - /* The manual says it can take 3-4 usecs for the speed change - * to take effect. - */ - udelay(5); + if (data->link_up == 0) { + /* The manual says it can take 3-4 usecs for the speed change + * to take effect. + */ + udelay(5); - spin_lock(&data->txlock); - if (is_valid_ether_addr(dev->dev_addr) && data->txfree) - netif_wake_queue(dev); + spin_lock(&data->txlock); + if (is_valid_ether_addr(dev->dev_addr) && data->txfree) + netif_wake_queue(dev); - data->link_up = 1; - spin_unlock(&data->txlock); - } + data->link_up = 1; + spin_unlock(&data->txlock); } - } else { if (data->link_up == 1) { netif_stop_queue(dev); @@ -1267,12 +1266,11 @@ static void tsi108_init_phy(struct net_device *dev) * PHY_STAT register before the link up status bit is set. */ - data->link_up = 1; + data->link_up = 0; while (!((phyval = tsi108_read_mii(data, MII_BMSR)) & BMSR_LSTATUS)) { if (i++ > (MII_READ_DELAY / 10)) { - data->link_up = 0; break; } spin_unlock_irqrestore(&phy_lock, flags); -- cgit v1.2.3-18-g5258 From 9dde447a09ec8fc0ba8375a16fe6bed2470f0d14 Mon Sep 17 00:00:00 2001 From: Alex Bounine Date: Mon, 11 Feb 2008 14:36:37 -0500 Subject: Tsi108_eth: Add ethtool support Add ethtool support to tsi108_eth network driver. Signed-off-by: Alexandre Bounine Signed-off-by: Jeff Garzik --- drivers/net/tsi108_eth.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c index bc3848962bb..6f33f84d37b 100644 --- a/drivers/net/tsi108_eth.c +++ b/drivers/net/tsi108_eth.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -1519,12 +1520,46 @@ static void tsi108_init_mac(struct net_device *dev) TSI_WRITE(TSI108_EC_INTMASK, ~0); } +static int tsi108_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct tsi108_prv_data *data = netdev_priv(dev); + unsigned long flags; + int rc; + + spin_lock_irqsave(&data->txlock, flags); + rc = mii_ethtool_gset(&data->mii_if, cmd); + spin_unlock_irqrestore(&data->txlock, flags); + + return rc; +} + +static int tsi108_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct tsi108_prv_data *data = netdev_priv(dev); + unsigned long flags; + int rc; + + spin_lock_irqsave(&data->txlock, flags); + rc = mii_ethtool_sset(&data->mii_if, cmd); + spin_unlock_irqrestore(&data->txlock, flags); + + return rc; +} + static int tsi108_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { struct tsi108_prv_data *data = netdev_priv(dev); + if (!netif_running(dev)) + return -EINVAL; return generic_mii_ioctl(&data->mii_if, if_mii(rq), cmd, NULL); } +static const struct ethtool_ops tsi108_ethtool_ops = { + .get_link = ethtool_op_get_link, + .get_settings = tsi108_get_settings, + .set_settings = tsi108_set_settings, +}; + static int tsi108_init_one(struct platform_device *pdev) { @@ -1589,6 +1624,7 @@ tsi108_init_one(struct platform_device *pdev) dev->get_stats = tsi108_get_stats; netif_napi_add(dev, &data->napi, tsi108_poll, 64); dev->do_ioctl = tsi108_do_ioctl; + dev->ethtool_ops = &tsi108_ethtool_ops; /* Apparently, the Linux networking code won't use scatter-gather * if the hardware doesn't do checksums. However, it's faster -- cgit v1.2.3-18-g5258 From 030ed68bf063e99cea6371d1fb771a870cab1c1d Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Mon, 11 Feb 2008 09:25:40 -0800 Subject: replace code with FIELD_SIZEOF Signed-off-by: Julia Lawall Signed-off-by: Auke Kok Signed-off-by: Jeff Garzik --- drivers/net/e1000/e1000_ethtool.c | 2 +- drivers/net/igb/igb_ethtool.c | 2 +- drivers/net/ixgb/ixgb_ethtool.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index d876787ce33..85e66f4c788 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c @@ -50,7 +50,7 @@ struct e1000_stats { int stat_offset; }; -#define E1000_STAT(m) sizeof(((struct e1000_adapter *)0)->m), \ +#define E1000_STAT(m) FIELD_SIZEOF(struct e1000_adapter, m), \ offsetof(struct e1000_adapter, m) static const struct e1000_stats e1000_gstrings_stats[] = { { "rx_packets", E1000_STAT(stats.gprc) }, diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c index f69721e4eaa..0447f9bcd27 100644 --- a/drivers/net/igb/igb_ethtool.c +++ b/drivers/net/igb/igb_ethtool.c @@ -43,7 +43,7 @@ struct igb_stats { int stat_offset; }; -#define IGB_STAT(m) sizeof(((struct igb_adapter *)0)->m), \ +#define IGB_STAT(m) FIELD_SIZEOF(struct igb_adapter, m), \ offsetof(struct igb_adapter, m) static const struct igb_stats igb_gstrings_stats[] = { { "rx_packets", IGB_STAT(stats.gprc) }, diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c index a267dd86252..53a9fd086f9 100644 --- a/drivers/net/ixgb/ixgb_ethtool.c +++ b/drivers/net/ixgb/ixgb_ethtool.c @@ -49,7 +49,7 @@ struct ixgb_stats { int stat_offset; }; -#define IXGB_STAT(m) sizeof(((struct ixgb_adapter *)0)->m), \ +#define IXGB_STAT(m) FIELD_SIZEOF(struct ixgb_adapter, m), \ offsetof(struct ixgb_adapter, m) static struct ixgb_stats ixgb_gstrings_stats[] = { {"rx_packets", IXGB_STAT(net_stats.rx_packets)}, -- cgit v1.2.3-18-g5258 From 14782ca8262818921a460c80a761a93740b838a2 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Mon, 11 Feb 2008 09:25:46 -0800 Subject: e1000: warn if this driver is used for e1000e devices We're already starting to see reports from users still using e1000 where they should be using e1000e now that this is actually possible. Just to prevent some of this thrash, add a big warning on load on these devices that people should switch to e1000e. Signed-off-by: Auke Kok Acked-by: Jesse Brandeburg Signed-off-by: Jeff Garzik --- drivers/net/e1000/e1000_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index d4ee8ec34b5..0991648c53d 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -1195,6 +1195,14 @@ e1000_probe(struct pci_dev *pdev, printk("%s\n", print_mac(mac, netdev->dev_addr)); + if (adapter->hw.bus_type == e1000_bus_type_pci_express) { + DPRINTK(PROBE, WARNING, "This device (id %04x:%04x) will no " + "longer be supported by this driver in the future.\n", + pdev->vendor, pdev->device); + DPRINTK(PROBE, WARNING, "please use the \"e1000e\" " + "driver instead.\n"); + } + /* reset the hardware with the new settings */ e1000_reset(adapter); -- cgit v1.2.3-18-g5258 From 23b66e2bc2bcebacab7292d7731b7372065b3f98 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Mon, 11 Feb 2008 09:25:51 -0800 Subject: e1000e: Fix logic reversal keeping link active A logic mishap caused the adapter to keep link while we can disable it due to WoL not being active, and vice versa. Signed-off-by: Auke Kok Signed-off-by: Jeff Garzik --- drivers/net/e1000e/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index f58f017ee47..b9b0d321e70 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c @@ -2008,7 +2008,7 @@ static void e1000_power_down_phy(struct e1000_adapter *adapter) u16 mii_reg; /* WoL is enabled */ - if (!adapter->wol) + if (adapter->wol) return; /* non-copper PHY? */ -- cgit v1.2.3-18-g5258 From 0c254d863338ceff630814bf17cf8e4b61cb8aa3 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Mon, 11 Feb 2008 09:25:56 -0800 Subject: ixgbe: warn when device is in a x4 or lower width slot It's easy to oversee this issue when working with this card as evrything will work OK but performance is severely limited (something like 1.5gbit on a x1 link) if the pci-express slot does not offer more bandwidth. Signed-off-by: Auke Kok Signed-off-by: Jeff Garzik --- drivers/net/ixgbe/ixgbe_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index ead49e54f31..576fb51eb74 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -2778,6 +2778,14 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, hw->mac.type, hw->phy.type, (part_num >> 8), (part_num & 0xff)); + if (link_width <= IXGBE_PCI_LINK_WIDTH_4) { + dev_warn(&pdev->dev, "PCI-Express bandwidth available for " + "this card is not sufficient for optimal " + "performance.\n"); + dev_warn(&pdev->dev, "For optimal performance a x8 " + "PCI-Express slot is required.\n"); + } + /* reset the hardware with the new settings */ ixgbe_start_hw(hw); -- cgit v1.2.3-18-g5258 From 4bebfaa56b72c94fe4997240ee73ad1c1fcf96c9 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Mon, 11 Feb 2008 09:26:01 -0800 Subject: ixgbe: Disallow device reset during ethtool test Signed-off-by: Auke Kok Signed-off-by: Jeff Garzik --- drivers/net/ixgbe/ixgbe_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 576fb51eb74..a4aeaec1b29 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -1942,6 +1942,10 @@ static int ixgbe_open(struct net_device *netdev) int err; u32 num_rx_queues = adapter->num_rx_queues; + /* disallow open during test */ + if (test_bit(__IXGBE_TESTING, &adapter->state)) + return -EBUSY; + try_intr_reinit: /* allocate transmit descriptors */ err = ixgbe_setup_all_tx_resources(adapter); -- cgit v1.2.3-18-g5258 From 4a75834644ae32ded9bed14db39834d6d3bc4793 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Mon, 11 Feb 2008 09:26:06 -0800 Subject: ixgbe: remove accidentally added #ifdef Let's not add these #ifdef NETIF_F_TSO's back. Signed-off-by: Auke Kok Signed-off-by: Jeff Garzik --- drivers/net/ixgbe/ixgbe_main.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index a4aeaec1b29..540b647eb82 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -220,7 +220,6 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_adapter *adapter, tx_ring->stats.bytes += tx_buffer_info->length; if (cleaned) { struct sk_buff *skb = tx_buffer_info->skb; -#ifdef NETIF_F_TSO unsigned int segs, bytecount; segs = skb_shinfo(skb)->gso_segs ?: 1; /* multiply data chunks by size of headers */ @@ -228,10 +227,6 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_adapter *adapter, skb->len; total_tx_packets += segs; total_tx_bytes += bytecount; -#else - total_tx_packets++; - total_tx_bytes += skb->len; -#endif } ixgbe_unmap_and_free_tx_resource(adapter, tx_buffer_info); -- cgit v1.2.3-18-g5258 From 631a9dca60ddd7d84a08171a14828e9cfb667d48 Mon Sep 17 00:00:00 2001 From: Robert Reif Date: Tue, 12 Feb 2008 18:23:31 -0800 Subject: [SPARC]: video/cg14.c and video/sbuslib.c build fixes Apparently these drivers now need uaccess.h Signed-off-by: Robert Reif Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- drivers/video/cg14.c | 1 + drivers/video/sbuslib.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c index 41f6dbf61be..fdc9f43ec30 100644 --- a/drivers/video/cg14.c +++ b/drivers/video/cg14.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c index 963a454b707..4deaac05b93 100644 --- a/drivers/video/sbuslib.c +++ b/drivers/video/sbuslib.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include -- cgit v1.2.3-18-g5258 From b3dd5b82560eef53a537e409f50261d0b33c75ce Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Tue, 12 Feb 2008 22:08:55 -0800 Subject: [SPARC]: Use shorter form of "get_zeroed_page". Signed-off-by: Robert P. J. Day Signed-off-by: David S. Miller --- arch/sparc/mm/sun4c.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index c0442e8c4b1..2375fe9dc31 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c @@ -1941,9 +1941,7 @@ static pte_t *sun4c_pte_alloc_one_kernel(struct mm_struct *mm, unsigned long add if ((pte = sun4c_pte_alloc_one_fast(mm, address)) != NULL) return pte; - pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); - if (pte) - memset(pte, 0, PAGE_SIZE); + pte = (pte_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); return pte; } -- cgit v1.2.3-18-g5258 From b83ebf566b64d3702c6b50dbee2052623cd55ce5 Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Tue, 12 Feb 2008 22:09:29 -0800 Subject: [SPARC64]: Use shorter "get_zeroed_page" call. Signed-off-by: Robert P. J. Day Signed-off-by: David S. Miller --- arch/sparc64/kernel/iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/sparc64/kernel/iommu.c b/arch/sparc64/kernel/iommu.c index d3276ebcfb4..0e347ff812a 100644 --- a/arch/sparc64/kernel/iommu.c +++ b/arch/sparc64/kernel/iommu.c @@ -200,12 +200,11 @@ int iommu_table_init(struct iommu *iommu, int tsbsize, /* Allocate and initialize the dummy page which we * set inactive IO PTEs to point to. */ - iommu->dummy_page = __get_free_pages(GFP_KERNEL, 0); + iommu->dummy_page = get_zeroed_page(GFP_KERNEL); if (!iommu->dummy_page) { printk(KERN_ERR "IOMMU: Error, gfp(dummy_page) failed.\n"); goto out_free_map; } - memset((void *)iommu->dummy_page, 0, PAGE_SIZE); iommu->dummy_page_pa = (unsigned long) __pa(iommu->dummy_page); /* Now allocate and setup the IOMMU page table itself. */ -- cgit v1.2.3-18-g5258 From 0f78e7542e94e8f64ed393289d7bfac032634620 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Wed, 13 Feb 2008 01:00:26 -0800 Subject: [SPARC64]: Remove DEBUG_BOOTMEM. We'll replace it in the future with better logging facilities that can be enabled at run time. Signed-off-by: David S. Miller --- arch/sparc64/Kconfig.debug | 4 ---- arch/sparc64/defconfig | 1 - arch/sparc64/mm/init.c | 43 +------------------------------------------ 3 files changed, 1 insertion(+), 47 deletions(-) diff --git a/arch/sparc64/Kconfig.debug b/arch/sparc64/Kconfig.debug index a5faa3683bd..6a4d28a4076 100644 --- a/arch/sparc64/Kconfig.debug +++ b/arch/sparc64/Kconfig.debug @@ -23,10 +23,6 @@ config STACK_DEBUG depends on DEBUG_KERNEL bool "Stack Overflow Detection Support" -config DEBUG_BOOTMEM - depends on DEBUG_KERNEL - bool "Debug BOOTMEM initialization" - config DEBUG_PAGEALLOC bool "Debug page memory allocations" depends on DEBUG_KERNEL && !HIBERNATION diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig index 833d74b2b19..50dc0905578 100644 --- a/arch/sparc64/defconfig +++ b/arch/sparc64/defconfig @@ -1396,7 +1396,6 @@ CONFIG_FORCED_INLINING=y # CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_DEBUG_DCFLUSH is not set # CONFIG_STACK_DEBUG is not set -# CONFIG_DEBUG_BOOTMEM is not set # CONFIG_DEBUG_PAGEALLOC is not set # diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index e726c45645f..035c73243ad 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -739,11 +739,6 @@ static unsigned long __init choose_bootmap_pfn(unsigned long start_pfn, avoid_end = PAGE_ALIGN(initrd_end); #endif -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("choose_bootmap_pfn: kern[%lx:%lx] avoid[%lx:%lx]\n", - kern_base, PAGE_ALIGN(kern_base + kern_size), - avoid_start, avoid_end); -#endif for (i = 0; i < pavail_ents; i++) { unsigned long start, end; @@ -777,10 +772,6 @@ static unsigned long __init choose_bootmap_pfn(unsigned long start_pfn, } /* OK, it doesn't overlap anything, use it. */ -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("choose_bootmap_pfn: Using %lx [%lx]\n", - start >> PAGE_SHIFT, start); -#endif return start >> PAGE_SHIFT; } } @@ -920,10 +911,6 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail, unsigned long bootmap_pfn, bytes_avail, size; int i; -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("bootmem_init: Scan pavail, "); -#endif - bytes_avail = 0UL; for (i = 0; i < pavail_ents; i++) { end_of_phys_memory = pavail[i].phys_addr + @@ -970,33 +957,20 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail, bootmap_pfn = choose_bootmap_pfn(min_low_pfn, end_pfn); -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("init_bootmem(min[%lx], bootmap[%lx], max[%lx])\n", - min_low_pfn, bootmap_pfn, max_low_pfn); -#endif bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap_pfn, min_low_pfn, end_pfn); /* Now register the available physical memory with the * allocator. */ - for (i = 0; i < pavail_ents; i++) { -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("free_bootmem(pavail:%d): base[%lx] size[%lx]\n", - i, pavail[i].phys_addr, pavail[i].reg_size); -#endif + for (i = 0; i < pavail_ents; i++) free_bootmem(pavail[i].phys_addr, pavail[i].reg_size); - } #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start) { size = initrd_end - initrd_start; /* Reserve the initrd image area. */ -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("reserve_bootmem(initrd): base[%llx] size[%lx]\n", - initrd_start, initrd_end); -#endif reserve_bootmem(initrd_start, size, BOOTMEM_DEFAULT); initrd_start += PAGE_OFFSET; @@ -1004,9 +978,6 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail, } #endif /* Reserve the kernel text/data/bss. */ -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("reserve_bootmem(kernel): base[%lx] size[%lx]\n", kern_base, kern_size); -#endif reserve_bootmem(kern_base, kern_size, BOOTMEM_DEFAULT); *pages_avail -= PAGE_ALIGN(kern_size) >> PAGE_SHIFT; @@ -1020,10 +991,6 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail, * in free_all_bootmem. */ size = bootmap_size; -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("reserve_bootmem(bootmap): base[%lx] size[%lx]\n", - (bootmap_pfn << PAGE_SHIFT), size); -#endif reserve_bootmem((bootmap_pfn << PAGE_SHIFT), size, BOOTMEM_DEFAULT); for (i = 0; i < pavail_ents; i++) { @@ -1031,10 +998,6 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail, start_pfn = pavail[i].phys_addr >> PAGE_SHIFT; end_pfn = (start_pfn + (pavail[i].reg_size >> PAGE_SHIFT)); -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("memory_present(0, %lx, %lx)\n", - start_pfn, end_pfn); -#endif memory_present(0, start_pfn, end_pfn); } @@ -1549,10 +1512,6 @@ void __init mem_init(void) high_memory = __va(last_valid_pfn << PAGE_SHIFT); -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("mem_init: Calling free_all_bootmem().\n"); -#endif - /* We subtract one to account for the mem_map_zero page * allocated below. */ -- cgit v1.2.3-18-g5258 From 587c90616a5b44e6ccfac38e64d4fecee51d588c Mon Sep 17 00:00:00 2001 From: Roman Zippel Date: Mon, 11 Feb 2008 21:13:47 +0100 Subject: kconfig: fix select in combination with default > The attached .config (with current -git) results in a compile > error since it contains: > > CONFIG_X86=y > # CONFIG_EMBEDDED is not set > CONFIG_SERIO=m > CONFIG_SERIO_I8042=y > > Looking at drivers/input/serio/Kconfig I simply don't get how this > can happen. You've hit the rather subtle rules of select vs default. What happened is that SERIO is selected to m, but SERIO_I8042 isn't selected so the default of y is used instead. We already had the problem in the past that select and default don't work well together, so this patch cleans this up and makes the rule hopefully more straightforward. Basically now the value is calculated like this: (value && dependency) || select where the value is the user choice (if available and the symbol is visible) or default. In this case it means SERIO and SERIO_I8042 are both set to y due to their default and if SERIO didn't had the default, then the SERIO_I8042 value would be limited to m due to the dependency. I tested this patch with more 10000 random configs and above case is the only the difference that showed up, so I hope there is nothing that depended on the old more complex and subtle rules. Signed-off-by: Roman Zippel Tested-by: Adrian Bunk Signed-off-by: Sam Ravnborg --- scripts/kconfig/symbol.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index 3929e5b35e7..4a03191ad17 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c @@ -298,22 +298,30 @@ void sym_calc_value(struct symbol *sym) if (sym_is_choice_value(sym) && sym->visible == yes) { prop = sym_get_choice_prop(sym); newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no; - } else if (EXPR_OR(sym->visible, sym->rev_dep.tri) != no) { - sym->flags |= SYMBOL_WRITE; - if (sym_has_value(sym)) - newval.tri = sym->def[S_DEF_USER].tri; - else if (!sym_is_choice(sym)) { - prop = sym_get_default_prop(sym); - if (prop) - newval.tri = expr_calc_value(prop->expr); + } else { + if (sym->visible != no) { + /* if the symbol is visible use the user value + * if available, otherwise try the default value + */ + sym->flags |= SYMBOL_WRITE; + if (sym_has_value(sym)) { + newval.tri = EXPR_AND(sym->def[S_DEF_USER].tri, + sym->visible); + goto calc_newval; + } } - newval.tri = EXPR_OR(EXPR_AND(newval.tri, sym->visible), sym->rev_dep.tri); - } else if (!sym_is_choice(sym)) { - prop = sym_get_default_prop(sym); - if (prop) { + if (sym->rev_dep.tri != no) sym->flags |= SYMBOL_WRITE; - newval.tri = expr_calc_value(prop->expr); + if (!sym_is_choice(sym)) { + prop = sym_get_default_prop(sym); + if (prop) { + sym->flags |= SYMBOL_WRITE; + newval.tri = EXPR_AND(expr_calc_value(prop->expr), + prop->visible.tri); + } } + calc_newval: + newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri); } if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN) newval.tri = yes; -- cgit v1.2.3-18-g5258 From 1e12e3919ea83ce28f8c017b83f68739485fef81 Mon Sep 17 00:00:00 2001 From: Chris Zankel Date: Fri, 18 Jan 2008 14:26:55 -0800 Subject: [XTENSA] Remove duplicate includes. Signed-off-by: Lucas Woods Signed-off-by: Andrew Morton Signed-off-by: Christian Zankel --- arch/xtensa/kernel/asm-offsets.c | 1 - arch/xtensa/mm/cache.c | 1 - arch/xtensa/platform-iss/network.c | 1 - 3 files changed, 3 deletions(-) diff --git a/arch/xtensa/kernel/asm-offsets.c b/arch/xtensa/kernel/asm-offsets.c index d5ffe7b6443..5d9ef515ca1 100644 --- a/arch/xtensa/kernel/asm-offsets.c +++ b/arch/xtensa/kernel/asm-offsets.c @@ -21,7 +21,6 @@ #include #include -#include #include #define DEFINE(sym, val) asm volatile("\n->" #sym " %0 " #val : : "i" (val)) diff --git a/arch/xtensa/mm/cache.c b/arch/xtensa/mm/cache.c index 9a1fa9478ae..42bfb695a17 100644 --- a/arch/xtensa/mm/cache.c +++ b/arch/xtensa/mm/cache.c @@ -25,7 +25,6 @@ #include #include -#include #include #include #include diff --git a/arch/xtensa/platform-iss/network.c b/arch/xtensa/platform-iss/network.c index f21b9b0899a..d89fb18d797 100644 --- a/arch/xtensa/platform-iss/network.c +++ b/arch/xtensa/platform-iss/network.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include -- cgit v1.2.3-18-g5258 From 78c5bbc15bc467ec98cf4db55ae9c57522c1b77b Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Fri, 7 Dec 2007 17:14:47 -0800 Subject: [XTENSA] Remove dead code reported by Robert P. J. Day. Signed-off-by: Adrian Bunk Signed-off-by: Christian Zankel Signed-off-by: Andrew Morton --- arch/xtensa/kernel/setup.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index b80f2cb1b4f..5e6d75c9f92 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -60,11 +60,6 @@ struct ide_ops *ide_ops; extern struct rtc_ops no_rtc_ops; struct rtc_ops *rtc_ops; -#ifdef CONFIG_PC_KEYB -extern struct kbd_ops no_kbd_ops; -struct kbd_ops *kbd_ops; -#endif - #ifdef CONFIG_BLK_DEV_INITRD extern void *initrd_start; extern void *initrd_end; -- cgit v1.2.3-18-g5258 From e584d85fb1cba2b08c266348b58eb4a881a88b40 Mon Sep 17 00:00:00 2001 From: Chris Zankel Date: Wed, 13 Feb 2008 16:25:09 -0800 Subject: [XTENSA] Fix non-existent pte_token_t typedef to pgtable_t This bug was introduced in 2f569afd9ced9ebec9a6eb3dbf6f83429be0a7b4. (CONFIG_HIGHPTE vs. sub-page page tables) Signed-off-by: Chris Zankel --- include/asm-xtensa/pgalloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-xtensa/pgalloc.h b/include/asm-xtensa/pgalloc.h index 8d1544eb461..4f4a7987ede 100644 --- a/include/asm-xtensa/pgalloc.h +++ b/include/asm-xtensa/pgalloc.h @@ -47,7 +47,7 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, return kmem_cache_alloc(pgtable_cache, GFP_KERNEL|__GFP_REPEAT); } -static inline pte_token_t pte_alloc_one(struct mm_struct *mm, +static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addr) { struct page *page; -- cgit v1.2.3-18-g5258 From 4f8d98ff4825336b23372bb552852625fc90d3b1 Mon Sep 17 00:00:00 2001 From: Chris Zankel Date: Wed, 13 Feb 2008 16:44:19 -0800 Subject: [XTENSA] Add .literal sections for various init sectiont to linker script Xtensa requires separate .literal section for each .text section. Adding addition init sections for cpuinit, meminit, and devinit, broke the Xtensa linker script, so, add these literal sections manually for now. Signed-off-by: Chris Zankel --- arch/xtensa/kernel/vmlinux.lds.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S index 7d0f55a4982..4b717bf48fb 100644 --- a/arch/xtensa/kernel/vmlinux.lds.S +++ b/arch/xtensa/kernel/vmlinux.lds.S @@ -136,7 +136,9 @@ SECTIONS __init_begin = .; .init.text : { _sinittext = .; - *(.init.literal) INIT_TEXT + *(.init.literal) *(.cpuinit.literal) + *(.devinit.literal) *(.meminit.literal) + INIT_TEXT _einittext = .; } -- cgit v1.2.3-18-g5258 From b26d0ab0e6fa3a886d2799bf89eb05dd52f8b7c2 Mon Sep 17 00:00:00 2001 From: Chris Zankel Date: Thu, 13 Sep 2007 13:44:07 -0700 Subject: [XTENSA] Concentrate platforms into one platforms directory. Create arch/xtensa/platforms/ directory to concentrate all platforms under that subdirectory and moves the ISS platform to that directory. Signed-off-by: Chris Zankel --- arch/xtensa/Makefile | 2 +- arch/xtensa/platform-iss/Makefile | 8 - arch/xtensa/platform-iss/console.c | 296 ------------- arch/xtensa/platform-iss/io.c | 32 -- arch/xtensa/platform-iss/network.c | 822 ------------------------------------ arch/xtensa/platform-iss/setup.c | 110 ----- arch/xtensa/platforms/iss/Makefile | 8 + arch/xtensa/platforms/iss/console.c | 296 +++++++++++++ arch/xtensa/platforms/iss/io.c | 32 ++ arch/xtensa/platforms/iss/network.c | 822 ++++++++++++++++++++++++++++++++++++ arch/xtensa/platforms/iss/setup.c | 110 +++++ 11 files changed, 1269 insertions(+), 1269 deletions(-) delete mode 100644 arch/xtensa/platform-iss/Makefile delete mode 100644 arch/xtensa/platform-iss/console.c delete mode 100644 arch/xtensa/platform-iss/io.c delete mode 100644 arch/xtensa/platform-iss/network.c delete mode 100644 arch/xtensa/platform-iss/setup.c create mode 100644 arch/xtensa/platforms/iss/Makefile create mode 100644 arch/xtensa/platforms/iss/console.c create mode 100644 arch/xtensa/platforms/iss/io.c create mode 100644 arch/xtensa/platforms/iss/network.c create mode 100644 arch/xtensa/platforms/iss/setup.c diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index 56685a88334..4bd1e14c6b9 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile @@ -59,7 +59,7 @@ LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) head-y := arch/xtensa/kernel/head.o core-y += arch/xtensa/kernel/ arch/xtensa/mm/ ifneq ($(PLATFORM),) -core-y += arch/xtensa/platform-$(PLATFORM)/ +core-y += arch/xtensa/platforms/$(PLATFORM)/ endif libs-y += arch/xtensa/lib/ $(LIBGCC) diff --git a/arch/xtensa/platform-iss/Makefile b/arch/xtensa/platform-iss/Makefile deleted file mode 100644 index af96e314d71..00000000000 --- a/arch/xtensa/platform-iss/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# $Id: Makefile,v 1.1.1.1 2002/08/28 16:10:14 aroll Exp $ -# -# Makefile for the Xtensa Instruction Set Simulator (ISS) -# "prom monitor" library routines under Linux. -# - -obj-y = io.o console.o setup.o network.o - diff --git a/arch/xtensa/platform-iss/console.c b/arch/xtensa/platform-iss/console.c deleted file mode 100644 index 854677d0c3f..00000000000 --- a/arch/xtensa/platform-iss/console.c +++ /dev/null @@ -1,296 +0,0 @@ -/* - * arch/xtensa/platform-iss/console.c - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 2001-2005 Tensilica Inc. - * Authors Christian Zankel, Joe Taylor - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include - -#ifdef SERIAL_INLINE -#define _INLINE_ inline -#endif - -#define SERIAL_MAX_NUM_LINES 1 -#define SERIAL_TIMER_VALUE (20 * HZ) - -static struct tty_driver *serial_driver; -static struct timer_list serial_timer; - -static DEFINE_SPINLOCK(timer_lock); - -int errno; - -static int __simc (int a, int b, int c, int d, int e, int f) -{ - int ret; - __asm__ __volatile__ ("simcall\n" - "mov %0, a2\n" - "mov %1, a3\n" : "=a" (ret), "=a" (errno) - : : "a2", "a3"); - return ret; -} - -static char *serial_version = "0.1"; -static char *serial_name = "ISS serial driver"; - -/* - * This routine is called whenever a serial port is opened. It - * enables interrupts for a serial port, linking in its async structure into - * the IRQ chain. It also performs the serial-specific - * initialization for the tty structure. - */ - -static void rs_poll(unsigned long); - -static int rs_open(struct tty_struct *tty, struct file * filp) -{ - int line = tty->index; - - if ((line < 0) || (line >= SERIAL_MAX_NUM_LINES)) - return -ENODEV; - - spin_lock(&timer_lock); - - if (tty->count == 1) { - init_timer(&serial_timer); - serial_timer.data = (unsigned long) tty; - serial_timer.function = rs_poll; - mod_timer(&serial_timer, jiffies + SERIAL_TIMER_VALUE); - } - spin_unlock(&timer_lock); - - return 0; -} - - -/* - * ------------------------------------------------------------ - * iss_serial_close() - * - * This routine is called when the serial port gets closed. First, we - * wait for the last remaining data to be sent. Then, we unlink its - * async structure from the interrupt chain if necessary, and we free - * that IRQ if nothing is left in the chain. - * ------------------------------------------------------------ - */ -static void rs_close(struct tty_struct *tty, struct file * filp) -{ - spin_lock(&timer_lock); - if (tty->count == 1) - del_timer_sync(&serial_timer); - spin_unlock(&timer_lock); -} - - -static int rs_write(struct tty_struct * tty, - const unsigned char *buf, int count) -{ - /* see drivers/char/serialX.c to reference original version */ - - __simc (SYS_write, 1, (unsigned long)buf, count, 0, 0); - return count; -} - -static void rs_poll(unsigned long priv) -{ - struct tty_struct* tty = (struct tty_struct*) priv; - - struct timeval tv = { .tv_sec = 0, .tv_usec = 0 }; - int i = 0; - unsigned char c; - - spin_lock(&timer_lock); - - while (__simc(SYS_select_one, 0, XTISS_SELECT_ONE_READ, (int)&tv,0,0)){ - __simc (SYS_read, 0, (unsigned long)&c, 1, 0, 0); - tty_insert_flip_char(tty, c, TTY_NORMAL); - i++; - } - - if (i) - tty_flip_buffer_push(tty); - - - mod_timer(&serial_timer, jiffies + SERIAL_TIMER_VALUE); - spin_unlock(&timer_lock); -} - - -static void rs_put_char(struct tty_struct *tty, unsigned char ch) -{ - char buf[2]; - - if (!tty) - return; - - buf[0] = ch; - buf[1] = '\0'; /* Is this NULL necessary? */ - __simc (SYS_write, 1, (unsigned long) buf, 1, 0, 0); -} - -static void rs_flush_chars(struct tty_struct *tty) -{ -} - -static int rs_write_room(struct tty_struct *tty) -{ - /* Let's say iss can always accept 2K characters.. */ - return 2 * 1024; -} - -static int rs_chars_in_buffer(struct tty_struct *tty) -{ - /* the iss doesn't buffer characters */ - return 0; -} - -static void rs_hangup(struct tty_struct *tty) -{ - /* Stub, once again.. */ -} - -static void rs_wait_until_sent(struct tty_struct *tty, int timeout) -{ - /* Stub, once again.. */ -} - -static int rs_read_proc(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - int len = 0; - off_t begin = 0; - - len += sprintf(page, "serinfo:1.0 driver:%s\n", serial_version); - *eof = 1; - - if (off >= len + begin) - return 0; - - *start = page + (off - begin); - return ((count < begin + len - off) ? count : begin + len - off); -} - - -static struct tty_operations serial_ops = { - .open = rs_open, - .close = rs_close, - .write = rs_write, - .put_char = rs_put_char, - .flush_chars = rs_flush_chars, - .write_room = rs_write_room, - .chars_in_buffer = rs_chars_in_buffer, - .hangup = rs_hangup, - .wait_until_sent = rs_wait_until_sent, - .read_proc = rs_read_proc -}; - -int __init rs_init(void) -{ - serial_driver = alloc_tty_driver(1); - - printk ("%s %s\n", serial_name, serial_version); - - /* Initialize the tty_driver structure */ - - serial_driver->owner = THIS_MODULE; - serial_driver->driver_name = "iss_serial"; - serial_driver->name = "ttyS"; - serial_driver->major = TTY_MAJOR; - serial_driver->minor_start = 64; - serial_driver->type = TTY_DRIVER_TYPE_SERIAL; - serial_driver->subtype = SERIAL_TYPE_NORMAL; - serial_driver->init_termios = tty_std_termios; - serial_driver->init_termios.c_cflag = - B9600 | CS8 | CREAD | HUPCL | CLOCAL; - serial_driver->flags = TTY_DRIVER_REAL_RAW; - - tty_set_operations(serial_driver, &serial_ops); - - if (tty_register_driver(serial_driver)) - panic("Couldn't register serial driver\n"); - return 0; -} - - -static __exit void rs_exit(void) -{ - int error; - - if ((error = tty_unregister_driver(serial_driver))) - printk("ISS_SERIAL: failed to unregister serial driver (%d)\n", - error); - put_tty_driver(serial_driver); -} - - -/* We use `late_initcall' instead of just `__initcall' as a workaround for - * the fact that (1) simcons_tty_init can't be called before tty_init, - * (2) tty_init is called via `module_init', (3) if statically linked, - * module_init == device_init, and (4) there's no ordering of init lists. - * We can do this easily because simcons is always statically linked, but - * other tty drivers that depend on tty_init and which must use - * `module_init' to declare their init routines are likely to be broken. - */ - -late_initcall(rs_init); - - -#ifdef CONFIG_SERIAL_CONSOLE - -static void iss_console_write(struct console *co, const char *s, unsigned count) -{ - int len = strlen(s); - - if (s != 0 && *s != 0) - __simc (SYS_write, 1, (unsigned long)s, - count < len ? count : len,0,0); -} - -static struct tty_driver* iss_console_device(struct console *c, int *index) -{ - *index = c->index; - return serial_driver; -} - - -static struct console sercons = { - .name = "ttyS", - .write = iss_console_write, - .device = iss_console_device, - .flags = CON_PRINTBUFFER, - .index = -1 -}; - -static int __init iss_console_init(void) -{ - register_console(&sercons); - return 0; -} - -console_initcall(iss_console_init); - -#endif /* CONFIG_SERIAL_CONSOLE */ - diff --git a/arch/xtensa/platform-iss/io.c b/arch/xtensa/platform-iss/io.c deleted file mode 100644 index 5b161a5cb65..00000000000 --- a/arch/xtensa/platform-iss/io.c +++ /dev/null @@ -1,32 +0,0 @@ -/* This file isn't really needed right now. */ - -#if 0 - -#include -#include - -extern int __simc (); - - -char iss_serial_getc() -{ - char c; - __simc( SYS_read, 0, &c, 1 ); - return c; -} - -void iss_serial_putc( char c ) -{ - __simc( SYS_write, 1, &c, 1 ); -} - -void iss_serial_puts( char *s ) -{ - if( s != 0 && *s != 0 ) - __simc( SYS_write, 1, s, strlen(s) ); -} - -/*#error Need I/O ports to specific hardware!*/ - -#endif - diff --git a/arch/xtensa/platform-iss/network.c b/arch/xtensa/platform-iss/network.c deleted file mode 100644 index d89fb18d797..00000000000 --- a/arch/xtensa/platform-iss/network.c +++ /dev/null @@ -1,822 +0,0 @@ -/* - * - * arch/xtensa/platform-iss/network.c - * - * Platform specific initialization. - * - * Authors: Chris Zankel - * Based on work form the UML team. - * - * Copyright 2005 Tensilica Inc. - * - * 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 of the License, or (at your - * option) any later version. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define DRIVER_NAME "iss-netdev" -#define ETH_MAX_PACKET 1500 -#define ETH_HEADER_OTHER 14 -#define ISS_NET_TIMER_VALUE (2 * HZ) - - -static DEFINE_SPINLOCK(opened_lock); -static LIST_HEAD(opened); - -static DEFINE_SPINLOCK(devices_lock); -static LIST_HEAD(devices); - -/* ------------------------------------------------------------------------- */ - -/* We currently only support the TUNTAP transport protocol. */ - -#define TRANSPORT_TUNTAP_NAME "tuntap" -#define TRANSPORT_TUNTAP_MTU ETH_MAX_PACKET - -struct tuntap_info { - char dev_name[IFNAMSIZ]; - int fixed_config; - unsigned char gw[ETH_ALEN]; - int fd; -}; - -/* ------------------------------------------------------------------------- */ - - -/* This structure contains out private information for the driver. */ - -struct iss_net_private { - - struct list_head device_list; - struct list_head opened_list; - - spinlock_t lock; - struct net_device *dev; - struct platform_device pdev; - struct timer_list tl; - struct net_device_stats stats; - - struct timer_list timer; - unsigned int timer_val; - - int index; - int mtu; - - unsigned char mac[ETH_ALEN]; - int have_mac; - - struct { - union { - struct tuntap_info tuntap; - } info; - - int (*open)(struct iss_net_private *lp); - void (*close)(struct iss_net_private *lp); - int (*read)(struct iss_net_private *lp, struct sk_buff **skb); - int (*write)(struct iss_net_private *lp, struct sk_buff **skb); - unsigned short (*protocol)(struct sk_buff *skb); - int (*poll)(struct iss_net_private *lp); - } tp; - -}; - -/* ======================= ISS SIMCALL INTERFACE =========================== */ - -/* Note: __simc must _not_ be declared inline! */ - -static int errno; - -static int __simc (int a, int b, int c, int d, int e, int f) -{ - int ret; - __asm__ __volatile__ ("simcall\n" - "mov %0, a2\n" - "mov %1, a3\n" : "=a" (ret), "=a" (errno) - : : "a2", "a3"); - return ret; -} - -static int inline simc_open(char *file, int flags, int mode) -{ - return __simc(SYS_open, (int) file, flags, mode, 0, 0); -} - -static int inline simc_close(int fd) -{ - return __simc(SYS_close, fd, 0, 0, 0, 0); -} - -static int inline simc_ioctl(int fd, int request, void *arg) -{ - return __simc(SYS_ioctl, fd, request, (int) arg, 0, 0); -} - -static int inline simc_read(int fd, void *buf, size_t count) -{ - return __simc(SYS_read, fd, (int) buf, count, 0, 0); -} - -static int inline simc_write(int fd, void *buf, size_t count) -{ - return __simc(SYS_write, fd, (int) buf, count, 0, 0); -} - -static int inline simc_poll(int fd) -{ - struct timeval tv = { .tv_sec = 0, .tv_usec = 0 }; - - return __simc(SYS_select_one, fd, XTISS_SELECT_ONE_READ, (int)&tv,0,0); -} - -/* ================================ HELPERS ================================ */ - - -static char *split_if_spec(char *str, ...) -{ - char **arg, *end; - va_list ap; - - va_start(ap, str); - while ((arg = va_arg(ap, char**)) != NULL) { - if (*str == '\0') - return NULL; - end = strchr(str, ','); - if (end != str) - *arg = str; - if (end == NULL) - return NULL; - *end ++ = '\0'; - str = end; - } - va_end(ap); - return str; -} - - -#if 0 -/* Adjust SKB. */ - -struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra) -{ - if ((skb != NULL) && (skb_tailroom(skb) < extra)) { - struct sk_buff *skb2; - - skb2 = skb_copy_expand(skb, 0, extra, GFP_ATOMIC); - dev_kfree_skb(skb); - skb = skb2; - } - if (skb != NULL) - skb_put(skb, extra); - - return skb; -} -#endif - -/* Return the IP address as a string for a given device. */ - -static void dev_ip_addr(void *d, char *buf, char *bin_buf) -{ - struct net_device *dev = d; - struct in_device *ip = dev->ip_ptr; - struct in_ifaddr *in; - __be32 addr; - - if ((ip == NULL) || ((in = ip->ifa_list) == NULL)) { - printk(KERN_WARNING "Device not assigned an IP address!\n"); - return; - } - - addr = in->ifa_address; - sprintf(buf, "%d.%d.%d.%d", addr & 0xff, (addr >> 8) & 0xff, - (addr >> 16) & 0xff, addr >> 24); - - if (bin_buf) { - bin_buf[0] = addr & 0xff; - bin_buf[1] = (addr >> 8) & 0xff; - bin_buf[2] = (addr >> 16) & 0xff; - bin_buf[3] = addr >> 24; - } -} - -/* Set Ethernet address of the specified device. */ - -static void inline set_ether_mac(void *d, unsigned char *addr) -{ - struct net_device *dev = d; - memcpy(dev->dev_addr, addr, ETH_ALEN); -} - - -/* ======================= TUNTAP TRANSPORT INTERFACE ====================== */ - -static int tuntap_open(struct iss_net_private *lp) -{ - struct ifreq ifr; - char *dev_name = lp->tp.info.tuntap.dev_name; - int err = -EINVAL; - int fd; - - /* We currently only support a fixed configuration. */ - - if (!lp->tp.info.tuntap.fixed_config) - return -EINVAL; - - if ((fd = simc_open("/dev/net/tun", 02, 0)) < 0) { /* O_RDWR */ - printk("Failed to open /dev/net/tun, returned %d " - "(errno = %d)\n", fd, errno); - return fd; - } - - memset(&ifr, 0, sizeof ifr); - ifr.ifr_flags = IFF_TAP | IFF_NO_PI; - strlcpy(ifr.ifr_name, dev_name, sizeof ifr.ifr_name); - - if ((err = simc_ioctl(fd, TUNSETIFF, (void*) &ifr)) < 0) { - printk("Failed to set interface, returned %d " - "(errno = %d)\n", err, errno); - simc_close(fd); - return err; - } - - lp->tp.info.tuntap.fd = fd; - return err; -} - -static void tuntap_close(struct iss_net_private *lp) -{ -#if 0 - if (lp->tp.info.tuntap.fixed_config) - iter_addresses(lp->tp.info.tuntap.dev, close_addr, lp->host.dev_name); -#endif - simc_close(lp->tp.info.tuntap.fd); - lp->tp.info.tuntap.fd = -1; -} - -static int tuntap_read (struct iss_net_private *lp, struct sk_buff **skb) -{ -#if 0 - *skb = ether_adjust_skb(*skb, ETH_HEADER_OTHER); - if (*skb == NULL) - return -ENOMEM; -#endif - - return simc_read(lp->tp.info.tuntap.fd, - (*skb)->data, (*skb)->dev->mtu + ETH_HEADER_OTHER); -} - -static int tuntap_write (struct iss_net_private *lp, struct sk_buff **skb) -{ - return simc_write(lp->tp.info.tuntap.fd, (*skb)->data, (*skb)->len); -} - -unsigned short tuntap_protocol(struct sk_buff *skb) -{ - return eth_type_trans(skb, skb->dev); -} - -static int tuntap_poll(struct iss_net_private *lp) -{ - return simc_poll(lp->tp.info.tuntap.fd); -} - -/* - * Currently only a device name is supported. - * ethX=tuntap[,[mac address][,[device name]]] - */ - -static int tuntap_probe(struct iss_net_private *lp, int index, char *init) -{ - const int len = strlen(TRANSPORT_TUNTAP_NAME); - char *dev_name = NULL, *mac_str = NULL, *rem = NULL; - - /* Transport should be 'tuntap': ethX=tuntap,mac,dev_name */ - - if (strncmp(init, TRANSPORT_TUNTAP_NAME, len)) - return 0; - - if (*(init += strlen(TRANSPORT_TUNTAP_NAME)) == ',') { - if ((rem=split_if_spec(init+1, &mac_str, &dev_name)) != NULL) { - printk("Extra garbage on specification : '%s'\n", rem); - return 0; - } - } else if (*init != '\0') { - printk("Invalid argument: %s. Skipping device!\n", init); - return 0; - } - - if (dev_name) { - strncpy(lp->tp.info.tuntap.dev_name, dev_name, - sizeof lp->tp.info.tuntap.dev_name); - lp->tp.info.tuntap.fixed_config = 1; - } else - strcpy(lp->tp.info.tuntap.dev_name, TRANSPORT_TUNTAP_NAME); - - -#if 0 - if (setup_etheraddr(mac_str, lp->mac)) - lp->have_mac = 1; -#endif - lp->mtu = TRANSPORT_TUNTAP_MTU; - - //lp->info.tuntap.gate_addr = gate_addr; - - lp->tp.info.tuntap.fd = -1; - - lp->tp.open = tuntap_open; - lp->tp.close = tuntap_close; - lp->tp.read = tuntap_read; - lp->tp.write = tuntap_write; - lp->tp.protocol = tuntap_protocol; - lp->tp.poll = tuntap_poll; - - printk("TUN/TAP backend - "); -#if 0 - if (lp->host.gate_addr != NULL) - printk("IP = %s", lp->host.gate_addr); -#endif - printk("\n"); - - return 1; -} - -/* ================================ ISS NET ================================ */ - -static int iss_net_rx(struct net_device *dev) -{ - struct iss_net_private *lp = dev->priv; - int pkt_len; - struct sk_buff *skb; - - /* Check if there is any new data. */ - - if (lp->tp.poll(lp) == 0) - return 0; - - /* Try to allocate memory, if it fails, try again next round. */ - - if ((skb = dev_alloc_skb(dev->mtu + 2 + ETH_HEADER_OTHER)) == NULL) { - lp->stats.rx_dropped++; - return 0; - } - - skb_reserve(skb, 2); - - /* Setup skb */ - - skb->dev = dev; - skb_reset_mac_header(skb); - pkt_len = lp->tp.read(lp, &skb); - skb_put(skb, pkt_len); - - if (pkt_len > 0) { - skb_trim(skb, pkt_len); - skb->protocol = lp->tp.protocol(skb); - - lp->stats.rx_bytes += skb->len; - lp->stats.rx_packets++; - // netif_rx(skb); - netif_rx_ni(skb); - return pkt_len; - } - kfree_skb(skb); - return pkt_len; -} - -static int iss_net_poll(void) -{ - struct list_head *ele; - int err, ret = 0; - - spin_lock(&opened_lock); - - list_for_each(ele, &opened) { - struct iss_net_private *lp; - - lp = list_entry(ele, struct iss_net_private, opened_list); - - if (!netif_running(lp->dev)) - break; - - spin_lock(&lp->lock); - - while ((err = iss_net_rx(lp->dev)) > 0) - ret++; - - spin_unlock(&lp->lock); - - if (err < 0) { - printk(KERN_ERR "Device '%s' read returned %d, " - "shutting it down\n", lp->dev->name, err); - dev_close(lp->dev); - } else { - // FIXME reactivate_fd(lp->fd, ISS_ETH_IRQ); - } - } - - spin_unlock(&opened_lock); - return ret; -} - - -static void iss_net_timer(unsigned long priv) -{ - struct iss_net_private* lp = (struct iss_net_private*) priv; - - spin_lock(&lp->lock); - - iss_net_poll(); - - mod_timer(&lp->timer, jiffies + lp->timer_val); - - spin_unlock(&lp->lock); -} - - -static int iss_net_open(struct net_device *dev) -{ - struct iss_net_private *lp = dev->priv; - char addr[sizeof "255.255.255.255\0"]; - int err; - - spin_lock(&lp->lock); - - if ((err = lp->tp.open(lp)) < 0) - goto out; - - if (!lp->have_mac) { - dev_ip_addr(dev, addr, &lp->mac[2]); - set_ether_mac(dev, lp->mac); - } - - netif_start_queue(dev); - - /* clear buffer - it can happen that the host side of the interface - * is full when we get here. In this case, new data is never queued, - * SIGIOs never arrive, and the net never works. - */ - while ((err = iss_net_rx(dev)) > 0) - ; - - spin_lock(&opened_lock); - list_add(&lp->opened_list, &opened); - spin_unlock(&opened_lock); - - init_timer(&lp->timer); - lp->timer_val = ISS_NET_TIMER_VALUE; - lp->timer.data = (unsigned long) lp; - lp->timer.function = iss_net_timer; - mod_timer(&lp->timer, jiffies + lp->timer_val); - -out: - spin_unlock(&lp->lock); - return err; -} - -static int iss_net_close(struct net_device *dev) -{ - struct iss_net_private *lp = dev->priv; -printk("iss_net_close!\n"); - netif_stop_queue(dev); - spin_lock(&lp->lock); - - spin_lock(&opened_lock); - list_del(&opened); - spin_unlock(&opened_lock); - - del_timer_sync(&lp->timer); - - lp->tp.close(lp); - - spin_unlock(&lp->lock); - return 0; -} - -static int iss_net_start_xmit(struct sk_buff *skb, struct net_device *dev) -{ - struct iss_net_private *lp = dev->priv; - unsigned long flags; - int len; - - netif_stop_queue(dev); - spin_lock_irqsave(&lp->lock, flags); - - len = lp->tp.write(lp, &skb); - - if (len == skb->len) { - lp->stats.tx_packets++; - lp->stats.tx_bytes += skb->len; - dev->trans_start = jiffies; - netif_start_queue(dev); - - /* this is normally done in the interrupt when tx finishes */ - netif_wake_queue(dev); - - } else if (len == 0) { - netif_start_queue(dev); - lp->stats.tx_dropped++; - - } else { - netif_start_queue(dev); - printk(KERN_ERR "iss_net_start_xmit: failed(%d)\n", len); - } - - spin_unlock_irqrestore(&lp->lock, flags); - - dev_kfree_skb(skb); - return 0; -} - - -static struct net_device_stats *iss_net_get_stats(struct net_device *dev) -{ - struct iss_net_private *lp = dev->priv; - return &lp->stats; -} - -static void iss_net_set_multicast_list(struct net_device *dev) -{ -#if 0 - if (dev->flags & IFF_PROMISC) - return; - else if (dev->mc_count) - dev->flags |= IFF_ALLMULTI; - else - dev->flags &= ~IFF_ALLMULTI; -#endif -} - -static void iss_net_tx_timeout(struct net_device *dev) -{ -#if 0 - dev->trans_start = jiffies; - netif_wake_queue(dev); -#endif -} - -static int iss_net_set_mac(struct net_device *dev, void *addr) -{ -#if 0 - struct iss_net_private *lp = dev->priv; - struct sockaddr *hwaddr = addr; - - spin_lock(&lp->lock); - memcpy(dev->dev_addr, hwaddr->sa_data, ETH_ALEN); - spin_unlock(&lp->lock); -#endif - - return 0; -} - -static int iss_net_change_mtu(struct net_device *dev, int new_mtu) -{ -#if 0 - struct iss_net_private *lp = dev->priv; - int err = 0; - - spin_lock(&lp->lock); - - // FIXME not needed new_mtu = transport_set_mtu(new_mtu, &lp->user); - - if (new_mtu < 0) - err = new_mtu; - else - dev->mtu = new_mtu; - - spin_unlock(&lp->lock); - return err; -#endif - return -EINVAL; -} - -void iss_net_user_timer_expire(unsigned long _conn) -{ -} - - -static struct platform_driver iss_net_driver = { - .driver = { - .name = DRIVER_NAME, - }, -}; - -static int driver_registered; - -static int iss_net_configure(int index, char *init) -{ - struct net_device *dev; - struct iss_net_private *lp; - int err; - - if ((dev = alloc_etherdev(sizeof *lp)) == NULL) { - printk(KERN_ERR "eth_configure: failed to allocate device\n"); - return 1; - } - - /* Initialize private element. */ - - lp = dev->priv; - *lp = ((struct iss_net_private) { - .device_list = LIST_HEAD_INIT(lp->device_list), - .opened_list = LIST_HEAD_INIT(lp->opened_list), - .lock = SPIN_LOCK_UNLOCKED, - .dev = dev, - .index = index, - //.fd = -1, - .mac = { 0xfe, 0xfd, 0x0, 0x0, 0x0, 0x0 }, - .have_mac = 0, - }); - - /* - * Try all transport protocols. - * Note: more protocols can be added by adding '&& !X_init(lp, eth)'. - */ - - if (!tuntap_probe(lp, index, init)) { - printk("Invalid arguments. Skipping device!\n"); - goto errout; - } - - printk(KERN_INFO "Netdevice %d ", index); - if (lp->have_mac) - printk("(%02x:%02x:%02x:%02x:%02x:%02x) ", - lp->mac[0], lp->mac[1], - lp->mac[2], lp->mac[3], - lp->mac[4], lp->mac[5]); - printk(": "); - - /* sysfs register */ - - if (!driver_registered) { - platform_driver_register(&iss_net_driver); - driver_registered = 1; - } - - spin_lock(&devices_lock); - list_add(&lp->device_list, &devices); - spin_unlock(&devices_lock); - - lp->pdev.id = index; - lp->pdev.name = DRIVER_NAME; - platform_device_register(&lp->pdev); - SET_NETDEV_DEV(dev,&lp->pdev.dev); - - /* - * If this name ends up conflicting with an existing registered - * netdevice, that is OK, register_netdev{,ice}() will notice this - * and fail. - */ - snprintf(dev->name, sizeof dev->name, "eth%d", index); - - dev->mtu = lp->mtu; - dev->open = iss_net_open; - dev->hard_start_xmit = iss_net_start_xmit; - dev->stop = iss_net_close; - dev->get_stats = iss_net_get_stats; - dev->set_multicast_list = iss_net_set_multicast_list; - dev->tx_timeout = iss_net_tx_timeout; - dev->set_mac_address = iss_net_set_mac; - dev->change_mtu = iss_net_change_mtu; - dev->watchdog_timeo = (HZ >> 1); - dev->irq = -1; - - rtnl_lock(); - err = register_netdevice(dev); - rtnl_unlock(); - - if (err) { - printk("Error registering net device!\n"); - /* XXX: should we call ->remove() here? */ - free_netdev(dev); - return 1; - } - - init_timer(&lp->tl); - lp->tl.function = iss_net_user_timer_expire; - -#if 0 - if (lp->have_mac) - set_ether_mac(dev, lp->mac); -#endif - return 0; - -errout: - // FIXME: unregister; free, etc.. - return -EIO; - -} - -/* ------------------------------------------------------------------------- */ - -/* Filled in during early boot */ - -struct list_head eth_cmd_line = LIST_HEAD_INIT(eth_cmd_line); - -struct iss_net_init { - struct list_head list; - char *init; /* init string */ - int index; -}; - -/* - * Parse the command line and look for 'ethX=...' fields, and register all - * those fields. They will be later initialized in iss_net_init. - */ - -#define ERR KERN_ERR "iss_net_setup: " - -static int iss_net_setup(char *str) -{ - struct iss_net_private *device = NULL; - struct iss_net_init *new; - struct list_head *ele; - char *end; - int n; - - n = simple_strtoul(str, &end, 0); - if (end == str) { - printk(ERR "Failed to parse '%s'\n", str); - return 1; - } - if (n < 0) { - printk(ERR "Device %d is negative\n", n); - return 1; - } - if (*(str = end) != '=') { - printk(ERR "Expected '=' after device number\n"); - return 1; - } - - spin_lock(&devices_lock); - - list_for_each(ele, &devices) { - device = list_entry(ele, struct iss_net_private, device_list); - if (device->index == n) - break; - } - - spin_unlock(&devices_lock); - - if (device && device->index == n) { - printk(ERR "Device %d already configured\n", n); - return 1; - } - - if ((new = alloc_bootmem(sizeof new)) == NULL) { - printk("Alloc_bootmem failed\n"); - return 1; - } - - INIT_LIST_HEAD(&new->list); - new->index = n; - new->init = str + 1; - - list_add_tail(&new->list, ð_cmd_line); - return 1; -} - -#undef ERR - -__setup("eth=", iss_net_setup); - -/* - * Initialize all ISS Ethernet devices previously registered in iss_net_setup. - */ - -static int iss_net_init(void) -{ - struct list_head *ele, *next; - - /* Walk through all Ethernet devices specified in the command line. */ - - list_for_each_safe(ele, next, ð_cmd_line) { - struct iss_net_init *eth; - eth = list_entry(ele, struct iss_net_init, list); - iss_net_configure(eth->index, eth->init); - } - - return 1; -} - -module_init(iss_net_init); - diff --git a/arch/xtensa/platform-iss/setup.c b/arch/xtensa/platform-iss/setup.c deleted file mode 100644 index f60c8cf6dfb..00000000000 --- a/arch/xtensa/platform-iss/setup.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * - * arch/xtensa/platform-iss/setup.c - * - * Platform specific initialization. - * - * Authors: Chris Zankel - * Joe Taylor - * - * Copyright 2001 - 2005 Tensilica Inc. - * - * 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 of the License, or (at your - * option) any later version. - * - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -void __init platform_init(bp_tag_t* bootparam) -{ - -} - -void platform_halt(void) -{ - printk (" ** Called platform_halt(), looping forever! **\n"); - while (1); -} - -void platform_power_off(void) -{ - printk (" ** Called platform_power_off(), looping forever! **\n"); - while (1); -} -void platform_restart(void) -{ - /* Flush and reset the mmu, simulate a processor reset, and - * jump to the reset vector. */ - - __asm__ __volatile__("movi a2, 15\n\t" - "wsr a2, " __stringify(ICOUNTLEVEL) "\n\t" - "movi a2, 0\n\t" - "wsr a2, " __stringify(ICOUNT) "\n\t" - "wsr a2, " __stringify(IBREAKENABLE) "\n\t" - "wsr a2, " __stringify(LCOUNT) "\n\t" - "movi a2, 0x1f\n\t" - "wsr a2, " __stringify(PS) "\n\t" - "isync\n\t" - "jx %0\n\t" - : - : "a" (XCHAL_RESET_VECTOR_VADDR) - : "a2"); - - /* control never gets here */ -} - -extern void iss_net_poll(void); - -const char twirl[]="|/-\\|/-\\"; - -void platform_heartbeat(void) -{ -#if 0 - static int i = 0, j = 0; - - if (--i < 0) { - i = 99; - printk("\r%c\r", twirl[j++]); - if (j == 8) - j = 0; - } -#endif -} - - - -static int -iss_panic_event(struct notifier_block *this, unsigned long event, void *ptr) -{ - __asm__ __volatile__("movi a2, -1; simcall\n"); - return NOTIFY_DONE; -} - -static struct notifier_block iss_panic_block = { - iss_panic_event, - NULL, - 0 -}; - -void __init platform_setup(char **p_cmdline) -{ - atomic_notifier_chain_register(&panic_notifier_list, &iss_panic_block); -} diff --git a/arch/xtensa/platforms/iss/Makefile b/arch/xtensa/platforms/iss/Makefile new file mode 100644 index 00000000000..af96e314d71 --- /dev/null +++ b/arch/xtensa/platforms/iss/Makefile @@ -0,0 +1,8 @@ +# $Id: Makefile,v 1.1.1.1 2002/08/28 16:10:14 aroll Exp $ +# +# Makefile for the Xtensa Instruction Set Simulator (ISS) +# "prom monitor" library routines under Linux. +# + +obj-y = io.o console.o setup.o network.o + diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c new file mode 100644 index 00000000000..854677d0c3f --- /dev/null +++ b/arch/xtensa/platforms/iss/console.c @@ -0,0 +1,296 @@ +/* + * arch/xtensa/platform-iss/console.c + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the fil