Re: [PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-06 Thread Bryan O'Donoghue
On 06/05/15 02:58, Ingo Molnar wrote: * Bryan O'Donoghue wrote: +/** + * esram_page_overlay - Overlay a page with fast access eSRAM. + * + * This function takes a 4 KiB aligned physical address and programs an + * eSRAM page to overlay that 4 KiB region. We require and verify that the + *

Re: [PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-06 Thread Ingo Molnar
* Bryan O'Donoghue wrote: > +/** > + * esram_page_overlay - Overlay a page with fast access eSRAM. > + * > + * This function takes a 4 KiB aligned physical address and programs an > + * eSRAM page to overlay that 4 KiB region. We require and verify that the > + * target memory is read-write -

Re: [PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-06 Thread Ingo Molnar
* Bryan O'Donoghue pure.lo...@nexus-software.ie wrote: +/** + * esram_page_overlay - Overlay a page with fast access eSRAM. + * + * This function takes a 4 KiB aligned physical address and programs an + * eSRAM page to overlay that 4 KiB region. We require and verify that the + * target

Re: [PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-06 Thread Bryan O'Donoghue
On 06/05/15 02:58, Ingo Molnar wrote: * Bryan O'Donoghue pure.lo...@nexus-software.ie wrote: +/** + * esram_page_overlay - Overlay a page with fast access eSRAM. + * + * This function takes a 4 KiB aligned physical address and programs an + * eSRAM page to overlay that 4 KiB region. We

Re: [PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-05 Thread H. Peter Anvin
On 05/04/2015 08:00 AM, Thomas Gleixner wrote: > >> + */ >> +static int esram_dbgfs_state_show(struct seq_file *s, void *unused) >> +{ >> +struct esram_dev *edev = _dev; >> +u32 data; >> +u32 reg = (u32)s->private; > > You really like to waste lines. What's wrong with: > > u32

Re: [PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-05 Thread Darren Hart
On Tue, May 05, 2015 at 06:48:07AM -0700, Bryan O'Donoghue wrote: > >>+ */ > >>+static int esram_dbgfs_state_show(struct seq_file *s, void *unused) > >>+{ > >>+ struct esram_dev *edev = _dev; > >>+ u32 data; > >>+ u32 reg = (u32)s->private; > > > >You really like to waste lines. What's wrong

Re: [PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-05 Thread Bryan O'Donoghue
On 04/05/15 08:00, Thomas Gleixner wrote: On Mon, 4 May 2015, Bryan O'Donoghue wrote: +++ b/arch/x86/include/asm/esram.h This should be in platform/quark/ +++ b/arch/x86/platform/intel-quark/esram.c No problem. +#define phys_to_esram(x) ((x) >> PAGE_SHIFT) There is a single

Re: [PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-05 Thread Bryan O'Donoghue
On 05/05/15 01:44, Paul Bolle wrote: On Mon, 2015-05-04 at 03:17 +0100, Bryan O'Donoghue wrote: --- a/arch/x86/platform/intel-quark/Makefile +++ b/arch/x86/platform/intel-quark/Makefile obj-$(CONFIG_INTEL_IMR) += imr.o (Your change to drivers/platform/x86/Kconfig now makes it possible

Re: [PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-05 Thread Paul Bolle
On Mon, 2015-05-04 at 03:17 +0100, Bryan O'Donoghue wrote: > --- a/arch/x86/platform/intel-quark/Makefile > +++ b/arch/x86/platform/intel-quark/Makefile > obj-$(CONFIG_INTEL_IMR) += imr.o (Your change to drivers/platform/x86/Kconfig now makes it possible that imr.o will be part of a module.

Re: [PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-05 Thread Bryan O'Donoghue
On 04/05/15 08:00, Thomas Gleixner wrote: On Mon, 4 May 2015, Bryan O'Donoghue wrote: +++ b/arch/x86/include/asm/esram.h This should be in platform/quark/ +++ b/arch/x86/platform/intel-quark/esram.c No problem. +#define phys_to_esram(x) ((x) PAGE_SHIFT) There is a single

Re: [PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-05 Thread Bryan O'Donoghue
On 05/05/15 01:44, Paul Bolle wrote: On Mon, 2015-05-04 at 03:17 +0100, Bryan O'Donoghue wrote: --- a/arch/x86/platform/intel-quark/Makefile +++ b/arch/x86/platform/intel-quark/Makefile obj-$(CONFIG_INTEL_IMR) += imr.o (Your change to drivers/platform/x86/Kconfig now makes it possible

Re: [PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-05 Thread H. Peter Anvin
On 05/04/2015 08:00 AM, Thomas Gleixner wrote: + */ +static int esram_dbgfs_state_show(struct seq_file *s, void *unused) +{ +struct esram_dev *edev = esram_dev; +u32 data; +u32 reg = (u32)s-private; You really like to waste lines. What's wrong with: u32 data, reg =

Re: [PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-05 Thread Paul Bolle
On Mon, 2015-05-04 at 03:17 +0100, Bryan O'Donoghue wrote: --- a/arch/x86/platform/intel-quark/Makefile +++ b/arch/x86/platform/intel-quark/Makefile obj-$(CONFIG_INTEL_IMR) += imr.o (Your change to drivers/platform/x86/Kconfig now makes it possible that imr.o will be part of a module. More

Re: [PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-05 Thread Darren Hart
On Tue, May 05, 2015 at 06:48:07AM -0700, Bryan O'Donoghue wrote: + */ +static int esram_dbgfs_state_show(struct seq_file *s, void *unused) +{ + struct esram_dev *edev = esram_dev; + u32 data; + u32 reg = (u32)s-private; You really like to waste lines. What's wrong with:

Re: [PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-04 Thread Thomas Gleixner
On Mon, 4 May 2015, Bryan O'Donoghue wrote: > +++ b/arch/x86/include/asm/esram.h This should be in platform/quark/ > +++ b/arch/x86/platform/intel-quark/esram.c > +#define esram_to_phys(x) ((x) << PAGE_SHIFT) Unused macro. > +#define phys_to_esram(x) ((x) >> PAGE_SHIFT) There is

Re: [PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-04 Thread Thomas Gleixner
On Mon, 4 May 2015, Bryan O'Donoghue wrote: +++ b/arch/x86/include/asm/esram.h This should be in platform/quark/ +++ b/arch/x86/platform/intel-quark/esram.c +#define esram_to_phys(x) ((x) PAGE_SHIFT) Unused macro. +#define phys_to_esram(x) ((x) PAGE_SHIFT) There is a single

[PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-03 Thread Bryan O'Donoghue
Quark X1000 ships with 512 KiB of embedded SRAM (eSRAM) a low-latency memory with access times similar to an L1 cache. eSRAM is used during the initial bootstrap phases of EFI firmware, this driver provides a gen_pool interface to eSRAM to allow drivers to make use of eSRAM for fast-access

[PATCH 1/2] x86/quark: Add Quark embedded SRAM support

2015-05-03 Thread Bryan O'Donoghue
Quark X1000 ships with 512 KiB of embedded SRAM (eSRAM) a low-latency memory with access times similar to an L1 cache. eSRAM is used during the initial bootstrap phases of EFI firmware, this driver provides a gen_pool interface to eSRAM to allow drivers to make use of eSRAM for fast-access