]> Git Repo - linux.git/commitdiff
Merge tag 'powerpc-3.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
authorLinus Torvalds <[email protected]>
Fri, 19 Dec 2014 20:57:45 +0000 (12:57 -0800)
committerLinus Torvalds <[email protected]>
Fri, 19 Dec 2014 20:57:45 +0000 (12:57 -0800)
Pull second batch of powerpc updates from Michael Ellerman:
 "The highlight is the series that reworks the idle management on
  powernv, which allows us to use deeper idle states on those machines.

  There's the fix from Anton for the "BUG at kernel/smpboot.c:134!"
  problem.

  An i2c driver for powernv.  This is acked by Wolfram Sang, and he
  asked that we take it through the powerpc tree.

  A fix for audit from rgb at Red Hat, acked by Paul Moore who is one of
  the audit maintainers.

  A patch from Ben to export the symbol map of our OPAL firmware as a
  sysfs file, so that tools can use it.

  Also some CXL fixes, a couple of powerpc perf fixes, a fix for
  smt-enabled, and the patch to add __force to get_user() so we can use
  bitwise types"

* tag 'powerpc-3.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux:
  powerpc/powernv: Ignore smt-enabled on Power8 and later
  powerpc/uaccess: Allow get_user() with bitwise types
  powerpc/powernv: Expose OPAL firmware symbol map
  powernv/powerpc: Add winkle support for offline cpus
  powernv/cpuidle: Redesign idle states management
  powerpc/powernv: Enable Offline CPUs to enter deep idle states
  powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle mode
  i2c: Driver to expose PowerNV platform i2c busses
  powerpc: add little endian flag to syscall_get_arch()
  power/perf/hv-24x7: Use kmem_cache_free() instead of kfree
  powerpc/perf/hv-24x7: Use per-cpu page buffer
  cxl: Unmap MMIO regions when detaching a context
  cxl: Add timeout to process element commands
  cxl: Change contexts_lock to a mutex to fix sleep while atomic bug
  powerpc: Secondary CPUs must set cpu_callin_map after setting active and online

1  2 
arch/powerpc/include/asm/ppc-opcode.h
arch/powerpc/kernel/asm-offsets.c
drivers/cpuidle/cpuidle-powernv.c
drivers/i2c/busses/Kconfig
drivers/i2c/busses/Makefile
include/uapi/linux/audit.h

index 1a5287759fc86cdd1918abfcf7b2645031ac77c6,5155be7c0d48d5196e5fbb35d4e9b6787a8b20cf..03cd858a401c067b1b34f18e9b5fddd521e8fe2d
  
  #define PPC_INST_NAP                  0x4c000364
  #define PPC_INST_SLEEP                        0x4c0003a4
+ #define PPC_INST_WINKLE                       0x4c0003e4
  
  /* A2 specific instructions */
  #define PPC_INST_ERATWE                       0x7c0001a6
  #define PPC_INST_ERATSX_DOT           0x7c000127
  
  /* Misc instructions for BPF compiler */
 +#define PPC_INST_LBZ                  0x88000000
  #define PPC_INST_LD                   0xe8000000
  #define PPC_INST_LHZ                  0xa0000000
  #define PPC_INST_LHBRX                        0x7c00062c
  
  #define PPC_NAP                       stringify_in_c(.long PPC_INST_NAP)
  #define PPC_SLEEP             stringify_in_c(.long PPC_INST_SLEEP)
+ #define PPC_WINKLE            stringify_in_c(.long PPC_INST_WINKLE)
  
  /* BHRB instructions */
  #define PPC_CLRBHRB           stringify_in_c(.long PPC_INST_CLRBHRB)
