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] [day] [month] [year] [list]
Message-ID: <AANLkTinUS9HSDCG4F8o8rrAByNaOpchBd7LBKOF6SW3T@mail.gmail.com>
Date:	Fri, 22 Oct 2010 15:09:01 -0700
From:	Harvey Harrison <harvey.harrison@...il.com>
To:	Nobuhiro Iwamatsu <iwamatsu@...auri.org>
Cc:	rtc-linux@...glegroups.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rtc: rs5c313: Replase from ctrl_* to __raw_*

On Fri, Oct 22, 2010 at 3:01 PM, Nobuhiro Iwamatsu <iwamatsu@...auri.org> wrote:
> ctrl_* is deprecated. We should to use __raw_*.
>

>
>        /* And Initialize SCL for RS5C313 clock */
> -       scsptr1_data = ctrl_inb(SCSPTR1) | SCL; /* SCL:H */
> -       ctrl_outb(scsptr1_data, SCSPTR1);
> -       scsptr1_data = ctrl_inb(SCSPTR1) | SCL_OEN;     /* SCL output enable */
> -       ctrl_outb(scsptr1_data, SCSPTR1);
> +       scsptr1_data = __raw_readb(SCSPTR1) | SCL;      /* SCL:H */
> +       __raw_writeb(scsptr1_data, SCSPTR1);
> +       scsptr1_data = __raw_readb(SCSPTR1) | SCL_OEN;  /* SCL output enable */
> +       __raw_writeb(scsptr1_data, SCSPTR1);
>        RS5C313_CEDISABLE;      /* CE:L */
>  }

I think that you need a barrier between write and the subsequent read
as the __raw helpers do not
imply one.  Otherwise the write isn't guaranteed to be done before the read.

Harvey
--
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