linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
To: Laurent Dufour <ldufour@linux.ibm.com>,
	mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org,
	npiggin@gmail.com
Cc: linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] powperc/mm: read TLB Block Invalidate Characteristics
Date: Fri, 13 Sep 2019 07:30:42 +0530	[thread overview]
Message-ID: <97bafb53-6ae9-1d42-1816-ef81b845b80c@linux.ibm.com> (raw)
In-Reply-To: <468a53a6-a970-5526-8035-eef59dcf48ed@linux.ibm.com>

On 9/13/19 12:56 AM, Laurent Dufour wrote:
> Le 12/09/2019 à 16:44, Aneesh Kumar K.V a écrit :
>> Laurent Dufour <ldufour@linux.ibm.com> writes:

>>> +
>>> +    idx = 2;
>>> +    while (idx < len) {
>>> +        unsigned int block_size = local_buffer[idx++];
>>> +        unsigned int npsize;
>>> +
>>> +        if (!block_size)
>>> +            break;
>>> +
>>> +        block_size = 1 << block_size;
>>> +        if (block_size != 8)
>>> +            /* We only support 8 bytes size TLB invalidate buffer */
>>> +            pr_warn("Unsupported H_BLOCK_REMOVE block size : %d\n",
>>> +                block_size);
>>
>> Should we skip setting block size if we find block_size != 8? Also can
>> we avoid doing that pr_warn in loop and only warn if we don't find
>> block_size 8 in the invalidate characteristics array?
> 
> My idea here is to fully read and process the data returned by the 
> hcall, and to put the limitation to 8 when checking before calling 
> H_BLOCK_REMOVE.
> The warning is there because I want it to be displayed once at boot.
> 


Can we have two block size reported for the same base page size/actual 
page size combination? If so we will overwrite the hblk[actual_psize] ?

>>
>>> +
>>> +        for (npsize = local_buffer[idx++];  npsize > 0; npsize--)
>>> +            check_lp_set_hblk((unsigned int) local_buffer[idx++],
>>> +                      block_size);
>>> +    }
>>> +
>>> +    for (bpsize = 0; bpsize < MMU_PAGE_COUNT; bpsize++)
>>> +        for (idx = 0; idx < MMU_PAGE_COUNT; idx++)
>>> +            if (mmu_psize_defs[bpsize].hblk[idx])
>>> +                pr_info("H_BLOCK_REMOVE supports base psize:%d 
>>> psize:%d block size:%d",
>>> +                    bpsize, idx,
>>> +                    mmu_psize_defs[bpsize].hblk[idx]);
>>> +
>>> +    return 0;
>>> +}
>>> +machine_arch_initcall(pseries, read_tlbbi_characteristics);
>>> +
>>>   /*
>>>    * Take a spinlock around flushes to avoid bouncing the hypervisor 
>>> tlbie
>>>    * lock.

-aneesh


  reply	other threads:[~2019-09-13  2:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30 12:07 [PATCH 0/3] powerpc/mm: Conditionally call H_BLOCK_REMOVE Laurent Dufour
2019-08-30 12:07 ` [PATCH 1/3] powerpc/mm: Initialize the HPTE encoding values Laurent Dufour
2019-09-12 13:32   ` Aneesh Kumar K.V
2019-09-12 13:37   ` Aneesh Kumar K.V
2019-09-13 10:56     ` Laurent Dufour
2019-08-30 12:07 ` [PATCH 2/3] powperc/mm: read TLB Block Invalidate Characteristics Laurent Dufour
2019-09-12 14:16   ` Aneesh Kumar K.V
2019-09-13 13:55     ` Laurent Dufour
2019-09-12 14:44   ` Aneesh Kumar K.V
2019-09-12 19:26     ` Laurent Dufour
2019-09-13  2:00       ` Aneesh Kumar K.V [this message]
2019-09-13  9:10         ` Laurent Dufour
2019-08-30 12:07 ` [PATCH 3/3] powerpc/mm: call H_BLOCK_REMOVE when supported Laurent Dufour
2019-09-12 14:20   ` Aneesh Kumar K.V
2019-09-13 13:16     ` Laurent Dufour
2019-09-12 13:44 ` [PATCH 0/3] powerpc/mm: Conditionally call H_BLOCK_REMOVE Aneesh Kumar K.V
2019-09-13 11:09   ` Laurent Dufour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=97bafb53-6ae9-1d42-1816-ef81b845b80c@linux.ibm.com \
    --to=aneesh.kumar@linux.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=ldufour@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).