1. 23 7月, 2015 1 次提交
    • P
      powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_* · 01c9348c
      Paul Mackerras 提交于
      The hardware RNG on POWER8 and POWER7+ can be relatively slow, since
      it can only supply one 64-bit value per microsecond.  Currently we
      read it in arch_get_random_long(), but that slows down reading from
      /dev/urandom since the code in random.c calls arch_get_random_long()
      for every longword read from /dev/urandom.
      
      Since the hardware RNG supplies high-quality entropy on every read, it
      matches the semantics of arch_get_random_seed_long() better than those
      of arch_get_random_long().  Therefore this commit makes the code use
      the POWER8/7+ hardware RNG only for arch_get_random_seed_{long,int}
      and not for arch_get_random_{long,int}.
      
      This won't affect any other PowerPC-based platforms because none of
      them currently support a hardware RNG.  To make it clear that the
      ppc_md function pointer is used for arch_get_random_seed_*, we rename
      it from get_random_long to get_random_seed.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      01c9348c
  2. 28 7月, 2014 1 次提交
    • M
      powerpc/pseries: Switch pseries drivers to use machine_xxx_initcall() · 8e83e905
      Michael Ellerman 提交于
      A lot of the code in platforms/pseries is using non-machine initcalls.
      That means if a kernel built with pseries support runs on another
      platform, for example powernv, the initcalls will still run.
      
      Most of these cases are OK, though sometimes only due to luck. Some were
      having more effect:
      
       * hcall_inst_init
        - Checking FW_FEATURE_LPAR which is set on ps3 & celleb.
       * mobility_sysfs_init
        - created sysfs files unconditionally
        - but no effect due to ENOSYS from rtas_ibm_suspend_me()
       * apo_pm_init
        - created sysfs, allows write
        - nothing checks the value written to though
       * alloc_dispatch_log_kmem_cache
        - creating kmem_cache on non-pseries machines
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8e83e905
  3. 21 11月, 2013 1 次提交
  4. 11 10月, 2013 1 次提交