Re: [PATCH] powerpc/64s: use ibm,tlbiel-congruence-classes-(hash|radix) dt property

2017-04-22 Thread Benjamin Herrenschmidt
On Sun, 2017-04-23 at 09:14 +1000, Nicholas Piggin wrote:
> I think we were going to take another look at moving the setup code
> later, but I think that might wait until 4.13.

Except without that we won't boot a post-P9 CPU right ? So we'll end up
having to chase distros to backport it :-( Oh well...

Ben.



Re: [PATCH] powerpc/64s: use ibm,tlbiel-congruence-classes-(hash|radix) dt property

2017-04-22 Thread Nicholas Piggin
On Sat, 22 Apr 2017 18:02:10 +1000
Benjamin Herrenschmidt  wrote:

> On Sat, 2017-04-22 at 10:58 +1000, Nicholas Piggin wrote:
> > +static void __init init_mmu_tlb_sets_hash(unsigned long node)
> > +{
> > +   const __be32 *ptr;
> > +
> > +   ptr = of_get_flat_dt_prop(node, 
> > "ibm,tlbiel-congruence-classes-hash", NULL);
> > +   if (ptr)
> > +   cur_cpu_spec->tlb_sets_hash = be32_to_cpup(ptr);
> > +}
> > +
> > +static void __init init_mmu_tlb_sets_radix(unsigned long node)
> > +{
> > +   const __be32 *ptr;
> > +
> > +   ptr = of_get_flat_dt_prop(node, 
> > "ibm,tlbiel-congruence-classes-radix", NULL);
> > +   if (ptr)
> > +   cur_cpu_spec->tlb_sets_radix = be32_to_cpup(ptr);
> > +}
> >  #else
> >  #define init_mmu_slb_size(node) do { } while(0)
> > +#define init_mmu_hash_sets(node) do { } while(0)
> > +#define init_mmu_radix_sets(node) do { } while(0)
> >  #endif  
> 
> Why 2 functions ? I would have done one checking both props :-)

Probably mindless copy paste. I'll consolidate.


> Anothe thing to do is remove the assembly TLB flush from cpu_setup_power.S.
> 
> That happens too early anyway and do it later, at MMU init.
> 
> In fact, I wonder ... a lot of the stuff in there still requires us to more
> or less know the PVR of the CPU. We could move the call to after we've done
> the early DT parsing I reckon.
> 
> That way we can use arch level to set things like LPCR appropriately.

I think we were going to take another look at moving the setup code later,
but I think that might wait until 4.13.



[PATCH] drivers/tty/hvc: fix spelling mistake: "missmanaged" -> "mismanaged"

2017-04-22 Thread Colin King
From: Colin Ian King 

Trivial fix to spelling mistake in printk message

Signed-off-by: Colin Ian King 
---
 drivers/tty/hvc/hvcs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index 7823d6d998cf..2113c64d565d 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -1242,8 +1242,7 @@ static void hvcs_close(struct tty_struct *tty, struct 
file *filp)
free_irq(irq, hvcsd);
return;
} else if (hvcsd->port.count < 0) {
-   printk(KERN_ERR "HVCS: vty-server@%X open_count: %d"
-   " is missmanaged.\n",
+   printk(KERN_ERR "HVCS: vty-server@%X open_count: %d is 
mismanaged.\n",
hvcsd->vdev->unit_address, hvcsd->port.count);
}
 
-- 
2.11.0



Re: [PATCH] powerpc/64s: use ibm, tlbiel-congruence-classes-(hash|radix) dt property

2017-04-22 Thread kbuild test robot
Hi Nicholas,

[auto build test ERROR on powerpc/next]
[also build test ERROR on next-20170421]
[cannot apply to v4.11-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Nicholas-Piggin/powerpc-64s-use-ibm-tlbiel-congruence-classes-hash-radix-dt-property/20170422-164227
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allnoconfig (attached as .config)
compiler: powerpc-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget 
https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=powerpc 

All errors (new ones prefixed by >>):

   arch/powerpc/kernel/prom.c: In function 'early_init_dt_scan_cpus':
>> arch/powerpc/kernel/prom.c:407:2: error: implicit declaration of function 
>> 'init_mmu_tlb_sets_hash' [-Werror=implicit-function-declaration]
 init_mmu_tlb_sets_hash(node);
 ^~
>> arch/powerpc/kernel/prom.c:408:2: error: implicit declaration of function 
>> 'init_mmu_tlb_sets_radix' [-Werror=implicit-function-declaration]
 init_mmu_tlb_sets_radix(node);
 ^~~
   cc1: all warnings being treated as errors

vim +/init_mmu_tlb_sets_hash +407 arch/powerpc/kernel/prom.c

   401  
   402  identical_pvr_fixup(node);
   403  
   404  check_cpu_feature_properties(node);
   405  check_cpu_pa_features(node);
   406  init_mmu_slb_size(node);
 > 407  init_mmu_tlb_sets_hash(node);
 > 408  init_mmu_tlb_sets_radix(node);
   409  
   410  #ifdef CONFIG_PPC64
   411  if (nthreads > 1)

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH] powerpc/64s: use ibm,tlbiel-congruence-classes-(hash|radix) dt property

2017-04-22 Thread Benjamin Herrenschmidt
On Sat, 2017-04-22 at 10:58 +1000, Nicholas Piggin wrote:
> +static void __init init_mmu_tlb_sets_hash(unsigned long node)
> +{
> +   const __be32 *ptr;
> +
> +   ptr = of_get_flat_dt_prop(node, "ibm,tlbiel-congruence-classes-hash", 
> NULL);
> +   if (ptr)
> +   cur_cpu_spec->tlb_sets_hash = be32_to_cpup(ptr);
> +}
> +
> +static void __init init_mmu_tlb_sets_radix(unsigned long node)
> +{
> +   const __be32 *ptr;
> +
> +   ptr = of_get_flat_dt_prop(node, 
> "ibm,tlbiel-congruence-classes-radix", NULL);
> +   if (ptr)
> +   cur_cpu_spec->tlb_sets_radix = be32_to_cpup(ptr);
> +}
>  #else
>  #define init_mmu_slb_size(node) do { } while(0)
> +#define init_mmu_hash_sets(node) do { } while(0)
> +#define init_mmu_radix_sets(node) do { } while(0)
>  #endif

Why 2 functions ? I would have done one checking both props :-)

Anothe thing to do is remove the assembly TLB flush from cpu_setup_power.S.

That happens too early anyway and do it later, at MMU init.

In fact, I wonder ... a lot of the stuff in there still requires us to more
or less know the PVR of the CPU. We could move the call to after we've done
the early DT parsing I reckon.

That way we can use arch level to set things like LPCR appropriately.

Cheers,
Ben.