Re: [PATCH 03/25] powerpc: track allocation status of all pkeys

2017-10-07 Thread Michael Ellerman
Ram Pai  writes:

> Total 32 keys are available on power7 and above. However
> pkey 0,1 are reserved. So effectively we  have  30 pkeys.
>
> On 4K kernels, we do not  have  5  bits  in  the  PTE to
> represent  all the keys; we only have 3bits.Two of those
> keys are reserved; pkey 0 and pkey 1. So effectively  we
> have 6 pkeys.
>
> This patch keeps track of reserved keys, allocated  keys
> and keys that are currently free.
>
> Also it  adds  skeletal  functions  and macros, that the
> architecture-independent code expects to be available.
>
> Signed-off-by: Ram Pai 
> ---
>  arch/powerpc/include/asm/book3s/64/mmu.h |9 
>  arch/powerpc/include/asm/mmu_context.h   |1 +
>  arch/powerpc/include/asm/pkeys.h |   72 
> --
>  arch/powerpc/mm/mmu_context_book3s64.c   |2 +
>  arch/powerpc/mm/pkeys.c  |   28 
>  5 files changed, 108 insertions(+), 4 deletions(-)

This doesn't build for me, with pseries_le_defconfig. I assume it built
for you. So something has changed upstream maybe?


In file included from ../include/linux/pkeys.h:8:0,
 from ../mm/mprotect.c:26:
../mm/mprotect.c: In function ‘do_mprotect_pkey’:
../arch/powerpc/include/asm/pkeys.h:27:29: error: ‘VM_PKEY_BIT0’ undeclared 
(first use in this function)
 #define ARCH_VM_PKEY_FLAGS (VM_PKEY_BIT0 | VM_PKEY_BIT1 | VM_PKEY_BIT2 | \
 ^
../mm/mprotect.c:470:6: note: in expansion of macro ‘ARCH_VM_PKEY_FLAGS’
  ARCH_VM_PKEY_FLAGS;
  ^~
../arch/powerpc/include/asm/pkeys.h:27:29: note: each undeclared identifier is 
reported only once for each function it appears in
 #define ARCH_VM_PKEY_FLAGS (VM_PKEY_BIT0 | VM_PKEY_BIT1 | VM_PKEY_BIT2 | \
 ^
../mm/mprotect.c:470:6: note: in expansion of macro ‘ARCH_VM_PKEY_FLAGS’
  ARCH_VM_PKEY_FLAGS;
  ^~
../arch/powerpc/include/asm/pkeys.h:27:44: error: ‘VM_PKEY_BIT1’ undeclared 
(first use in this function)
 #define ARCH_VM_PKEY_FLAGS (VM_PKEY_BIT0 | VM_PKEY_BIT1 | VM_PKEY_BIT2 | \
^
../mm/mprotect.c:470:6: note: in expansion of macro ‘ARCH_VM_PKEY_FLAGS’
  ARCH_VM_PKEY_FLAGS;
  ^~
../arch/powerpc/include/asm/pkeys.h:27:59: error: ‘VM_PKEY_BIT2’ undeclared 
(first use in this function)
 #define ARCH_VM_PKEY_FLAGS (VM_PKEY_BIT0 | VM_PKEY_BIT1 | VM_PKEY_BIT2 | \
   ^
../mm/mprotect.c:470:6: note: in expansion of macro ‘ARCH_VM_PKEY_FLAGS’
  ARCH_VM_PKEY_FLAGS;
  ^~
../arch/powerpc/include/asm/pkeys.h:28:5: error: ‘VM_PKEY_BIT3’ undeclared 
(first use in this function)
 VM_PKEY_BIT3 | VM_PKEY_BIT4)
 ^
../mm/mprotect.c:470:6: note: in expansion of macro ‘ARCH_VM_PKEY_FLAGS’
  ARCH_VM_PKEY_FLAGS;
  ^~
../arch/powerpc/include/asm/pkeys.h:28:20: error: ‘VM_PKEY_BIT4’ undeclared 
(first use in this function)
 VM_PKEY_BIT3 | VM_PKEY_BIT4)
^
../mm/mprotect.c:470:6: note: in expansion of macro ‘ARCH_VM_PKEY_FLAGS’
  ARCH_VM_PKEY_FLAGS;
  ^~
../scripts/Makefile.build:311: recipe for target 'mm/mprotect.o' failed


cheers


Re: [PATCH 0/4] PCI: Cleanup unused stuff

2017-10-07 Thread Ingo Molnar

* Bjorn Helgaas  wrote:

> Sorry for the long cc list.  These are pretty trivial; they just remove
> some unnecessary declarations across several arches.
> 
> ---
> 
> Bjorn Helgaas (4):
>   PCI: Remove redundant pcibios_set_master() declarations
>   PCI: Remove redundant pci_dev, pci_bus, resource declarations
>   PCI: Remove unused declarations
>   alpha/PCI: Make pdev_save_srm_config() static
> 
> 
>  arch/alpha/include/asm/pci.h|5 -
>  arch/alpha/kernel/pci.c |   11 ++-
>  arch/alpha/kernel/pci_impl.h|8 
>  arch/cris/include/asm/pci.h |9 -
>  arch/frv/include/asm/pci.h  |4 
>  arch/ia64/include/asm/pci.h |4 
>  arch/mips/include/asm/pci.h |4 
>  arch/mn10300/include/asm/pci.h  |4 
>  arch/mn10300/unit-asb2305/pci-asb2305.h |3 ---
>  arch/parisc/include/asm/pci.h   |8 
>  arch/powerpc/include/asm/pci.h  |2 --
>  arch/sh/include/asm/pci.h   |4 
>  arch/sparc/include/asm/pci_32.h |2 --
>  arch/x86/include/asm/pci.h  |2 --
>  arch/xtensa/include/asm/pci.h   |2 --
>  15 files changed, 10 insertions(+), 62 deletions(-)

Nice cleanups! For the whole series:

  Reviewed-by: Ingo Molnar 

Thanks,

Ingo