[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTikXxzcr+Ybru9vCt0+w6s-UYVNEudxvecF-0Xse@mail.gmail.com>
Date: Wed, 24 Nov 2010 09:23:02 +0100
From: Marco Stornelli <marco.stornelli@...il.com>
To: Paul Mundt <lethal@...ux-sh.org>
Cc: Linux Kernel <linux-kernel@...r.kernel.org>,
Linux Embedded <linux-embedded@...r.kernel.org>,
Linux FS Devel <linux-fsdevel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...e.de>,
Tim Bird <tim.bird@...sony.com>
Subject: Re: [PATCH 08/16 v4] pramfs: headers
2010/11/24 Paul Mundt <lethal@...ux-sh.org>:
> On Sat, Nov 20, 2010 at 11:00:15AM +0100, Marco Stornelli wrote:
>> +/*
>> + * Debug code
>> + */
>> +#define pram_dbg(s, args...) pr_debug("PRAMFS: "s, ## args)
>> +#define pram_err(s, args...) pr_err("PRAMFS: "s, ## args)
>> +#define pram_warn(s, args...) pr_warning("PRAMFS: "s, ## args)
>> +#define pram_info(s, args...) pr_info("PRAMFS: "s, ## args)
>> +
> Please kill off all of this and just use KBUILD_MODNAME centrally.
I didn't know this way to do, I'll look at it.
>
>> +#ifdef CONFIG_PRAMFS_WRITE_PROTECT
>> +extern void pram_writeable(void *vaddr, unsigned long size, int rw);
>> +
>> +#define wrprotect(addr, size) pram_writeable(addr, size, 0)
>> +
>> +#else
>> +
>> +#define wrprotect(addr, size) do {} while (0)
>> +
>> +#endif /* CONFIG PRAMFS_WRITE_PROTECT */
>> +
> Perhaps this should be pram_wrprotect()? Does this really benefit from
> being a config option instead of a mount option? Will this handle
> multiple mounts with some write protected and others not?
See my previous response.
>
>> +#ifdef CONFIG_PRAMFS_WRITE_PROTECT
>> +static inline void pram_memunlock_range(void *p, unsigned long len)
>> +{
>> +#ifndef CONFIG_X86
>> + local_irq_disable();
>> +#endif
>> + preempt_disable();
>> + pram_writeable(p, len, 1);
>> +}
>> +
> This needs some explaining, or killing. While the latter is preferable,
> we can also work with the former.
>
Maybe I didn't understand, you mean preemt_disable() without disabling
the interrupt?
--
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