index 24d78e1871c9d5e9855e9aaddbf867d187fd697b,f68de7a73faa70bf1b6cb197ea3e814d2de7b12a..e624f9646350ccfadf32c18cbe4c4517190d2072
@@@ -489,6 -489,7 +489,6 @@@ int main(void
        DEFINE(KVM_HOST_LPID, offsetof(struct kvm, arch.host_lpid));
        DEFINE(KVM_HOST_LPCR, offsetof(struct kvm, arch.host_lpcr));
        DEFINE(KVM_HOST_SDR1, offsetof(struct kvm, arch.host_sdr1));
 -      DEFINE(KVM_TLBIE_LOCK, offsetof(struct kvm, arch.tlbie_lock));
        DEFINE(KVM_NEED_FLUSH, offsetof(struct kvm, arch.need_tlb_flush.bits));
        DEFINE(KVM_ENABLED_HCALLS, offsetof(struct kvm, arch.enabled_hcalls));
        DEFINE(KVM_LPCR, offsetof(struct kvm, arch.lpcr));
        DEFINE(VCPU_DAR, offsetof(struct kvm_vcpu, arch.shregs.dar));
        DEFINE(VCPU_VPA, offsetof(struct kvm_vcpu, arch.vpa.pinned_addr));
        DEFINE(VCPU_VPA_DIRTY, offsetof(struct kvm_vcpu, arch.vpa.dirty));
 +      DEFINE(VCPU_HEIR, offsetof(struct kvm_vcpu, arch.emul_inst));
  #endif
  #ifdef CONFIG_PPC_BOOK3S
        DEFINE(VCPU_VCPUID, offsetof(struct kvm_vcpu, vcpu_id));
                                        arch.timing_last_enter.tv32.tbl));
  #endif
  
+ #ifdef CONFIG_PPC_POWERNV
+       DEFINE(PACA_CORE_IDLE_STATE_PTR,
+                       offsetof(struct paca_struct, core_idle_state_ptr));
+       DEFINE(PACA_THREAD_IDLE_STATE,
+                       offsetof(struct paca_struct, thread_idle_state));
+       DEFINE(PACA_THREAD_MASK,
+                       offsetof(struct paca_struct, thread_mask));
+       DEFINE(PACA_SUBCORE_SIBLING_MASK,
+                       offsetof(struct paca_struct, subcore_sibling_mask));
+ #endif
        return 0;
  }
index e9248bb9173ae267ff09c14d06128527352f9f20,a489b56e92df70a593a370d200b6b7c27ca32285..aedec09579340b2db42095e3acebcbc4776543c8
  
  #include <asm/machdep.h>
  #include <asm/firmware.h>
+ #include <asm/opal.h>
  #include <asm/runlatch.h>
  
- /* Flags and constants used in PowerNV platform */
  #define MAX_POWERNV_IDLE_STATES       8
