Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 21 Oct 2014 14:48:56 +0000 (07:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 21 Oct 2014 14:48:56 +0000 (07:48 -0700)
Pull more powerpc updates from Michael Ellerman:
 "Here's some more updates for powerpc for 3.18.

  They are a bit late I know, though must are actually bug fixes.  In my
  defence I nearly cut the top of my finger off last weekend in a
  gruesome bike maintenance accident, so I spent a good part of the week
  waiting around for doctors.  True story, I can send photos if you like :)

  Probably the most interesting fix is the sys_call_table one, which
  enables syscall tracing for powerpc.  There's a fix for HMI handling
  for old firmware, more endian fixes for firmware interfaces, more EEH
  fixes, Anton fixed our routine that gets the current stack pointer,
  and a few other misc bits"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux: (22 commits)
  powerpc: Only do dynamic DMA zone limits on platforms that need it
  powerpc: sync pseries_le_defconfig with pseries_defconfig
  powerpc: Add printk levels to setup_system output
  powerpc/vphn: NUMA node code expects big-endian
  powerpc/msi: Use WARN_ON() in msi bitmap selftests
  powerpc/msi: Fix the msi bitmap alignment tests
  powerpc/eeh: Block CFG upon frozen Shiner adapter
  powerpc/eeh: Don't collect logs on PE with blocked config space
  powerpc/eeh: Block PCI config access upon frozen PE
  powerpc/pseries: Drop config requests in EEH accessors
  powerpc/powernv: Drop config requests in EEH accessors
  powerpc/eeh: Rename flag EEH_PE_RESET to EEH_PE_CFG_BLOCKED
  powerpc/eeh: Fix condition for isolated state
  powerpc/pseries: Make CPU hotplug path endian safe
  powerpc/pseries: Use dump_stack instead of show_stack
  powerpc: Rename __get_SP() to current_stack_pointer()
  powerpc: Reimplement __get_SP() as a function not a define
  powerpc/numa: Add ability to disable and debug topology updates
  powerpc/numa: check error return from proc_create
  powerpc/powernv: Fallback to old HMI handling behavior for old firmware
  ...

1  2 
Documentation/kernel-parameters.txt
arch/powerpc/configs/pseries_le_defconfig
arch/powerpc/include/asm/syscall.h
arch/powerpc/platforms/powernv/opal.c
arch/powerpc/platforms/powernv/pci.c

