ACK: [PATCH] lib: fwts_cmos: remove cli/sti assembler from cmos reading
Alex Hung
alex.hung at canonical.com
Wed Nov 11 05:08:10 UTC 2020
On 2020-11-10 10:20 a.m., Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Recent Linux kernel config defaults will not allow messing around with
> the interrupt disable/enable from userspace and will segfault the code.
> Remove these as they don't really need to be used and we just need to
> remember that updates to CMOS data may occur under kernel control
> while it is being read by fwts.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/lib/src/fwts_cmos.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/src/lib/src/fwts_cmos.c b/src/lib/src/fwts_cmos.c
> index b40c8100..6b285eac 100644
> --- a/src/lib/src/fwts_cmos.c
> +++ b/src/lib/src/fwts_cmos.c
> @@ -47,7 +47,6 @@ int fwts_cmos_read(const uint8_t offset, uint8_t *value)
> goto tidy0x80;
> }
>
> - asm("cli");
> /* specify offset to read */
> if (fwts_outb(offset, 0x70) != FWTS_OK) {
> ret = FWTS_ERROR;
> @@ -64,7 +63,6 @@ int fwts_cmos_read(const uint8_t offset, uint8_t *value)
> if (fwts_inb(0x71, value) != FWTS_OK)
> ret = FWTS_ERROR;
> tidy:
> - asm("sti");
> (void)iopl(0);
> tidy0x80:
> (void)ioperm(0x80, 1, 0);
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list