- #define IDLE_USE_INST_NAP     0x00010000 /* Use nap instruction */
- #define IDLE_USE_INST_SLEEP   0x00020000 /* Use sleep instruction */
  
  struct cpuidle_driver powernv_idle_driver = {
        .name             = "powernv_idle",
@@@ -93,6 -90,7 +90,6 @@@ static struct cpuidle_state powernv_sta
        { /* Snooze */
                .name = "snooze",
                .desc = "snooze",
 -              .flags = CPUIDLE_FLAG_TIME_VALID,
                .exit_latency = 0,
                .target_residency = 0,
                .enter = &snooze_loop },
@@@ -197,11 -195,11 +194,11 @@@ static int powernv_add_idle_states(void
                 * target residency to be 10x exit_latency
                 */
                latency_ns = be32_to_cpu(idle_state_latency[i]);
-               if (flags & IDLE_USE_INST_NAP) {
+               if (flags & OPAL_PM_NAP_ENABLED) {
                        /* Add NAP state */
                        strcpy(powernv_states[nr_idle_states].name, "Nap");
                        strcpy(powernv_states[nr_idle_states].desc, "Nap");
 -                      powernv_states[nr_idle_states].flags = CPUIDLE_FLAG_TIME_VALID;
 +                      powernv_states[nr_idle_states].flags = 0;
                        powernv_states[nr_idle_states].exit_latency =
                                        ((unsigned int)latency_ns) / 1000;
                        powernv_states[nr_idle_states].target_residency =
                        nr_idle_states++;
                }
  
-               if (flags & IDLE_USE_INST_SLEEP) {
+               if (flags & OPAL_PM_SLEEP_ENABLED ||
+                       flags & OPAL_PM_SLEEP_ENABLED_ER1) {
                        /* Add FASTSLEEP state */
                        strcpy(powernv_states[nr_idle_states].name, "FastSleep");
                        strcpy(powernv_states[nr_idle_states].desc, "FastSleep");
 -                      powernv_states[nr_idle_states].flags =
 -                              CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TIMER_STOP;
 +                      powernv_states[nr_idle_states].flags = CPUIDLE_FLAG_TIMER_STOP;
                        powernv_states[nr_idle_states].exit_latency =
                                        ((unsigned int)latency_ns) / 1000;
                        powernv_states[nr_idle_states].target_residency =
index c1351d9fb35bbc8d38ddc96ee9294f2b2614bf11,71ad6e11efb7e490416a31911186d0cd64938333..91a488c7cc443bfd4adc524ef228a3168ffb0881
@@@ -123,7 -123,6 +123,7 @@@ config I2C_I80
            Wildcat Point-LP (PCH)
            BayTrail (SOC)
            Sunrise Point-H (PCH)
 +          Sunrise Point-LP (PCH)
  
          This driver can also be built as a module.  If so, the module
          will be called i2c-i801.
@@@ -524,16 -523,6 +524,16 @@@ config I2C_IBM_II
          This driver can also be built as a module.  If so, the module
          will be called i2c-ibm_iic.
  
 +config I2C_IMG
 +      tristate "Imagination Technologies I2C SCB Controller"
 +      depends on MIPS || METAG || COMPILE_TEST
 +      help
 +        Say Y here if you want to use the IMG I2C SCB controller,
 +        available on the TZ1090 and other IMG SoCs.
 +
 +        This driver can also be built as a module.  If so, the module
 +        will be called i2c-img-scb.
 +
  config I2C_IMX
        tristate "IMX I2C interface"
        depends on ARCH_MXC
@@@ -564,13 -553,6 +564,13 @@@ config I2C_KEMPL
          This driver can also be built as a module. If so, the module
          will be called i2c-kempld.
  
 +config I2C_MESON
 +      tristate "Amlogic Meson I2C controller"
 +      depends on ARCH_MESON
 +      help
 +        If you say yes to this option, support will be included for the
 +        I2C interface on the Amlogic Meson family of SoCs.
 +
  config I2C_MPC
        tristate "MPC107/824x/85xx/512x/52xx/83xx/86xx"
        depends on PPC
@@@ -720,7 -702,7 +720,7 @@@ config I2C_RII
  
  config I2C_RK3X
        tristate "Rockchip RK3xxx I2C adapter"
 -      depends on OF
 +      depends on OF && COMMON_CLK
        help
          Say Y here to include support for the I2C adapter in Rockchip RK3xxx
          SoCs.
@@@ -899,16 -881,6 +899,16 @@@ config I2C_DIOLAN_U2
          This driver can also be built as a module.  If so, the module
          will be called i2c-diolan-u2c.
  
 +config I2C_DLN2
 +       tristate "Diolan DLN-2 USB I2C adapter"
 +       depends on MFD_DLN2
 +       help
 +       If you say yes to this option, support will be included for Diolan
 +       DLN2, a USB to I2C interface.
 +
 +       This driver can also be built as a module.  If so, the module
 +       will be called i2c-dln2.
 +
  config I2C_PARPORT
        tristate "Parallel port adapter"
        depends on PARPORT
@@@ -1072,4 -1044,15 +1072,15 @@@ config SCx200_AC
          This support is also available as a module.  If so, the module
          will be called scx200_acb.
  
+ config I2C_OPAL
+       tristate "IBM OPAL I2C driver"
+       depends on PPC_POWERNV
+       default y
+       help
+         This exposes the PowerNV platform i2c busses to the linux i2c layer,
+         the driver is based on the OPAL interfaces.
+         This driver can also be built as a module. If so, the module will be
+         called as i2c-opal.
  endmenu
index 5e6c8223719e2587969f9ecb806409be736d674b,e23ec815e21f005d8586b1ccf42ee18f6f5b7243..56388f658d2f2567cbcf4b38433212c94d0d0faf
@@@ -50,11 -50,9 +50,11 @@@ obj-$(CONFIG_I2C_GPIO)              += i2c-gpio.
  obj-$(CONFIG_I2C_HIGHLANDER)  += i2c-highlander.o
  obj-$(CONFIG_I2C_HIX5HD2)     += i2c-hix5hd2.o
  obj-$(CONFIG_I2C_IBM_IIC)     += i2c-ibm_iic.o
 +obj-$(CONFIG_I2C_IMG)         += i2c-img-scb.o
  obj-$(CONFIG_I2C_IMX)         += i2c-imx.o
  obj-$(CONFIG_I2C_IOP3XX)      += i2c-iop3xx.o
  obj-$(CONFIG_I2C_KEMPLD)      += i2c-kempld.o
 +obj-$(CONFIG_I2C_MESON)               += i2c-meson.o
  obj-$(CONFIG_I2C_MPC)         += i2c-mpc.o
  obj-$(CONFIG_I2C_MV64XXX)     += i2c-mv64xxx.o
  obj-$(CONFIG_I2C_MXS)         += i2c-mxs.o
@@@ -89,7 -87,6 +89,7 @@@ obj-$(CONFIG_I2C_RCAR)                += i2c-rcar.
  
  # External I2C/SMBus adapter drivers
  obj-$(CONFIG_I2C_DIOLAN_U2C)  += i2c-diolan-u2c.o
 +obj-$(CONFIG_I2C_DLN2)                += i2c-dln2.o
  obj-$(CONFIG_I2C_PARPORT)     += i2c-parport.o
  obj-$(CONFIG_I2C_PARPORT_LIGHT)       += i2c-parport-light.o
  obj-$(CONFIG_I2C_ROBOTFUZZ_OSIF)      += i2c-robotfuzz-osif.o
@@@ -102,6 -99,7 +102,7 @@@ obj-$(CONFIG_I2C_ACORN)             += i2c-acorn.
  obj-$(CONFIG_I2C_BCM_KONA)    += i2c-bcm-kona.o
  obj-$(CONFIG_I2C_CROS_EC_TUNNEL)      += i2c-cros-ec-tunnel.o
  obj-$(CONFIG_I2C_ELEKTOR)     += i2c-elektor.o
+ obj-$(CONFIG_I2C_OPAL)                += i2c-opal.o
  obj-$(CONFIG_I2C_PCA_ISA)     += i2c-pca-isa.o
  obj-$(CONFIG_I2C_SIBYTE)      += i2c-sibyte.o
  obj-$(CONFIG_SCx200_ACB)      += scx200_acb.o
index 12e26683c7061c80e9e6f5f0ba3dbc1a73b32862,584bb0113e2504801caa3995eecd5b4d20d2f95f..d3475e1f15ec193977fa7c7e577127c26e785863
@@@ -322,15 -322,9 +322,15 @@@ enum 
  #define AUDIT_STATUS_BACKLOG_LIMIT    0x0010
  #define AUDIT_STATUS_BACKLOG_WAIT_TIME        0x0020
  
 -#define AUDIT_VERSION_BACKLOG_LIMIT   1
 -#define AUDIT_VERSION_BACKLOG_WAIT_TIME       2
 -#define AUDIT_VERSION_LATEST AUDIT_VERSION_BACKLOG_WAIT_TIME
 +#define AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT    0x00000001
 +#define AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME        0x00000002
 +#define AUDIT_FEATURE_BITMAP_ALL (AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT | \
 +                                AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME)
 +
 +/* deprecated: AUDIT_VERSION_* */
 +#define AUDIT_VERSION_LATEST          AUDIT_FEATURE_BITMAP_ALL
 +#define AUDIT_VERSION_BACKLOG_LIMIT   AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT
 +#define AUDIT_VERSION_BACKLOG_WAIT_TIME       AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME
  
                                /* Failure-to-log actions */
  #define AUDIT_FAIL_SILENT     0
  #define AUDIT_ARCH_PARISC     (EM_PARISC)
  #define AUDIT_ARCH_PARISC64   (EM_PARISC|__AUDIT_ARCH_64BIT)
  #define AUDIT_ARCH_PPC                (EM_PPC)
+ /* do not define AUDIT_ARCH_PPCLE since it is not supported by audit */
  #define AUDIT_ARCH_PPC64      (EM_PPC64|__AUDIT_ARCH_64BIT)
+ #define AUDIT_ARCH_PPC64LE    (EM_PPC64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
  #define AUDIT_ARCH_S390               (EM_S390)
  #define AUDIT_ARCH_S390X      (EM_S390|__AUDIT_ARCH_64BIT)
  #define AUDIT_ARCH_SH         (EM_SH)
@@@ -410,10 -406,7 +412,10 @@@ struct audit_status 
        __u32           backlog_limit;  /* waiting messages limit */
        __u32           lost;           /* messages lost */
        __u32           backlog;        /* messages waiting in queue */
 -      __u32           version;        /* audit api version number */
 +      union {
 +              __u32   version;        /* deprecated: audit api version num */
 +              __u32   feature_bitmap; /* bitmap of kernel audit features */
 +      };
        __u32           backlog_wait_time;/* message queue wait timeout */
  };
  
This page took 0.12487 seconds and 4 git commands to generate.