index 7dbe5ec9d9cd08afac13797e2adac291fb703eec,c536e1c74320567efb9186fcbca5882edd0ea3c8..988160a4ad3197718b9b6b719f0ded79b2e2dcc5
@@@ -605,15 -605,11 +605,15 @@@ bytes respectively. Such letter suffixe
                        See Documentation/s390/CommonIO for details.
        clk_ignore_unused
                        [CLK]
 -                      Keep all clocks already enabled by bootloader on,
 -                      even if no driver has claimed them. This is useful
 -                      for debug and development, but should not be
 -                      needed on a platform with proper driver support.
 -                      For more information, see Documentation/clk.txt.
 +                      Prevents the clock framework from automatically gating
 +                      clocks that have not been explicitly enabled by a Linux
 +                      device driver but are enabled in hardware at reset or
 +                      by the bootloader/firmware. Note that this does not
 +                      force such clocks to be always-on nor does it reserve
 +                      those clocks in any way. This parameter is useful for
 +                      debug and development, but should not be needed on a
 +                      platform with proper driver support.  For more
 +                      information, see Documentation/clk.txt.
  
        clock=          [BUGS=X86-32, HW] gettimeofday clocksource override.
                        [Deprecated]
                        Sets the size of kernel global memory area for
                        contiguous memory allocations and optionally the
                        placement constraint by the physical address range of
 -                      memory allocations. For more information, see
 +                      memory allocations. A value of 0 disables CMA
 +                      altogether. For more information, see
                        include/linux/dma-contiguous.h
  
        cmo_free_hint=  [PPC] Format: { yes | no }
  
        earlycon=       [KNL] Output early console device and options.
  
 +              cdns,<addr>
 +                      Start an early, polled-mode console on a cadence serial
 +                      port at the specified address. The cadence serial port
 +                      must already be setup and configured. Options are not
 +                      yet supported.
 +
                uart[8250],io,<addr>[,options]
                uart[8250],mmio,<addr>[,options]
                uart[8250],mmio32,<addr>[,options]
                        must already be setup and configured. Options are not
                        yet supported.
  
 +              msm_serial,<addr>
 +                      Start an early, polled-mode console on an msm serial
 +                      port at the specified address. The serial port
 +                      must already be setup and configured. Options are not
 +                      yet supported.
 +
 +              msm_serial_dm,<addr>
 +                      Start an early, polled-mode console on an msm serial
 +                      dm port at the specified address. The serial port
 +                      must already be setup and configured. Options are not
 +                      yet supported.
 +
                smh     Use ARM semihosting calls for early console.
  
        earlyprintk=    [X86,SH,BLACKFIN,ARM,M68k]
        i8042.noloop    [HW] Disable the AUX Loopback command while probing
                             for the AUX port
        i8042.nomux     [HW] Don't check presence of an active multiplexing
 -                           controller
 +                           controller. Default: true.
        i8042.nopnp     [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX
                             controllers
        i8042.notimeout [HW] Ignore timeout condition signalled by controller
                        Set number of hash buckets for inode cache.
  
        ima_appraise=   [IMA] appraise integrity measurements
 -                      Format: { "off" | "enforce" | "fix" }
 +                      Format: { "off" | "enforce" | "fix" | "log" }
                        default: "enforce"
  
        ima_appraise_tcb [IMA]
        lockd.nlm_udpport=M     [NFS] Assign UDP port.
                        Format: <integer>
  
 +      locktorture.nreaders_stress= [KNL]
 +                      Set the number of locking read-acquisition kthreads.
 +                      Defaults to being automatically set based on the
 +                      number of online CPUs.
 +
 +      locktorture.nwriters_stress= [KNL]
 +                      Set the number of locking write-acquisition kthreads.
 +
 +      locktorture.onoff_holdoff= [KNL]
 +                      Set time (s) after boot for CPU-hotplug testing.
 +
 +      locktorture.onoff_interval= [KNL]
 +                      Set time (s) between CPU-hotplug operations, or
 +                      zero to disable CPU-hotplug testing.
 +
 +      locktorture.shuffle_interval= [KNL]
 +                      Set task-shuffle interval (jiffies).  Shuffling
 +                      tasks allows some CPUs to go into dyntick-idle
 +                      mode during the locktorture test.
 +
 +      locktorture.shutdown_secs= [KNL]
 +                      Set time (s) after boot system shutdown.  This
 +                      is useful for hands-off automated testing.
 +
 +      locktorture.stat_interval= [KNL]
 +                      Time (s) between statistics printk()s.
 +
 +      locktorture.stutter= [KNL]
 +                      Time (s) to stutter testing, for example,
 +                      specifying five seconds causes the test to run for
 +                      five seconds, wait for five seconds, and so on.
 +                      This tests the locking primitive's ability to
 +                      transition abruptly to and from idle.
 +
 +      locktorture.torture_runnable= [BOOT]
 +                      Start locktorture running at boot time.
 +
 +      locktorture.torture_type= [KNL]
 +                      Specify the locking implementation to test.
 +
 +      locktorture.verbose= [KNL]
 +                      Enable additional printk() statements.
 +
        logibm.irq=     [HW,MOUSE] Logitech Bus Mouse Driver
                        Format: <irq>
  
                        Lazy RCU callbacks are those which RCU can
                        prove do nothing more than free memory.
  
 +      rcutorture.cbflood_inter_holdoff= [KNL]
 +                      Set holdoff time (jiffies) between successive
 +                      callback-flood tests.
 +
 +      rcutorture.cbflood_intra_holdoff= [KNL]
 +                      Set holdoff time (jiffies) between successive
 +                      bursts of callbacks within a given callback-flood
 +                      test.
 +
 +      rcutorture.cbflood_n_burst= [KNL]
 +                      Set the number of bursts making up a given
 +                      callback-flood test.  Set this to zero to
 +                      disable callback-flood testing.
 +
 +      rcutorture.cbflood_n_per_burst= [KNL]
 +                      Set the number of callbacks to be registered
 +                      in a given burst of a callback-flood test.
 +
        rcutorture.fqs_duration= [KNL]
                        Set duration of force_quiescent_state bursts.
  
                        Set time (s) between CPU-hotplug operations, or
                        zero to disable CPU-hotplug testing.
  
 -      rcutorture.rcutorture_runnable= [BOOT]
 +      rcutorture.torture_runnable= [BOOT]
                        Start rcutorture running at boot time.
  
        rcutorture.shuffle_interval= [KNL]
        rcupdate.rcu_cpu_stall_timeout= [KNL]
                        Set timeout for RCU CPU stall warning messages.
  
 +      rcupdate.rcu_task_stall_timeout= [KNL]
 +                      Set timeout in jiffies for RCU task stall warning
 +                      messages.  Disable with a value less than or equal
 +                      to zero.
 +
        rdinit=         [KNL]
                        Format: <full_path>
                        Run specified binary instead of /init from the ramdisk,
  
        slram=          [HW,MTD]
  
 +      slab_nomerge    [MM]
 +                      Disable merging of slabs with similar size. May be
 +                      necessary if there is some reason to distinguish
 +                      allocs to different slabs. Debug options disable
 +                      merging on their own.
 +                      For more information see Documentation/vm/slub.txt.
 +
        slab_max_order= [MM, SLAB]
                        Determines the maximum allowed order for slabs.
                        A high setting may cause OOMs due to memory
                        For more information see Documentation/vm/slub.txt.
  
        slub_nomerge    [MM, SLUB]
 -                      Disable merging of slabs with similar size. May be
 -                      necessary if there is some reason to distinguish
 -                      allocs to different slabs. Debug options disable
 -                      merging on their own.
 -                      For more information see Documentation/vm/slub.txt.
 +                      Same with slab_nomerge. This is supported for legacy.
 +                      See slab_nomerge for more information.
  
        smart2=         [HW]
                        Format: <io1>[,<io2>[,...,<io8>]]
  
        tdfx=           [HW,DRM]
  
 -      test_suspend=   [SUSPEND]
 +      test_suspend=   [SUSPEND][,N]
                        Specify "mem" (for Suspend-to-RAM) or "standby" (for
 -                      standby suspend) as the system sleep state to briefly
 -                      enter during system startup.  The system is woken from
 -                      this state using a wakeup-capable RTC alarm.
 +                      standby suspend) or "freeze" (for suspend type freeze)
 +                      as the system sleep state during system startup with
 +                      the optional capability to repeat N number of times.
 +                      The system is woken from this state using a
 +                      wakeup-capable RTC alarm.
  
        thash_entries=  [KNL,NET]
                        Set number of hash buckets for TCP connection
                        e.g. base its process migration decisions on it.
                        Default is on.
  
