summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-09-09sparc64: Handle additional cases of no fault loadsRob Gardner1-0/+51
Load instructions using ASI_PNF or other no-fault ASIs should not cause a SIGSEGV or SIGBUS. A garden variety unmapped address follows the TSB miss path, and when no valid mapping is found in the process page tables, the miss handler checks to see if the access was via a no-fault ASI. It then fixes up the target register with a zero, and skips the no-fault load instruction. But different paths are taken for data access exceptions and alignment traps, and these do not respect the no-fault ASI. We add checks in these paths for the no-fault ASI, and fix up the target register and TPC just like in the TSB miss case. Signed-off-by: Rob Gardner <rob.gardner@oracle.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-09-09sparc64: speed up etrap/rtrap on NG2 and later processorsAnthony Yznaga5-6/+45
For many sun4v processor types, reading or writing a privileged register has a latency of 40 to 70 cycles. Use a combination of the low-latency allclean, otherw, normalw, and nop instructions in etrap and rtrap to replace 2 rdpr and 5 wrpr instructions and improve etrap/rtrap performance. allclean, otherw, and normalw are available on NG2 and later processors. The average ticks to execute the flush windows trap ("ta 0x3") with and without this patch on select platforms: CPU Not patched Patched % Latency Reduction NG2 1762 1558 -11.58 NG4 3619 3204 -11.47 M7 3015 2624 -12.97 SPARC64-X 829 770 -7.12 Signed-off-by: Anthony Yznaga <anthony.yznaga@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-29sparc64: vcc: make ktermios constBhumika Goyal1-1/+1
Make this const as it is not modified anywhere. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-28sparc: leon: grpci1: constify of_device_idArvind Yadav1-1/+1
of_device_id are not supposed to change at runtime. All functions working with of_device_id provided by <linux/of.h> work with const of_device_ids. So mark the const and __initconst. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-28sparc: leon: grpci2: constify of_device_idArvind Yadav1-1/+1
of_device_id are not supposed to change at runtime. All functions working with of_device_id provided by <linux/of.h> work with const of_device_ids. So mark the const and __initconst. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-28sparc64: vcc: Check for IS_ERR() instead of NULLDan Carpenter1-2/+2
The tty_alloc_driver() function never returns NULL, it returns error pointers on error. Fixes: ce808b746325 ("sparc64: vcc: TTY driver initialization and cleanup") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15Merge branch 'sparc64-16gb-hugepages'David S. Miller10-55/+221
Nitin Gupta says: ==================== sparc64: Add 16GB hugepage support SPARC architecture supports 16G hugepages but the kernel did not support these. This patch series adds support for it and also cleanes up some page walk/alloc functions. Patch 1/3: Core changes needed to add 16G hugepage support: To map a single 16G hugepage, two PUD entries are used. Each PUD entry maps 8G portion of a 16G page. This page table encoding scheme is same as that used for hugepages at PMD level (8M, 256M and 2G pages) where each PMD entry points successively to 8M regions within a page. No page table entries below the PUD level are allocated for 16G hugepage since those are not required. TSB entries for a 16G page are created at every 4M boundary since the HUGE_TSB is used for these pages which is configured with page size of 4M. When walking page tables (on a TSB miss), bits [32:22] are transferred from vaddr to PUD to resolve addresses at 4M boundary. The resolved address mapping is then stored in HUGE_TSB. Patch 2/3: get_user_pages() etc. are used for direct IO. These functions were not aware of hugepages at the PUD level and would try to continue walking page tables beyond the PUD level. Since 16G hugepages have page tables allocated till PUD level only, these accesses would result in invalid access. This patch adds the case for PUD huge pages to these functions. Patch 3/3: Patch 1 added the case of PUD entry being huge in page table walk and alloc functions. This new case further increased nesting in these functions and made them harder to follow. This patch flattens these functions for better readability. Cc: sparclinux@vger.kernel.org Chagenlog v6 vs v5: - Move include of hvcalls.S after the trap table to avoid overflowing previous space (Anthony) Changelog v5 vs v4: - Checking at PUD level for hugepage entry during page table walk is patched out if 16GB hugepages are not being used. Changelog v4 vs v3: - Added cover letter (patch 0/4) for patch series. Changelog v3 vs v2: - Fixed email headers so the subject shows up correctly. Changelog v2 vs v1: - Remove redundant brgez,pn (Bob Picco) - Remove unncessary label rename from 700 to 701 (Rob Gardner) - Add patch description (Paul) - Add 16G case to get_user_pages() ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15sparc64: Cleanup hugepage table walk functionsNitin Gupta1-34/+20
Flatten out nested code structure in huge_pte_offset() and huge_pte_alloc(). Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15sparc64: Add 16GB hugepage supportNitin Gupta9-31/+157
Adds support for 16GB hugepage size. To use this page size use kernel parameters as: default_hugepagesz=16G hugepagesz=16G hugepages=10 Testing: Tested with the stream benchmark which allocates 48G of arrays backed by 16G hugepages and does RW operation on them in parallel. Orabug: 25362942 Cc: Anthony Yznaga <anthony.yznaga@oracle.com> Reviewed-by: Bob Picco <bob.picco@oracle.com> Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15sparc64: Support huge PUD case in get_user_pagesNitin Gupta2-3/+57
get_user_pages() is used to do direct IO. It already handles the case where the address range is backed by PMD huge pages. This patch now adds the case where the range could be backed by PUD huge pages. Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15Merge branch 'sparc64-vcc'David S. Miller9-3/+1184
Jag Raman says: ==================== sparc64: Enable Virtual Console Concentrator (VCC) Patchset to enable Virtual Console Concentrator (VCC). VCC provides access to the serial console of a guest domain. It creates a RAW VIO/LDC link between the guest domain & primary through which serial console data is shared. This set addresses feedback provided by Dave Miller. Cleanup of driver state is also addressed in this set. Patches updated are 4, 5, 6 & 7. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15sparc64: vcc: Add install & cleanup TTY operationsJag Raman1-0/+73
Add handlers to support TTY install & cleanup operations Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15sparc64: vcc: Add break_ctl TTY operationJag Raman1-0/+35
Add handler to support TTY break_ctl operation Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15sparc64: vcc: Add chars_in_buffer TTY operationJag Raman1-5/+29
Add handler to support TTY chars_in_buffer operation Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15sparc64: vcc: Add write & write_room TTY operationsJag Raman1-3/+98
Add handlers to support TTY write & write_room operations Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15sparc64: vcc: Add hangup TTY operationJag Raman1-0/+41
Add handler to support TTY hangup operation Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15sparc64: vcc: Add open & close TTY operationsJag Raman1-1/+62
Add handlers to support TTY open & close operations Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15sparc64: vcc: Enable LDC event processing engineJag Raman1-0/+34
Enable event processing engine to handle LDC events Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15sparc64: vcc: Add RX & TX timer for delayed LDC operationJag Raman2-2/+194
Add RX & TX timers to perform delayed/asynchronous LDC read and write operations. Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15sparc64: vcc: Create sysfs attribute groupJag Raman1-0/+82
Create sysfs attribute group to show the domain name and send break command. Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15sparc64: vcc: Enable VCC port probe and removalJag Raman4-3/+398
Enables VCC port probe and removal to initialize and terminate VCC ports respectively. When a device/port matching the VCC driver is added, the probe function is invoked along with a reference to the device. remove function is called when the device is removed. Also add APIs to cache and retrieve VCC ports from a VCC table Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15sparc64: vcc: TTY driver initialization and cleanupJag Raman1-1/+82
Allocate and register TTY driver during module init. Cleanup TTY driver during module exit. Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15sparc64: vcc: Add VCC debug message macrosJag Raman2-0/+42
Add C macros to print debug messages from VCC module Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15sparc64: vcc: Enable VCC module in linuxJag Raman5-0/+26
Enables the Virtual Console Concentrator (VCC) module in linux kernel Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-10Merge branch 'sparc64-M7-memcpy'David S. Miller9-215/+1845
Babu Moger says: ==================== sparc64: Update memcpy, memset etc. for M7/M8 architectures This series of patches updates the memcpy, memset, copy_to_user, copy_from_user etc for SPARC M7/M8 architecture. New algorithm here takes advantage of the M7/M8 block init store ASIs, with much more optimized way to improve the performance. More detail are in code comments. Tested and compared the latency measured in ticks(NG4memcpy vs new M7memcpy). 1. Memset numbers(Aligned memset) No.of bytes NG4memset M7memset Delta ((B-A)/A)*100 (Avg.Ticks A) (Avg.Ticks B) (latency reduction) 3 77 25 -67.53 7 43 33 -23.25 32 72 68 -5.55 128 164 44 -73.17 256 335 68 -79.70 512 511 220 -56.94 1024 1552 627 -59.60 2048 3515 1322 -62.38 4096 6303 2472 -60.78 8192 13118 4867 -62.89 16384 26206 10371 -60.42 32768 52501 18569 -64.63 65536 100219 35899 -64.17 2. Memcpy numbers(Aligned memcpy) No.of bytes NG4memcpy M7memcpy Delta ((B-A)/A)*100 (Avg.Ticks A) (Avg.Ticks B) (latency reduction) 3 20 19 -5 7 29 27 -6.89 32 30 28 -6.66 128 89 69 -22.47 256 142 143 0.70 512 341 283 -17.00 1024 1588 655 -58.75 2048 3553 1357 -61.80 4096 7218 2590 -64.11 8192 13701 5231 -61.82 16384 28304 10716 -62.13 32768 56516 22995 -59.31 65536 115443 50840 -55.96 3. Memset numbers(un-aligned memset) No.of bytes NG4memset M7memset Delta ((B-A)/A)*100 (Avg.Ticks A) (Avg.Ticks B) (latency reduction) 3 40 31 -22.5 7 52 29 -44.2307692308 32 89 86 -3.3707865169 128 201 74 -63.184079602 256 340 154 -54.7058823529 512 961 335 -65.1404786681 1024 1799 686 -61.8677042802 2048 3575 1260 -64.7552447552 4096 6560 2627 -59.9542682927 8192 13161 6018 -54.273991338 16384 26465 10439 -60.5554505951 32768 52119 18649 -64.2184232238 65536 101593 35724 -64.8361599717 4. Memcpy numbers(un-aligned memcpy) No.of bytes NG4memcpy M7memcpy Delta ((B-A)/A)*100 (Avg.Ticks A) (Avg.Ticks B) (latency reduction) 3 26 19 -26.9230769231 7 48 45 -6.25 32 52 49 -5.7692307692 128 284 334 17.6056338028 256 430 482 12.0930232558 512 646 690 6.8111455108 1024 1051 1016 -3.3301617507 2048 1787 1818 1.7347509793 4096 3309 3376 2.0247809006 8192 8151 7444 -8.673782358 16384 34222 34556 0.9759803635 32768 87851 95044 8.1877269468 65536 158331 159572 0.7838010244 There is not much difference in numbers with Un-aligned copies between NG4memcpy and M7memcpy because they both mostly use the same algorithems. v2: 1. Fixed indentation issues found by David Miller 2. Used ENTRY and ENDPROC for the labels in M7patch.S as suggested by David Miller 3. Now M8 also will use M7memcpy. Also tested on M8 config. 4. These patches are created on top of below M8 patches https://patchwork.ozlabs.org/patch/792661/ https://patchwork.ozlabs.org/patch/792662/ However, I did not see these patches in sparc-next tree. It may be in queue now. It is possible these patches might cause some build problems. It will resolve once all M8 patches are in sparc-next tree. v0: Initial version ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-10arch/sparc: Add accurate exception reporting in M7memcpyBabu Moger4-209/+390
Add accurate exception reporting in M7memcpy Signed-off-by: Babu Moger <babu.moger@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-10arch/sparc: Optimized memcpy, memset, copy_to_user, copy_from_user for M7/M8Babu Moger7-2/+1435
New algorithm that takes advantage of the M7/M8 block init store ASI, ie, overlapping pipelines and miss buffer filling. Full details in code comments. Signed-off-by: Babu Moger <babu.moger@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-10arch/sparc: Rename exception handlersBabu Moger2-124/+124
Rename exception handlers to memcpy_xxx as these are going to be used by new memcpy routines and these handlers are not exclusive to NG4memcpy anymore. Signed-off-by: Babu Moger <babu.moger@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-10arch/sparc: Separate the exception handlers from NG4memcpyBabu Moger3-149/+165
Separate the exception handlers from NG4memcpy so that it can be used with new memcpy routines. Make a separate file for all these handlers. Signed-off-by: Babu Moger <babu.moger@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-10sparc64: update comments in U3memcpySam Ravnborg1-11/+21
Update comments about the range the different parts of the code copies, the original comments were wrong. Introduce a few descriptive labels too. No functional changes. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparcDavid S. Miller1106-21813/+23509
2017-08-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds10-22/+33
Pull networking fixes from David Miller: 1) Fix handling of initial STATE message in TIPC, from Jon Paul Maloy. 2) Fix stats handling in bcm_sysport_get_stats(), from Florian Fainelli. 3) Reject 16777215 VNI value in geneve_validate(), from Girish Moodalbail. 4) Fix initial IGMP sysctl setting regression, from Nikolay Borisov. 5) Once a UFO fragmented frame is treated as UFO, we should continue doing so. Likewise once a frame has been segmented, we should continue doing that and not try to convert it to a UFO frame. From Willem de Bruijn. 6) Test the AF_PACKET RX/TX ring pg_vec state under the socket lock to prevent races. From Willem de Bruijn. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: packet: fix tp_reserve race in packet_set_ring udp: consistently apply ufo or fragmentation net: sched: set xt_tgchk_param par.nft_compat as 0 in ipt_init_target igmp: Fix regression caused by igmp sysctl namespace code. geneve: maximum value of VNI cannot be used net: systemport: Fix software statistics for SYSTEMPORT Lite tipc: remove premature ESTABLISH FSM event at link synchronization
2017-08-10packet: fix tp_reserve race in packet_set_ringWillem de Bruijn1-4/+9
Updates to tp_reserve can race with reads of the field in packet_set_ring. Avoid this by holding the socket lock during updates in setsockopt PACKET_RESERVE. This bug was discovered by syzkaller. Fixes: 8913336a7e8d ("packet: add PACKET_RESERVE sockopt") Reported-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-10udp: consistently apply ufo or fragmentationWillem de Bruijn3-7/+10
When iteratively building a UDP datagram with MSG_MORE and that datagram exceeds MTU, consistently choose UFO or fragmentation. Once skb_is_gso, always apply ufo. Conversely, once a datagram is split across multiple skbs, do not consider ufo. Sendpage already maintains the first invariant, only add the second. IPv6 does not have a sendpage implementation to modify. A gso skb must have a partial checksum, do not follow sk_no_check_tx in udp_send_skb. Found by syzkaller. Fixes: e89e9cf539a2 ("[IPv4/IPv6]: UFO Scatter-gather approach") Reported-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-10sparc64: Revert 16GB huge page support.David S. Miller9-220/+54
It overflows the amount of space available in the initial .text section of trap handler assembler in some configurations, resulting in build failures. Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparcLinus Torvalds7-11/+124
Pull sparc updates from David Miller: 1) Recognize M8 cpus, just basic chip ID matching, from Allen Pais. 2) Prevent crashes when bringing up sunvdc virtual block devices in some environments. From Jim Quigley. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sunvdc: prevent sunvdc panic when mpgroup disk added to guest domain sparc64: Increase max_phys_bits to 51 and VA bits to 53 for M8. sparc64: recognize and support sparc M8 cpu type sparc64: properly name the cpu constants
2017-08-09net: sched: set xt_tgchk_param par.nft_compat as 0 in ipt_init_targetXin Long1-1/+1
Commit 55917a21d0cc ("netfilter: x_tables: add context to know if extension runs from nft_compat") introduced a member nft_compat to xt_tgchk_param structure. But it didn't set it's value for ipt_init_target. With unexpected value in par.nft_compat, it may return unexpected result in some target's checkentry. This patch is to set all it's fields as 0 and only initialize the non-zero fields in ipt_init_target. v1->v2: As Wang Cong's suggestion, fix it by setting all it's fields as 0 and only initializing the non-zero fields. Fixes: 55917a21d0cc ("netfilter: x_tables: add context to know if extension runs from nft_compat") Suggested-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-09igmp: Fix regression caused by igmp sysctl namespace code.Nikolay Borisov2-6/+7
Commit dcd87999d415 ("igmp: net: Move igmp namespace init to correct file") moved the igmp sysctls initialization from tcp_sk_init to igmp_net_init. This function is only called as part of per-namespace initialization, only if CONFIG_IP_MULTICAST is defined, otherwise igmp_mc_init() call in ip_init is compiled out, casuing the igmp pernet ops to not be registerd and those sysctl being left initialized with 0. However, there are certain functions, such as ip_mc_join_group which are always compiled and make use of some of those sysctls. Let's do a partial revert of the aforementioned commit and move the sysctl initialization into inet_init_net, that way they will always have sane values. Fixes: dcd87999d415 ("igmp: net: Move igmp namespace init to correct file") Link: https://bugzilla.kernel.org/show_bug.cgi?id=196595 Reported-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-09geneve: maximum value of VNI cannot be usedGirish Moodalbail1-1/+1
Geneve's Virtual Network Identifier (VNI) is 24 bit long, so the range of values for it would be from 0 to 16777215 (2^24 -1). However, one cannot create a geneve device with VNI set to 16777215. This patch fixes this issue. Signed-off-by: Girish Moodalbail <girish.moodalbail@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-09net: systemport: Fix software statistics for SYSTEMPORT LiteFlorian Fainelli1-0/+4
With SYSTEMPORT Lite we have holes in our statistics layout that make us skip over the hardware MIB counters, bcm_sysport_get_stats() was not taking that into account resulting in reporting 0 for all SW-maintained statistics, fix this by skipping accordingly. Fixes: 44a4524c54af ("net: systemport: Add support for SYSTEMPORT Lite") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-09tipc: remove premature ESTABLISH FSM event at link synchronizationJon Paul Maloy1-3/+1
When a link between two nodes come up, both endpoints will initially send out a STATE message to the peer, to increase the probability that the peer endpoint also is up when the first traffic message arrives. Thereafter, if the establishing link is the second link between two nodes, this first "traffic" message is a TUNNEL_PROTOCOL/SYNCH message, helping the peer to perform initial synchronization between the two links. However, the initial STATE message may be lost, in which case the SYNCH message will be the first one arriving at the peer. This should also work, as the SYNCH message itself will be used to take up the link endpoint before initializing synchronization. Unfortunately the code for this case is broken. Currently, the link is brought up through a tipc_link_fsm_evt(ESTABLISHED) when a SYNCH arrives, whereupon __tipc_node_link_up() is called to distribute the link slots and take the link into traffic. But, __tipc_node_link_up() is itself starting with a test for whether the link is up, and if true, returns without action. Clearly, the tipc_link_fsm_evt(ESTABLISHED) call is unnecessary, since tipc_node_link_up() is itself issuing such an event, but also harmful, since it inhibits tipc_node_link_up() to perform the test of its tasks, and the link endpoint in question hence is never taken into traffic. This problem has been exposed when we set up dual links between pre- and post-4.4 kernels, because the former ones don't send out the initial STATE message described above. We fix this by removing the unnecessary event call. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-09sunvdc: prevent sunvdc panic when mpgroup disk added to guest domainJim Quigley1-0/+61
Using mpgroup to define multiple paths for a virtual disk causes multiple virtual-device-port ports to be created for that virtual device. Each virtual-device-port port then gets a vdisk created for it by the Linux sunvdc driver. As mpgroup is not supported by the Linux sunvdc driver it cannot handle multiple ports for a single vdisk, leading to a kernel panic at startup. This fix prevents more than one vdisk per virtual-device-port being created until full virtual disk multipathing (mpgroup) support is implemented. Signed-off-by: Jim Quigley <Jim.Quigley@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com> Reviewed-by: Aaron Young <aaron.young@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-09Merge branch 'sparc64-Use-low-latency-path-to-resume-idle-cpu'David S. Miller7-5/+119
Vijay Kumar says: ==================== sparc64: Use low latency path to resume idle cpu CPU_POKE is a low latency path to resume the target cpu if suspended using CPU_YIELD. Use CPU_POKE to resume cpu if supported by hypervisor. Hackbench results (lower is better): Number of Process: w/o fix with fix 1 0.012 0.010 10 0.021 0.019 100 0.151 0.148 Changelog: v2: - Fixed comments and spacing (2/2) ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-09sparc64: Use CPU_POKE to resume idle cpuVijay Kumar5-5/+90
Use CPU_POKE hypervisor call to resume idle cpu if supported. Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com> Reviewed-by: Anthony Yznaga <anthony.yznaga@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-09sparc64: Add a new hypercall CPU_POKEVijay Kumar2-0/+29
This adds a new hypercall CPU_POKE for quickly waking up an idle CPU. CPU_POKE should only be sent to valid non-local CPUs. Signed-off-by: Rob Gardner <rob.gardner@oracle.com> Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com> Reviewed-by: Anthony Yznaga <anthony.yznaga@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-09Merge branch 'sparc64-Add-16GB-hugepage-support'David S. Miller9-54/+220
Nitin Gupta says: ==================== sparc64: Add 16GB hugepage support SPARC architecture supports 16G hugepages but the kernel did not support these. This patch series adds support for it and also cleanes up some page walk/alloc functions. Patch 1/3: Core changes needed to add 16G hugepage support: To map a single 16G hugepage, two PUD entries are used. Each PUD entry maps 8G portion of a 16G page. This page table encoding scheme is same as that used for hugepages at PMD level (8M, 256M and 2G pages) where each PMD entry points successively to 8M regions within a page. No page table entries below the PUD level are allocated for 16G hugepage since those are not required. TSB entries for a 16G page are created at every 4M boundary since the HUGE_TSB is used for these pages which is configured with page size of 4M. When walking page tables (on a TSB miss), bits [32:22] are transferred from vaddr to PUD to resolve addresses at 4M boundary. The resolved address mapping is then stored in HUGE_TSB. Patch 2/3: get_user_pages() etc. are used for direct IO. These functions were not aware of hugepages at the PUD level and would try to continue walking page tables beyond the PUD level. Since 16G hugepages have page tables allocated till PUD level only, these accesses would result in invalid access. This patch adds the case for PUD huge pages to these functions. Patch 3/3: Patch 1 added the case of PUD entry being huge in page table walk and alloc functions. This new case further increased nesting in these functions and made them harder to follow. This patch flattens these functions for better readability. Cc: sparclinux@vger.kernel.org Changelog v5 vs v4: - Checking at PUD level for hugepage entry during page table walk is patched out if 16GB hugepages are not being used. Changelog v4 vs v3: - Added cover letter (patch 0/4) for patch series. Changelog v3 vs v2: - Fixed email headers so the subject shows up correctly. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-09sparc64: Cleanup hugepage table walk functionsNitin Gupta1-34/+20
Flatten out nested code structure in huge_pte_offset() and huge_pte_alloc(). Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-09sparc64: Add 16GB hugepage supportNitin Gupta8-30/+156
Adds support for 16GB hugepage size. To use this page size use kernel parameters as: default_hugepagesz=16G hugepagesz=16G hugepages=10 Testing: Tested with the stream benchmark which allocates 48G of arrays backed by 16G hugepages and does RW operation on them in parallel. Orabug: 25362942 Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-09sparc64: Support huge PUD case in get_user_pagesNitin Gupta2-3/+57
get_user_pages() is used to do direct IO. It already handles the case where the address range is backed by PMD huge pages. This patch now adds the case where the range could be backed by PUD huge pages. Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-09Merge tag 'pinctrl-v4.13-2' of ↵Linus Torvalds10-20/+42
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "These are the pin control fixes I have gathered since the return from my vacation. They boiled in -next a while so let's get them in. Apart from the documentation build it is purely driver fixes. Which is nice. The Intel fixes seem kind of important. - Fix the documentation build as the docs were moved - Correct the UART pin list on the Intel Merrifield - Fix pin assignment and number of pins on the Marvell Armada 37xx pin controller - Cover the Setzer models in the Chromebook DMI quirk in the Intel cheryview driver so they start working - Add the missing "sim" function to the sunxi driver - Fix USB pin definitions on Uniphier Pro4 - Smatch fix for invalid reference in the zx pin control driver" * tag 'pinctrl-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: generic: update references to Documentation/pinctrl.txt pinctrl: intel: merrifield: Correct UART pin lists pinctrl: armada-37xx: Fix number of pin in south bridge pinctrl: armada-37xx: Fix the pin 23 on south bridge pinctrl: cherryview: Add Setzer models to the Chromebook DMI quirk pinctrl: sunxi: add a missing function of A10/A20 pinctrl driver pinctrl: uniphier: fix USB3 pin assignment for Pro4 pinctrl: zte: fix dereference of 'data' in zx_set_mux()