Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp480859pxa; Wed, 19 Aug 2020 06:53:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlXghjdNyNUUFwFPUMcsGihIdge4eLKYtHcsCnTywUj6LNoR45CYUAMiGV6DQZgfZNn2j0 X-Received: by 2002:a05:6402:3193:: with SMTP id di19mr25236088edb.224.1597845230937; Wed, 19 Aug 2020 06:53:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597845230; cv=none; d=google.com; s=arc-20160816; b=nkzQ5H0GGq9C4J1EQV1VNhoA1t8JB5jbbr68p8/x8N6qa/cj71gro/CigoGD6Rmc4Z TTsET6AD8PgR10ZXfcfS7L4xtF+yIX0NK9qxO40Z9b1b17PJ3eStuxAmc6xzcPEsexy3 Gyz4KcCirhgq++3/sSaH6Iq3hnZQXIReq2bCaCXFcbDSMUF1tsOpm1LKa4rWJLr+OMHl 7HQ+jIu8QrRj6XB+Fq9uXNEHo7B9uF98tWnEgvxA2RRzoNa1Ki3YmbAorkbXhkSThj41 U8+ArqABgcPFidPLRwbjVQkhAqWWs+uz+BymZ2A4a2I3MikV4hzk1suD6hbBYfVpevAD aIoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=ltWJt4HdLmLy75qog/vuWz53dqbAkrcied3ipKYJOts=; b=iPczD0z8+HFV5kPkg9B3wRY8Qgso/AOTuGK2a7EjDcOyTWz8Tm20dF86RXbZ0KHP4t yvl70bf1ZbGZHfVvfZ436r4S0XayV8O8miO4OeDG2h6k+t/aW135dKv7yLXV3eGDnPIG 9WYjxLOubMK0Fqfp4Sl8ESWaqwrhzdyKnZwQ/JXyTiYfl+xm1VKTPeZZv5WOp8Ob3mZh 70rvfVzhPdVDakvi1p1u3maQnGlfpVdTJbsiPW+1kWj6poPhIuU3mf/dD1WnKBNrCdmP kUZMtW9UbYuIz7qoTgTV1h7Z6GTU+Y5yGm7bEvvDOFQgmn9YEd9Fxmne9KZkgsZkQT45 ossQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d2si17097918ejm.717.2020.08.19.06.53.27; Wed, 19 Aug 2020 06:53:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728688AbgHSNu2 (ORCPT + 99 others); Wed, 19 Aug 2020 09:50:28 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:35359 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728548AbgHSNuY (ORCPT ); Wed, 19 Aug 2020 09:50:24 -0400 Received: by mail-ot1-f65.google.com with SMTP id 93so19103997otx.2; Wed, 19 Aug 2020 06:50:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ltWJt4HdLmLy75qog/vuWz53dqbAkrcied3ipKYJOts=; b=bVmck4MJWRgHrDbCdf3RFLXkq+Orq0ysSqmvqqeFkP4tAf9NiBoSMWNmRr8q3pt1x9 my6bow/lmgMTSE4NKfCN0Kk7N4eISsRdUjarIPgK3/AqE9xy0i1x9/urZ6fB1SN7lKCY 9ZMVdakuurWaIKyxb4BZi+0oq3b+wm6jLpaa8OziSM71os6QwVlaSkMLhF2rQBnFXERP 7DeawOcdmXmi+oTNv9LnwlwTJ8by2rIpSwQ38cpvgQs7BkAIlomS9Dk4LZ5UyEBr51Oc nbZwWHeaf20mMbPndUfDy3V4CPVcF9dWgyE91xRUcKY73802kXM4pWKjG/6L7ig0WjZN mL9g== X-Gm-Message-State: AOAM531fxhR151swEvKSdSD4jDj0YcWlWIDSM8r8slrznGTO2rY7rY4F 5h60I4QCG0gVAPHmDautOUGOl8INHCeU3pvKla5pGwvT X-Received: by 2002:a9d:1b62:: with SMTP id l89mr18095280otl.145.1597845022803; Wed, 19 Aug 2020 06:50:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Geert Uytterhoeven Date: Wed, 19 Aug 2020 15:50:11 +0200 Message-ID: Subject: Re: [PATCH 1/1] sh: add support for cmpxchg on u8 and u16 pointers To: Liam Beguin Cc: Yoshinori Sato , Rich Felker , Linux-sh list , Linux Kernel Mailing List , kernel test robot Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Liam, On Wed, Aug 19, 2020 at 3:34 PM Liam Beguin 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 > > 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 > > > Signed-off-by: Liam Beguin > > > --- > > > > > > 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