lkml.org 
[lkml]   [2021]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH linux-next 1/1] phy: Sparx5 Eth SerDes: Use direct register operations
From
Date
Hi Andrew,

On Mon, 2021-03-29 at 20:55 +0200, Andrew Lunn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On Mon, Mar 29, 2021 at 10:14:38AM +0200, Steen Hegelund wrote:
> > Use direct register operations instead of a table of register
> > information to lower the stack usage.
> >
> > Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com>
> > Reported-by: kernel test robot <lkp@intel.com>
> > ---
> > drivers/phy/microchip/sparx5_serdes.c | 1869 +++++++++++++------------
> > 1 file changed, 951 insertions(+), 918 deletions(-)
> >
> > diff --git a/drivers/phy/microchip/sparx5_serdes.c b/drivers/phy/microchip/sparx5_serdes.c
> > index 06bcf0c166cf..43de68a62c2f 100644
> > --- a/drivers/phy/microchip/sparx5_serdes.c
> > +++ b/drivers/phy/microchip/sparx5_serdes.c
> > @@ -343,12 +343,6 @@ struct sparx5_sd10g28_params {
> > u8 fx_100;
> > };
> >
> > -struct sparx5_serdes_regval {
> > - u32 value;
> > - u32 mask;
> > - void __iomem *addr;
> > -};
> > -
> > static struct sparx5_sd25g28_media_preset media_presets_25g[] = {
> > { /* ETH_MEDIA_DEFAULT */
> > .cfg_en_adv = 0,
> > @@ -945,431 +939,411 @@ static void sparx5_sd25g28_reset(void __iomem *regs[],
> > }
> > }
> >
> > -static int sparx5_sd25g28_apply_params(struct device *dev,
> > - void __iomem *regs[],
> > - struct sparx5_sd25g28_params *params,
> > - u32 sd_index)
> > +static int sparx5_sd25g28_apply_params(struct sparx5_serdes_macro *macro,
> > + struct sparx5_sd25g28_params *params)
> > {
> > - struct sparx5_serdes_regval item[] = {
>
> Could you just add const here, and then it is no longer on the stack?
>
> Andrew

No it still counts against the stack even as a const structure.

BR
Steen


\
 
 \ /
  Last update: 2021-03-30 10:20    [W:0.070 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site