Message ID | 1511336923-610-1-git-send-email-Bharat.Bhushan@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 11/22/2017 09:48 AM, Bharat Bhushan wrote: > As per APIs each mc-portal is of 64K size while currently > 16bits (type u16) is used to store size of mc-portal. > In these cases upper bit of portal size gets truncated. > > Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com> > --- Ok, so just to clarify this fixes the case where size is equal (or maybe larger in the future) to 0x10000. Acked-By: Laurentiu Tudor <laurentiu.tudor@nxp.com> --- Best Regards, Laurentiu
On Wed, Nov 22, 2017 at 10:49:50AM +0000, Laurentiu Tudor wrote: > > > On 11/22/2017 09:48 AM, Bharat Bhushan wrote: > > As per APIs each mc-portal is of 64K size while currently > > 16bits (type u16) is used to store size of mc-portal. > > In these cases upper bit of portal size gets truncated. > > > > Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com> > > --- > > Ok, so just to clarify this fixes the case where size is equal (or maybe > larger in the future) to 0x10000. Is this something that can happen today? Is this needed in 4.14 to fix a problem people are having and need to be backported to stable, or can it wait until 4.15? thanks, greg k-h
Hi Greg, > -----Original Message----- > From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org] > Sent: Friday, November 24, 2017 9:29 PM > To: Laurentiu Tudor <laurentiu.tudor@nxp.com> > Cc: Bharat Bhushan <bharat.bhushan@nxp.com>; Ruxandra Ioana Radulescu > <ruxandra.radulescu@nxp.com>; devel@driverdev.osuosl.org; > stuyoder@gmail.com; Roy Pledge <roy.pledge@nxp.com>; linux- > kernel@vger.kernel.org; Leo Li <leoyang.li@nxp.com>; Bogdan Purcareata > <bogdan.purcareata@nxp.com>; linux-arm-kernel@lists.infradead.org > Subject: Re: [PATCH v3] staging: fsl-mc: use 32bits to support 64K size mc- > portals > > On Wed, Nov 22, 2017 at 10:49:50AM +0000, Laurentiu Tudor wrote: > > > > > > On 11/22/2017 09:48 AM, Bharat Bhushan wrote: > > > As per APIs each mc-portal is of 64K size while currently 16bits > > > (type u16) is used to store size of mc-portal. > > > In these cases upper bit of portal size gets truncated. > > > > > > Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com> > > > --- > > > > Ok, so just to clarify this fixes the case where size is equal (or > > maybe larger in the future) to 0x10000. > > Is this something that can happen today? Is this needed in 4.14 to fix a > problem people are having and need to be backported to stable, or can it > wait until 4.15? We can wait for 4.15 and no need to backport. Thanks -Bharat > > thanks, > > greg k-h
diff --git a/drivers/staging/fsl-mc/include/mc.h b/drivers/staging/fsl-mc/include/mc.h index aafe63a..2cf15b0 100644 --- a/drivers/staging/fsl-mc/include/mc.h +++ b/drivers/staging/fsl-mc/include/mc.h @@ -325,7 +325,7 @@ static inline void mc_cmd_read_api_version(struct mc_command *cmd, struct fsl_mc_io { struct device *dev; u16 flags; - u16 portal_size; + u32 portal_size; phys_addr_t portal_phys_addr; void __iomem *portal_virt_addr; struct fsl_mc_device *dpmcp_dev;
As per APIs each mc-portal is of 64K size while currently 16bits (type u16) is used to store size of mc-portal. In these cases upper bit of portal size gets truncated. Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com> --- v2->v3: - v2 patch: https://patchwork.kernel.org/patch/10067661/ - Changes patch subject and description v1->v2: - v1 patch: https://patchwork.kernel.org/patch/10067657/ - replace uin32_t to u32 in patch subject/description drivers/staging/fsl-mc/include/mc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)