From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752495AbbKGKxz (ORCPT ); Sat, 7 Nov 2015 05:53:55 -0500 Received: from mail-am1on0092.outbound.protection.outlook.com ([157.56.112.92]:26752 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751180AbbKGKxv (ORCPT ); Sat, 7 Nov 2015 05:53:51 -0500 Authentication-Results: spf=fail (sender IP is 212.179.42.66) smtp.mailfrom=ezchip.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=ezchip.com; From: Noam Camus To: CC: , , , , Noam Camus Subject: [PATCH v2 00/19] eznps a new ARC platform Date: Sat, 7 Nov 2015 12:52:18 +0200 Message-ID: <1446893557-29748-1-git-send-email-noamc@ezchip.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1446297327-16298-1-git-send-email-noamc@ezchip.com> References: <1446297327-16298-1-git-send-email-noamc@ezchip.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.000.1202-21926.006 X-TM-AS-Result: No--12.971200-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;AM1FFO11FD013;1:C0+z38vOGcfJ7WbpuVpLc3WM6ENXKnArtT04BnqizAVgAizMYgZHw43FZ4ge8yRzY4HTANede8U8bv4BMucxuq3w2fTqpkTI8r5LNXTpXqUW7RISS4f2LwmC6wxTNceI0YFOZKeNpIn3/8xTuFvGfZHp2sN/O7wTV7f+F4O3+initcGSvOsRTdCx/1OxsBjl2JWe4WAUqHl6WPmM/24JRIdnASdyqo74m95sKlF/cZ43J/Vin5BDOlYR001wH5Nr0KBeKx5H4LhpkvJqXyVE/FnxzRXeFTkbHQ/IrEvADPcsuiA808I/2k8IOzWzSBqng4E63jqJmCvrVyHTSuu7l8NPfmzI8oPqls/TlY6Ym3Qp+x1voK5pxWgikR0gCHego5bIhS8euw5+94Ck8MCViQ== X-Forefront-Antispam-Report: CIP:212.179.42.66;CTRY:IL;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(54164003)(66654002)(189002)(199003)(85426001)(5008740100001)(92566002)(36756003)(49486002)(5003940100001)(77096005)(87936001)(4001430100002)(19580395003)(50226001)(2950100001)(19580405001)(47776003)(50466002)(5001920100001)(5001970100001)(48376002)(5007970100001)(33646002)(107886002)(110136002)(189998001)(2351001)(229853001)(105606002)(106466001)(104016004)(50986999)(86362001)(76176999)(6806005);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR02MB188;H:ezex10.ezchip.com;FPR:;SPF:Fail;PTR:ezmail.ezchip.com;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;DB3PR02MB188;2:B/JZ7BMMNbRUeyWoiBeIO7WoEdcyJYTZLigSIENglKNVJram5Z58m2gkXHtw/48OUl7EGNkA9kLFF8GE8Lri2k8MuFroibBR6Rx/Ez4NeF4sVs7J6HczxOYwz1SdoJzxgjprXVE6us9k7RjWMIdXtfOyVRHPtVZF9kSUyMzWRzo=;3:Lttuc4YlupPEejTSoGttG/kEnLHcpPrTxPLFzfo5TAgQ62DyafKsvHTJR+/qRg+FEk3VSLjdD51psRjfB1m1/EbBFl2wILFeqHtTZfYDsaS8mg4wgaD6T6OxgaFj3yg12L3TjXm7EB6ObFcSQU3yWDQiOnDTBQYkkmI7zPEWZBuoIyFpqpH7GGkQeS4/NiTv5mssVfLlv6ElO9mDqflCCV1to/f6MIwoO7Fr+Dh7KX8=;25:JoaLQOhHHSD9zizr+EiHk10/4JRMzsN1ejuUbqAwz5WesWt13peqD5RJay7+Yvf6y8IgSH6VwU4wYBTvs6q7IM8M2gzMGGH416JB8ZWoxE9mwvCAXE4dbqTM46m4CajpPDPpHx8kBziCROr2e5Ctg7rf5gAlRAtYkXdCcQycoTRxPHXV5+W6vwNhYAmQrgFdj0/MGsj8gvY8PSWq+rkWDEVUcEfpHuHrw2790o+UI1sBmucooTmChSsggR/2yb4J;20:m3USn7oTMR/lhz8MCfIECOcBZHyXmc/wFuQ9teonyFxi0lyrHAGZg1YXqfwaIHiMWRMkKdGUqN+2bRPTMJymlUoEgceHOrqo8mhk3Di7euHRANUg8u7U8CTMLVSAF5tukiPRieEt6obCCbLyrVXHb2wtn5edRXrR7Y7BwQ1kevA= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB3PR02MB188; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(121898900299872); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(10201501046)(3002001);SRVR:DB3PR02MB188;BCL:0;PCL:0;RULEID:;SRVR:DB3PR02MB188; X-Microsoft-Exchange-Diagnostics: 1;DB3PR02MB188;4:a8ukEG/3um4nRqqODPE5euMfaB06+NYnIfsxxst+oPvSgD5e1hdbWWR8oKe6RMZpqH1u8n0YwREXrULtdb8RgGTng3hLoIneJK1pR7NTdjMYytLUqCcJTQWo5T/6nex0uNa+4dECvHfbQrPdORFSGhVGuL/3mjQgvUtJ12vvDBrgFzn712bKT9IuWfY5LOby1HWZAae84K1KMLADFK/jWRT/wKOs4wGp4ouMFYUigCVKuwpxdC2LaBhjUzLfXKD1/j0EX9n09+LHK2orldLnPOdrkmQxZiPiFmMzXtLZ8q2zbYLiA6gtukbufI6fMj5so2hm7guo7x7SA/03r2GDWQy7fr1hJ512KBagkxeckMrGwdSZOY78/bfdovFjoCYY X-Forefront-PRVS: 0753EA505A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DB3PR02MB188;23:djDw1omePL+lQUPX4NB8kCsIFH+5hkxzwd+kQSJVku?= =?us-ascii?Q?Cyb3P0BbepfJNFYNp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7TChr0h/HrRfw428x?= =?us-ascii?Q?9iLqyelOeupvTolkrLQGZtdutn8U4AIoFnE5R6+xVMqoqVmGUeIhovImu+kh?= =?us-ascii?Q?XNeNTZ8E6pr5vCKQ1suT8N6/KvzhCiu0hpYs8UfPoGciIR3TceoDdwlsLyEn?= =?us-ascii?Q?zOg5xmFPAUpKDLGAx6AtC6oiQPckdU3Pn4vJtVY+/g1NWkYwIg0aOUkBfWFJ?= =?us-ascii?Q?c4re458dU=3D?= X-Microsoft-Exchange-Diagnostics: 1;DB3PR02MB188;5:LgtqTmlpCmyBAImNlJTiZgkNFIQ4B0xNpgIqJszHIZpYWXhRuW9RqAQzQfLj2A6jjeVWYLGXxtNwEzAN+3BPd/fUkwSRLchGFr/UlcPuv9ooP9SVSFkp64j0x0eimo/rL4fjZsIEYM5xiNZvM5E+6Q==;24:gFNp2I3l4FYV4SVhA5jOfMraZr6BJLLj08KWlxucTznJipQEf21Kk/muC6JuCxA5bLwvG1cxEDDYp1GwyVdXRvqDhfOsr1QOxeCqh/0Nkj0=;20:XoVLaLCI/Zp8+MihdIbdNT5ZtmdhfBVuP/tWIOn/NqF+9Vm+3SjO6/QpBTVsB8lSK4JDXP+n3krIPUjoEQF1zg== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2015 10:53:46.7103 (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: DB3PR02MB188 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Noam Camus 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 (17): Documentation: Add EZchip vendor to binding list 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 CONFIG_CLKSRC_OF support 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 (2): ARC: [plat-eznps] Use dedicated cpu_relax() ARC: [plat-eznps] replace sync with proper cpu barrier Documentation/devicetree/bindings/arc/eznps.txt | 7 + .../interrupt-controller/ezchip,nps400-ic.txt | 17 ++ .../bindings/timer/ezchip,nps400-timer.txt | 11 + .../devicetree/bindings/vendor-prefixes.txt | 1 + MAINTAINERS | 6 + arch/arc/Kconfig | 9 + arch/arc/Makefile | 5 + arch/arc/boot/dts/eznps.dts | 76 ++++++ 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 | 20 ++ arch/arc/kernel/irq.c | 4 +- arch/arc/kernel/mcip.c | 2 +- arch/arc/kernel/smp.c | 14 +- arch/arc/kernel/time.c | 4 + 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 | 271 ++++++++++++++++++++ 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 | 27 ++ arch/arc/plat-eznps/smp.c | 149 +++++++++++ drivers/clocksource/Kconfig | 7 + drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-nps.c | 85 ++++++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-eznps.c | 222 ++++++++++++++++ 40 files changed, 1635 insertions(+), 36 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