Re: [PATCH 13/14] Pramfs: Write Protection

2009-06-18 Thread Marco Stornelli
2009/6/18 Paul Mundt let...@linux-sh.org: On Wed, Jun 17, 2009 at 06:58:00PM +0200, Marco wrote: Jared Hulbert wrote: Why not just fix flush_tlb_range()? If an arch has a flush_tlb_kernel_page() that works then it stands to reason that the flush_tlb_kernel_range() shouldn't work with

Re: [PATCH 13/14] Pramfs: Write Protection

2009-06-17 Thread Marco
Jared Hulbert wrote: +/* init_mm.page_table_lock must be held before calling! */ +static void pram_page_writeable(unsigned long addr, int rw) +{ + ? ? ? pgd_t *pgdp; + ? ? ? pud_t *pudp; + ? ? ? pmd_t *pmdp; + ? ? ? pte_t *ptep; + + ? ? ? pgdp = pgd_offset_k(addr); +

Re: [PATCH 13/14] Pramfs: Write Protection

2009-06-17 Thread Mike Frysinger
On Wed, Jun 17, 2009 at 12:58, Marco wrote: Jared Hulbert wrote: +#if defined(CONFIG_ARM) || defined(CONFIG_M68K) || defined(CONFIG_H8300) || \ + ? ? ? defined(CONFIG_BLACKFIN) + ? ? ? /* + ? ? ? ?* FIXME: so far only these archs have flush_tlb_kernel_page(), + ? ? ? ?* for the

Re: [PATCH 13/14] Pramfs: Write Protection

2009-06-17 Thread Paul Mundt
On Wed, Jun 17, 2009 at 06:58:00PM +0200, Marco wrote: Jared Hulbert wrote: Why not just fix flush_tlb_range()? If an arch has a flush_tlb_kernel_page() that works then it stands to reason that the flush_tlb_kernel_range() shouldn't work with minimal effort, no?

Re: [PATCH 13/14] Pramfs: Write protection

2009-06-16 Thread Jared Hulbert
+/* init_mm.page_table_lock must be held before calling! */ +static void pram_page_writeable(unsigned long addr, int rw) +{ +       pgd_t *pgdp; +       pud_t *pudp; +       pmd_t *pmdp; +       pte_t *ptep; + +       pgdp = pgd_offset_k(addr); +       if (!pgd_none(*pgdp)) { +