lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 28 Nov 2012 11:52:22 +0000
From:	"Navada Kanyana, Mukund" <navada@...com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/1] regmap: Add support for continously numbered pages
 across regmap range



> -----Original Message-----
> From: Mark Brown [mailto:broonie@...nsource.wolfsonmicro.com]
> Sent: Wednesday, November 28, 2012 5:05 PM
> To: Navada Kanyana, Mukund
> Cc: Greg Kroah-Hartman; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH 1/1] regmap: Add support for continously numbered
> pages across regmap range
> 
> On Wed, Nov 28, 2012 at 10:11:05AM +0000, Navada Kanyana, Mukund wrote:
> 
> Fix your mailer to word wrap within paragraphs.
> 
> > > I'm sorry but I can't understand what this is supposed to do.  The
> > > current paging code expects pages to be numbered continuously with no
> > > gaps.  Can you please clarify?
> 
> > But the page number is expected to increase only till end of range.
> > But in devices like TLV320AIC3256, the page number increases beyond
> > range.
> 
> What does this mean?  How can we have a page beyond the end of the
> range?
> 
> > Pages 0 through Page 1 --> first register range for device
> > configuration. Page 8 through Page 16 --> second range for DSP1
> > coefficient memory Page 26 through Page 34 --> third range for DSP2
> > coefficient memory
> 
> > Window length of each page is 128. So if we need to correctly write
> > the page number in selector register for second range, start_page_num
> > would be 8. If we did not have start_page_num, it would write 0 to
> > selector register.
> 
> I'm sorry but I don't understand how that would happen?  What breaks
> accessing page 8?  This sounds like you're doing something wrong when
> you're trying ton use the paging.

I have my regmap_range_cfg as below

#define AIC325X_DSP_WINDOW_LEN  128
#define AIC325X_ADSP_CM_A_BASE  (9 * AIC325X_DSP_WINDOW_LEN)
static const struct regmap_range_cfg aic325x_ranges[] = {
        { .name = "CONF", .range_min = 128,
          .range_max = 383,
          .selector_reg = 0x0,
          .selector_mask = 0xff,
          .selector_shift = 0,
          .window_start = 0, .window_len =128,
        },
        { .name = "MINIDSP_A_CM_A", .range_min = AIC325X_ADSP_CM_A_BASE,
          .range_max = AIC325X_ADSP_CM_A_BASE + 1152,
          .selector_reg = 0x0,
          .selector_mask = 0xff,
          .selector_shift = 0,
          .window_start = 0, .window_len =128,
        },
};

In _regmap_select_page function that calculates win_page 

win_page = (*reg - range->range_min) / range->window_len;

So when my *reg is within MINIDSP_A_CM_A (that corresponds to Page 8), the above win_page calculation would be 0 instead of 8 for *reg value of AIC325X_ADSP_CM_A_BASE.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