+       topology_updates= [KNL, PPC, NUMA]
+                       Format: {off}
+                       Specify if the kernel should ignore (off)
+                       topology updates sent by the hypervisor to this
+                       LPAR.
        tp720=          [HW,PS2]
  
        tpm_suspend_pcr=[HW,TPM]
                                        READ_DISC_INFO command);
                                e = NO_READ_CAPACITY_16 (don't use
                                        READ_CAPACITY_16 command);
 +                              f = NO_REPORT_OPCODES (don't use report opcodes
 +                                      command, uas only);
                                h = CAPACITY_HEURISTICS (decrease the
                                        reported device capacity by one
                                        sector if the number is odd);
                                        bogus residue values);
                                s = SINGLE_LUN (the device has only one
                                        Logical Unit);
 +                              t = NO_ATA_1X (don't allow ATA(12) and ATA(16)
 +                                      commands, uas only);
                                u = IGNORE_UAS (don't bind to the uas driver);
                                w = NO_WP_DETECT (don't test whether the
                                        medium is write-protected).
index 63392f4b29a4f7876210b48a52bff5ba39f2ee77,96a230cd5ca7ef7a8a389b9dea0947704d3562d2..d2008887eb8c7fd8f3271b73438f8d5c578cb2b4
@@@ -48,14 -48,12 +48,13 @@@ CONFIG_KEXEC=
  CONFIG_IRQ_ALL_CPUS=y
  CONFIG_MEMORY_HOTPLUG=y
  CONFIG_MEMORY_HOTREMOVE=y
- CONFIG_CMA=y
  CONFIG_PPC_64K_PAGES=y
  CONFIG_PPC_SUBPAGE_PROT=y
  CONFIG_SCHED_SMT=y
  CONFIG_HOTPLUG_PCI=y
  CONFIG_HOTPLUG_PCI_RPA=m
  CONFIG_HOTPLUG_PCI_RPA_DLPAR=m
 +CONFIG_NET=y
  CONFIG_PACKET=y
  CONFIG_UNIX=y
  CONFIG_XFRM_USER=m
@@@ -138,6 -136,7 +137,7 @@@ CONFIG_NETCONSOLE=
  CONFIG_NETPOLL_TRAP=y
  CONFIG_TUN=m
  CONFIG_VIRTIO_NET=m
+ CONFIG_VHOST_NET=m
  CONFIG_VORTEX=y
  CONFIG_ACENIC=m
  CONFIG_ACENIC_OMIT_TIGON_I=y
@@@ -303,4 -302,9 +303,9 @@@ CONFIG_CRYPTO_LZO=
  # CONFIG_CRYPTO_ANSI_CPRNG is not set
  CONFIG_CRYPTO_DEV_NX=y
  CONFIG_CRYPTO_DEV_NX_ENCRYPT=m
+ CONFIG_VIRTUALIZATION=y
+ CONFIG_KVM_BOOK3S_64=m
+ CONFIG_KVM_BOOK3S_64_HV=y
+ CONFIG_TRANSPARENT_HUGEPAGE=y
+ CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
  CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
index 6fa2708da15304b7bc3ad10f3480e81a837532f8,528ba9d8eed57bbc1d2bb4ec5e227920077c7271..6240698fee9a60fbbbf5403c10f710a5c41b861b
  #ifndef _ASM_SYSCALL_H
  #define _ASM_SYSCALL_H        1
  
 +#include <uapi/linux/audit.h>
  #include <linux/sched.h>
 +#include <linux/thread_info.h>
  
  /* ftrace syscalls requires exporting the sys_call_table */
  #ifdef CONFIG_FTRACE_SYSCALLS
- extern const unsigned long *sys_call_table;
+ extern const unsigned long sys_call_table[];
  #endif /* CONFIG_FTRACE_SYSCALLS */
  
  static inline long syscall_get_nr(struct task_struct *task,
@@@ -88,8 -86,4 +88,8 @@@ static inline void syscall_set_argument
        memcpy(&regs->gpr[3 + i], args, n * sizeof(args[0]));
  }
  
 +static inline int syscall_get_arch(void)
 +{
 +      return is_32bit_task() ? AUDIT_ARCH_PPC : AUDIT_ARCH_PPC64;
 +}
  #endif        /* _ASM_SYSCALL_H */
index b642b0562f5aca3e8ecde20d3f86738e621f9092,34d96615db6c8b355c3bc59d392fba220d6a0105..d019b081df9d846177c76b5c923b7e0a41e12fe8
@@@ -194,6 -194,27 +194,27 @@@ static int __init opal_register_excepti
         * fwnmi area at 0x7000 to provide the glue space to OPAL
         */
        glue = 0x7000;
+       /*
+        * Check if we are running on newer firmware that exports
+        * OPAL_HANDLE_HMI token. If yes, then don't ask OPAL to patch
+        * the HMI interrupt and we catch it directly in Linux.
+        *
+        * For older firmware (i.e currently released POWER8 System Firmware
+        * as of today <= SV810_087), we fallback to old behavior and let OPAL
+        * patch the HMI vector and handle it inside OPAL firmware.
+        *
+        * For newer firmware (in development/yet to be released) we will
+        * start catching/handling HMI directly in Linux.
+        */
+       if (!opal_check_token(OPAL_HANDLE_HMI)) {
+               pr_info("opal: Old firmware detected, OPAL handles HMIs.\n");
+               opal_register_exception_handler(
+                               OPAL_HYPERVISOR_MAINTENANCE_HANDLER,
+                               0, glue);
+               glue += 128;
+       }
        opal_register_exception_handler(OPAL_SOFTPATCH_HANDLER, 0, glue);
  #endif
  
@@@ -322,7 -343,7 +343,7 @@@ static void opal_handle_message(void
  
        /* check for errors. */
        if (ret) {
 -              pr_warning("%s: Failed to retrive opal message, err=%lld\n",
 +              pr_warning("%s: Failed to retrieve opal message, err=%lld\n",
                                __func__, ret);
                return;
        }
index b3ca77ddf36dfbd07de81feb5015b27bd675c009,b1b7ac2d494f29a7317342fcfcf6a6ec001b8481..b2187d0068b876e6909376c81d390cbf7b8bad00
  //#define cfg_dbg(fmt...)     printk(fmt)
  
  #ifdef CONFIG_PCI_MSI
 -static int pnv_msi_check_device(struct pci_dev* pdev, int nvec, int type)
 -{
 -      struct pci_controller *hose = pci_bus_to_host(pdev->bus);
 -      struct pnv_phb *phb = hose->private_data;
 -      struct pci_dn *pdn = pci_get_pdn(pdev);
 -
 -      if (pdn && pdn->force_32bit_msi && !phb->msi32_support)
 -              return -ENODEV;
 -
 -      return (phb && phb->msi_bmp.bitmap) ? 0 : -ENODEV;
 -}
 -
  static int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
  {
        struct pci_controller *hose = pci_bus_to_host(pdev->bus);
        struct pnv_phb *phb = hose->private_data;
 +      struct pci_dn *pdn = pci_get_pdn(pdev);
        struct msi_desc *entry;
        struct msi_msg msg;
        int hwirq;
        unsigned int virq;
        int rc;
  
 -      if (WARN_ON(!phb))
 +      if (WARN_ON(!phb) || !phb->msi_bmp.bitmap)
 +              return -ENODEV;
 +
 +      if (pdn && pdn->force_32bit_msi && !phb->msi32_support)
                return -ENODEV;
  
        list_for_each_entry(entry, &pdev->msi_list, list) {
@@@ -505,7 -513,7 +505,7 @@@ static bool pnv_pci_cfg_check(struct pc
        edev = of_node_to_eeh_dev(dn);
        if (edev) {
                if (edev->pe &&
-                   (edev->pe->state & EEH_PE_RESET))
+                   (edev->pe->state & EEH_PE_CFG_BLOCKED))
                        return false;
  
                if (edev->mode & EEH_DEV_REMOVED)
@@@ -863,6 -871,7 +863,6 @@@ void __init pnv_pci_init(void
  
        /* Configure MSIs */
  #ifdef CONFIG_PCI_MSI
 -      ppc_md.msi_check_device = pnv_msi_check_device;
        ppc_md.setup_msi_irqs = pnv_setup_msi_irqs;
        ppc_md.teardown_msi_irqs = pnv_teardown_msi_irqs;
  #endif