From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933848AbbLPBLT (ORCPT ); Tue, 15 Dec 2015 20:11:19 -0500 Received: from mail-am1on0061.outbound.protection.outlook.com ([157.56.112.61]:26999 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932632AbbLPBLR (ORCPT ); Tue, 15 Dec 2015 20:11:17 -0500 Authentication-Results: spf=fail (sender IP is 212.179.42.66) smtp.mailfrom=ezchip.com; linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=ezchip.com; From: Noam Camus To: CC: , , , Noam Camus Subject: [PATCH v4 00/19] Adding plat-eznps to ARC Date: Wed, 16 Dec 2015 03:10:19 +0200 Message-ID: <1450228238-4499-1-git-send-email-noamc@ezchip.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.000.1202-22004.003 X-TM-AS-Result: No--13.745600-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;DB3FFO11FD020;1:ORqITfGaFtYc+Vaf2g5EvMln4l+oeNC6jTWaxUt7zXxYSD8b49nJBEhttBm5xEuHBIhD67lM+eYqj+EYR2ChCFPx5RTfaTbB4dncMaaMd04y4Z9fGimh/iPrP1KgDtlPbOwwHGjkpB9G95/+4w37G8mDvwrIwQgVR9JbS7g794D4aLXwn3oI7Og1R/iZ+XvotAPKXyemE26C1BkA+wlobDFv8MndCoMm8uuyjpEA+y54ZnQpECiSzuW8Piq8s0XeEh3LZjg2MswFezRWEfGJMEw7I1tV+1agonXKTHErkZi6jGJR5wlZktC25OXDF/0kcia0u96nn98vwWLT7aK3F6PKW8s1bS6UKr0uObspfIfYFe1FwYvfr3YM5QYR1ie5dvkAVzAgj6Nm1Wa5VAsJiQ== X-Forefront-Antispam-Report: CIP:212.179.42.66;CTRY:IL;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(54164003)(66654002)(5008740100001)(87936001)(104016004)(19580405001)(33646002)(110136002)(6806005)(49486002)(47776003)(77096005)(106466001)(4001430100002)(107886002)(19580395003)(189998001)(92566002)(36756003)(229853001)(5001970100001)(2351001)(48376002)(85426001)(1220700001)(86362001)(586003)(50466002)(105606002)(1096002)(50226001)(5003940100001)(50986999)(11100500001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM3PR02MB1202;H:ezex10.ezchip.com;FPR:;SPF:Fail;PTR:ezmail.ezchip.com;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;AM3PR02MB1202;2:i2ra9nsZ+MB1QgH6+gpkbYK7j8F+WENcNt1Jt0aHBTZD9OvxvC799apGehWCIfxJ9gEChyUi8K5UforxbDpPpSZZ+yPQrDfjOGzWB6eZIgfS4te2YAMQCWfldJ5C+eXVRSirhBWzgsqrgnx2utq3TQ==;3:EJxjpJ0/XIzlahIaX3PhxhJgdJ7SFHZq8HHDBBHJqXEJVj9PiIshgasgdKF3QRwldZsS5aWOrOw+q2gwirnEBRlS6dFL5wauxHFIgWiR8mqwaGEEXxOl8LJdxhb7C7hiB+yU/m6O8mkdTpOhBhTIhimUB1YJoKxeYsAtKXyTWuA+7VPuBuXDSw6TaIEWFVFJI/kh1np/x74IWHphdMZjHSkhXidoLjFnqPBQuRFr1n4=;25:zMYxfHdss2FgGWKxbvlN/A6Gqz6XKTFkx0w7mhIuNlRLYLiB5nwBUTfhjm7XjmekKpoOkTVx6MwEMsXaajfR+cIe+Y6dDZG2I6hgMMHCMBFnm54dTaz6ciP/lO1Xe9hD0Xg9Nf9GeLPXqwqK93GWz4smfZGLTq0ph/k4QVf0RwWAs5QUOgapcsMutbuP+A7ssCNlIt7/NBqLa37R58zb7R9o+UJOR0tHkP1Ha0E6kHrVfIt8prsU+Rp9VVFqF8bo;20:lPvsqZ2JxDQE1h9cLqwmrkIqPRJWzuTyyOyrOwPUVTkN3rTqY9zbisyNHz9s7rEs/A9HYdAW0//LBSe2Bj2bhjYnwbDNTNr8m3fY8SDsnUbKttVh1KLjx2Bh76hYqKE2nIr8c4pGDximDf8uq/KXFXyq5lC8/AtZ7wzvWR9EuYQ= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM3PR02MB1202; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(121898900299872); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(3002001)(10201501046);SRVR:AM3PR02MB1202;BCL:0;PCL:0;RULEID:;SRVR:AM3PR02MB1202; X-Microsoft-Exchange-Diagnostics: 1;AM3PR02MB1202;4:Zp40wRSKYu/16m/m9E8PZtbzkwQVDRuSl571fWie9+0b5MJ1xDvPsWHhgNtDHZCmukGyGt+eH0c6oua1tNH7hqqWc0wVpP45TUeOR9y5xoiZZ194INK8vV0o22v8GaiO2eS2r3lQ26ILZnsc/twMxcYJJxMJXvl0+HEnZ8hq80m7AxQsP3iCeIl80XxrTPMahJU+7KOzpvJN+ZY6yjD0Jq7KdVyCtVUlIP87akeyFrMfYcaH4FUUN30/01s13klNwcWmnEov+ZPwZdod82V7pjgaQRxoQwrmDl4tT8izFubz1vdMIJQodsJ7pyA2Fo5c9qvOliILvdzuzkHjz2A8j9s7Nl8I1hwlOeLSAy8rStCXbi8b2PvH3Nt3FUfxQlSoJiw+Y2E37pXws4zckMbBF4Aru/7elyeAdcv04/QC1Og= X-Forefront-PRVS: 0792DBEAD0 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;AM3PR02MB1202;23:3pZUDWJPmSb6WsKLPkOf9gAFQ50CKovnBGaIv+2n8?= =?us-ascii?Q?PmsgPI6Q5qF+Dhx+vj3jQMn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Q?hTYzl/ytZkjLANqDYpGGQ6549pGo88yyay66VRExcV9ln0iueGixp1RbZ6Va?= =?us-ascii?Q?A6zAfR3WE7eSwwM5+042EeJ5fDi62WUiyhviXeTBSe3DayNNG9AyyIVTu8mX?= =?us-ascii?Q?OhlO3EvQxIyaOqPXXVW/4czUKF7aCDWB5n7eHoPjyk6xysJag=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;AM3PR02MB1202;5:Xefba1dDFK8rzlP4cJvBdEltamLdCPq1cdOzto9Kyn92kHnI1QapTHNQV9ByzCKcExbOrGcjszxeXQ6QGFT2F21Wi5wnzunajxGLZARznFjrqBtzZ3I4cq8IC3iVDLrXSDLdo8EXLzkZDZ0NvF6kYA==;24:ZOopNPNmKltR5W76ZjBSwgleFPZD1nUXAsrGtWRuScMWR0vfKX0WJiEgxUwaxJJZB1qwexyqoYmO4jkxRCw86l1FxP8gnVPKfIUBbpP7E/Q= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2015 01:11:13.7662 (UTC) X-MS-Exchange-CrossTenant-Id: 0fc16e0a-3cd3-4092-8b2f-0a42cff122c3 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=0fc16e0a-3cd3-4092-8b2f-0a42cff122c3;Ip=[212.179.42.66];Helo=[ezex10.ezchip.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR02MB1202 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Noam Camus v4: 1) irqchip -- use irq_domain_add_linear() 2) clocksource -- use of_clk_get() 3) New header at include/soc use by platform and drivers 4) update DTS file for above fixed drivers v3: 1) irqchip: use MACROS instead of structures to decribe registers. 2) clocksource: use 32bit counter and avoid 2 halfs read of 64bit dance. v2: 1) Remove out of tree platform include path 2) Move atomic/bitop/cmpxchg for platform to end. Remove macro duplication. Fix some bad implementation. 3) define cpu_relax_lowlatency() for platform. 4) rename init_irq_cpu() to init_per_cpu() reorder call to init_per_cpu() for secondary use it instead of init_cpu_smp(). 5) set res_service to call stext 6) fix build failure for CTOP_AUX_BASE at assembly code 7) Use ilog2 for mtm_init_nat() 8) Add CLKSRC_NPS option to Kconfig change nps_clksrc_read() to be more readable. General summay: This set introduce new platform to ARC architecture. Platform name called "eznps" for working with EZchip NPS400 Network Proccessor. NPS400 is targeted to service "fast path" network applications. NPS400 got mesh of 256 extended ARC cores (AKA CTOP), each core got 16 HW threads. This is basically SMT core where at any point of time only one HW thread is active. Each core have HW scheduler that round robin between eligible HW threads. Totaly, kernel sees 4096 CPUs which I belive is a high record. There is no cache coherency between cores so generic user applications and kernel do not use D$. Cores got special memory mappings for huge pages (8MB). Mapping is static and should provide application enough memory without any "TLB miss". This mapping is on top of TLB mapping. This is a basic set that will later be followed with additional set of patches with all advanced features. Many thanks to all people helping to make this happen. Regards, Noam Camus Noam Camus (18): Documentation: Add EZchip vendor to binding list soc: Support for EZchip SoC ARC: [plat-eznps] define IPI_IRQ clocksource: Add NPS400 timers driver irqchip: add nps Internal and external irqchips ARC: Set vmalloc size from configuration ARC: rwlock: disable interrupts in !LLSC variant ARC: rename smp operation init_irq_cpu() to init_per_cpu() ARC: Mark secondary cpu online only after all HW setup is done ARC: Add clock from device tree to time_init() ARC: [plat-eznps] Add eznps board defconfig and dts ARC: [plat-eznps] Add eznps platform ARC: [plat-eznps] Use dedicated user stack top ARC: [plat-eznps] Use dedicated atomic/bitops/cmpxchg ARC: [plat-eznps] Use dedicated SMP barriers ARC: [plat-eznps] Use dedicated identity auxiliary register. ARC: [plat-eznps] Use dedicated COMMAND_LINE_SIZE ARC: Add eznps platform to Kconfig and Makefile Tal Zilcer (1): ARC: [plat-eznps] Use dedicated cpu_relax() Documentation/devicetree/bindings/arc/eznps.txt | 7 + .../interrupt-controller/ezchip,nps400-ic.txt | 17 ++ .../bindings/timer/ezchip,nps400-timer.txt | 15 ++ .../devicetree/bindings/vendor-prefixes.txt | 1 + MAINTAINERS | 6 + arch/arc/Kconfig | 9 + arch/arc/Makefile | 5 + arch/arc/boot/dts/eznps.dts | 93 +++++++++ arch/arc/configs/nps_defconfig | 85 +++++++++ arch/arc/include/asm/atomic.h | 79 ++++++++- arch/arc/include/asm/barrier.h | 8 + arch/arc/include/asm/bitops.h | 54 ++++++ arch/arc/include/asm/cmpxchg.h | 87 +++++++-- arch/arc/include/asm/entry-compact.h | 8 + arch/arc/include/asm/irq.h | 4 + arch/arc/include/asm/pgtable.h | 2 +- arch/arc/include/asm/processor.h | 36 +++- arch/arc/include/asm/setup.h | 4 + arch/arc/include/asm/smp.h | 4 +- arch/arc/include/asm/spinlock.h | 14 ++ arch/arc/kernel/ctx_sw.c | 13 ++ arch/arc/kernel/irq.c | 4 +- arch/arc/kernel/mcip.c | 2 +- arch/arc/kernel/smp.c | 14 +- arch/arc/kernel/time.c | 10 +- arch/arc/mm/tlb.c | 12 ++ arch/arc/plat-eznps/Kconfig | 34 ++++ arch/arc/plat-eznps/Makefile | 7 + arch/arc/plat-eznps/entry.S | 75 ++++++++ arch/arc/plat-eznps/include/plat/ctop.h | 198 ++++++++++++++++++++ arch/arc/plat-eznps/include/plat/mtm.h | 60 ++++++ arch/arc/plat-eznps/include/plat/smp.h | 26 +++ arch/arc/plat-eznps/mtm.c | 133 +++++++++++++ arch/arc/plat-eznps/platform.c | 102 ++++++++++ arch/arc/plat-eznps/smp.c | 156 +++++++++++++++ drivers/clocksource/Kconfig | 7 + drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-nps.c | 68 +++++++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-eznps.c | 131 +++++++++++++ include/soc/nps/common.h | 123 ++++++++++++ 41 files changed, 1678 insertions(+), 37 deletions(-) create mode 100644 Documentation/devicetree/bindings/arc/eznps.txt create mode 100644 Documentation/devicetree/bindings/interrupt-controller/ezchip,nps400-ic.txt create mode 100644 Documentation/devicetree/bindings/timer/ezchip,nps400-timer.txt create mode 100644 arch/arc/boot/dts/eznps.dts create mode 100644 arch/arc/configs/nps_defconfig create mode 100644 arch/arc/plat-eznps/Kconfig create mode 100644 arch/arc/plat-eznps/Makefile create mode 100644 arch/arc/plat-eznps/entry.S create mode 100644 arch/arc/plat-eznps/include/plat/ctop.h create mode 100644 arch/arc/plat-eznps/include/plat/mtm.h create mode 100644 arch/arc/plat-eznps/include/plat/smp.h create mode 100644 arch/arc/plat-eznps/mtm.c create mode 100644 arch/arc/plat-eznps/platform.c create mode 100644 arch/arc/plat-eznps/smp.c create mode 100644 drivers/clocksource/timer-nps.c create mode 100644 drivers/irqchip/irq-eznps.c create mode 100644 include/soc/nps/common.h