Commit 4e89a2d8e2d5ab33d73b76f16c10fdf515faabef

Authored by Will Schmidt
Committed by Benjamin Herrenschmidt
1 parent 475fc7c011

powerpc/pseries: Add kernel parameter to disable batched hcalls

This introduces a pair of kernel parameters that can be used to disable
the MULTITCE and BULK_REMOVE h-calls.

By default, those hcalls are enabled, active, and good for throughput
and performance.  The ability to disable them will be useful for some of
the PREEMPT_RT related investigation and work occurring on Power.

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
cc: Olof Johansson <olof@lixom.net>
cc: Anton Blanchard <anton@samba.org>
cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Showing 3 changed files with 34 additions and 0 deletions Side-by-side Diff

Documentation/kernel-parameters.txt
... ... @@ -403,6 +403,10 @@
403 403 bttv.pll= See Documentation/video4linux/bttv/Insmod-options
404 404 bttv.tuner= and Documentation/video4linux/bttv/CARDLIST
405 405  
  406 + bulk_remove=off [PPC] This parameter disables the use of the pSeries
  407 + firmware feature for flushing multiple hpte entries
  408 + at a time.
  409 +
406 410 c101= [NET] Moxa C101 synchronous serial card
407 411  
408 412 cachesize= [BUGS=X86-32] Override level 2 CPU cache size detection.
... ... @@ -1489,6 +1493,10 @@
1489 1493  
1490 1494 mtdparts= [MTD]
1491 1495 See drivers/mtd/cmdlinepart.c.
  1496 +
  1497 + multitce=off [PPC] This parameter disables the use of the pSeries
  1498 + firmware feature for updating multiple TCE entries
  1499 + at a time.
1492 1500  
1493 1501 onenand.bdry= [HW,MTD] Flex-OneNAND Boundary Configuration
1494 1502  
arch/powerpc/platforms/pseries/iommu.c
... ... @@ -621,4 +621,19 @@
621 621  
622 622 set_pci_dma_ops(&dma_iommu_ops);
623 623 }
  624 +
  625 +static int __init disable_multitce(char *str)
  626 +{
  627 + if (strcmp(str, "off") == 0 &&
  628 + firmware_has_feature(FW_FEATURE_LPAR) &&
  629 + firmware_has_feature(FW_FEATURE_MULTITCE)) {
  630 + printk(KERN_INFO "Disabling MULTITCE firmware feature\n");
  631 + ppc_md.tce_build = tce_build_pSeriesLP;
  632 + ppc_md.tce_free = tce_free_pSeriesLP;
  633 + powerpc_firmware_features &= ~FW_FEATURE_MULTITCE;
  634 + }
  635 + return 1;
  636 +}
  637 +
  638 +__setup("multitce=", disable_multitce);
arch/powerpc/platforms/pseries/lpar.c
... ... @@ -627,6 +627,18 @@
627 627 spin_unlock_irqrestore(&pSeries_lpar_tlbie_lock, flags);
628 628 }
629 629  
  630 +static int __init disable_bulk_remove(char *str)
  631 +{
  632 + if (strcmp(str, "off") == 0 &&
  633 + firmware_has_feature(FW_FEATURE_BULK_REMOVE)) {
  634 + printk(KERN_INFO "Disabling BULK_REMOVE firmware feature");
  635 + powerpc_firmware_features &= ~FW_FEATURE_BULK_REMOVE;
  636 + }
  637 + return 1;
  638 +}
  639 +
  640 +__setup("bulk_remove=", disable_bulk_remove);
  641 +
630 642 void __init hpte_init_lpar(void)
631 643 {
632 644 ppc_md.hpte_invalidate = pSeries_lpar_hpte_invalidate;