All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Liam Beguin <liambeguin@gmail.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>,
	Rich Felker <dalias@libc.org>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH 1/1] sh: add support for cmpxchg on u8 and u16 pointers
Date: Wed, 19 Aug 2020 13:50:11 +0000	[thread overview]
Message-ID: <CAMuHMdWAeccfEbZ=7MFgR=2SyC_1zRNGXG5G6VL5qY=d0HW37A@mail.gmail.com> (raw)
In-Reply-To: <C510813DTTYI.1PZXLO9Y2FRLM@atris>

Hi Liam,

On Wed, Aug 19, 2020 at 3:34 PM Liam Beguin <liambeguin@gmail.com> wrote:
> On Wed Aug 19, 2020 at 5:09 AM EDT, Geert Uytterhoeven wrote:
> > On Wed, Aug 19, 2020 at 5:07 AM Liam Beguin <liambeguin@gmail.com>
> > wrote:
> > > The kernel test bot reported[1] that using set_mask_bits on a u8 causes
> > > the following issue on SuperH:
> > >
> > >     >> ERROR: modpost: "__cmpxchg_called_with_bad_pointer" [drivers/phy/ti/phy-tusb1210.ko] undefined!
> > >
> > > Add support for cmpxchg on u8 and u16 pointers.
> > >
> > > [1] https://lore.kernel.org/patchwork/patch/1288894/#1485536
> > >
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Signed-off-by: Liam Beguin <liambeguin@gmail.com>
> > > ---
> > >
> > > Hi,
> > >
> > > This was reported by the kernel test bot on an architecture I can't
> > > really test on. I was only able to make sure the build succeeds, but
> > > nothing more.
> > > This patch is based on the __cmpxchg_u32 impletmentation and seems
> > > incomplete based on the different cmpxchg headers I can find.
> >
> > Indeed. This version is suitable for non-SMP machines only.
> > BTW, it looks like this version can be replaced by the one in
> > asm-generic?
> >
>
> Thanks for your feedback I'll have a look at the asm-generic functions
> and try to use those instead.
>
> > >
> > > Do these function need to be impletmented in each header
> > > simulataneously?
> >
> > Yes, we need them for all variants.
> >
>
> Okay, I'll look into that. Would you recommend a good way to test these
> changes?

That's gonna be harder, I'm afraid.
Who has suitable hardware?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Liam Beguin <liambeguin@gmail.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>,
	Rich Felker <dalias@libc.org>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH 1/1] sh: add support for cmpxchg on u8 and u16 pointers
Date: Wed, 19 Aug 2020 15:50:11 +0200	[thread overview]
Message-ID: <CAMuHMdWAeccfEbZ=7MFgR=2SyC_1zRNGXG5G6VL5qY=d0HW37A@mail.gmail.com> (raw)
In-Reply-To: <C510813DTTYI.1PZXLO9Y2FRLM@atris>

Hi Liam,

On Wed, Aug 19, 2020 at 3:34 PM Liam Beguin <liambeguin@gmail.com> wrote:
> On Wed Aug 19, 2020 at 5:09 AM EDT, Geert Uytterhoeven wrote:
> > On Wed, Aug 19, 2020 at 5:07 AM Liam Beguin <liambeguin@gmail.com>
> > wrote:
> > > The kernel test bot reported[1] that using set_mask_bits on a u8 causes
> > > the following issue on SuperH:
> > >
> > >     >> ERROR: modpost: "__cmpxchg_called_with_bad_pointer" [drivers/phy/ti/phy-tusb1210.ko] undefined!
> > >
> > > Add support for cmpxchg on u8 and u16 pointers.
> > >
> > > [1] https://lore.kernel.org/patchwork/patch/1288894/#1485536
> > >
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Signed-off-by: Liam Beguin <liambeguin@gmail.com>
> > > ---
> > >
> > > Hi,
> > >
> > > This was reported by the kernel test bot on an architecture I can't
> > > really test on. I was only able to make sure the build succeeds, but
> > > nothing more.
> > > This patch is based on the __cmpxchg_u32 impletmentation and seems
> > > incomplete based on the different cmpxchg headers I can find.
> >
> > Indeed. This version is suitable for non-SMP machines only.
> > BTW, it looks like this version can be replaced by the one in
> > asm-generic?
> >
>
> Thanks for your feedback I'll have a look at the asm-generic functions
> and try to use those instead.
>
> > >
> > > Do these function need to be impletmented in each header
> > > simulataneously?
> >
> > Yes, we need them for all variants.
> >
>
> Okay, I'll look into that. Would you recommend a good way to test these
> changes?

That's gonna be harder, I'm afraid.
Who has suitable hardware?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2020-08-19 13:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19  3:05 [PATCH 1/1] sh: add support for cmpxchg on u8 and u16 pointers Liam Beguin
2020-08-19  3:05 ` Liam Beguin
2020-08-19  9:09 ` Geert Uytterhoeven
2020-08-19  9:09   ` Geert Uytterhoeven
2020-08-19 13:23   ` Liam Beguin
2020-08-19 13:23     ` Liam Beguin
2020-08-19 13:50     ` Geert Uytterhoeven [this message]
2020-08-19 13:50       ` Geert Uytterhoeven
2020-08-21 20:46 ` Rob Landley
2020-08-23  8:47 ` Geert Uytterhoeven

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='CAMuHMdWAeccfEbZ=7MFgR=2SyC_1zRNGXG5G6VL5qY=d0HW37A@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=dalias@libc.org \
    --cc=liambeguin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=ysato@users.sourceforge.jp \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.