Signed-off-by: Finn Thain fth...@telegraphics.com.au
Acked-by: Geert Uytterhoeven ge...@linux-m68k.org
---
drivers/macintosh/nvram.c | 130 --
1 file changed, 130 deletions(-)
Index: linux/drivers/macintosh/nvram.c
On powerpc, setting CONFIG_NVRAM=n builds a kernel with no NVRAM support.
Setting CONFIG_NVRAM=m enables the /dev/nvram misc device module without
enabling NVRAM support in drivers. Setting CONFIG_NVRAM=y enables the
misc device (built-in) and also enables NVRAM support in drivers.
m68k shares
Refactor the RTC CMOS NVRAM functions so that they can be used as
arch_nvram_ops methods. Checksumming logic is moved from the misc device
operations to the nvram read/write operations.
This makes the misc device implementation more generic. This also
preserves the locking semantics such that
Signed-off-by: Finn Thain fth...@telegraphics.com.au
---
Tested on a PowerBook 520 and Quadra 650.
---
arch/m68k/mac/misc.c | 35 +--
include/uapi/linux/pmu.h |2 ++
2 files changed, 31 insertions(+), 6 deletions(-)
Index: linux/arch/m68k/mac/misc.c
A multi-platform kernel binary needs to decide at run-time how to dispatch
the arch_nvram_ops calls. Add platform-independent arch_nvram_ops, for use
when multiple platform-specific NVRAM ops implementations are needed.
Enable CONFIG_HAVE_ARCH_NVRAM_OPS for Macs.
Signed-off-by: Finn Thain
Different platforms and architectures offer different NVRAM sizes and
access methods. E.g. PPC32 has byte-at-a-time read/write functions whereas
PPC64 has byte-range read/write functions. Adopt the nvram_ops struct so
the nvram module can call such functions as are defined by the various
By implementing an arch_nvram_ops struct, any platform can re-use the
drivers/char/nvram module without needing any arch-specific code
in that module. Atari does so here.
Atari has one user of nvram_check_checksum() whereas the other platforms
(i.e. x86 and ARM platforms) have none at all.
The generic NVRAM module, drivers/char/generic_nvram, implements a
/dev/nvram misc device. It is used only by 32-bit PowerPC platforms and
isn't generic enough to be more widely used.
The RTC NVRAM module, drivers/char/nvram, also implements a /dev/nvram
misc device. It is used by x86, ARM and
And thus eliminate some twisted CONFIG_GENERIC_NVRAM logic.
Signed-off-by: Finn Thain fth...@telegraphics.com.au
---
drivers/char/Makefile|6 -
drivers/char/generic_nvram.c | 176 ---
2 files changed, 1 insertion(+), 181 deletions(-)
Index:
Drivers now use the arch_nvram_ops calls so remove the function exports and
prototypes. nvram_check_checksum() is unused so remove it.
Signed-off-by: Finn Thain fth...@telegraphics.com.au
---
arch/m68k/atari/nvram.c |6 +++---
drivers/char/nvram.c| 27 +--
The drivers/char/nvram module has previously only supported RTC CMOS
NVRAM, for which it provides appropriate checksum ioctls. Make these
ioctls optional so the module can be re-used with other kinds of NVRAM.
The ops struct methods that implement the ioctls now return error
codes so that a
The nvram_read_byte() and nvram_write_byte() definitions in asm/nvram.h
duplicate those in linux/nvram.h. Get rid of the former to prepare for
adoption of struct arch_nvram_ops (which is defined in linux/nvram.h for
general use).
Signed-off-by: Finn Thain fth...@telegraphics.com.au
---
Adopt the existing *_read_byte and *_write_byte naming convention.
Rename via_pram_readbyte and via_pram_writebyte to avoid confusion.
Adjust calling conventions of mac_pram_* functions to match the
arch_nvram_ops struct methods.
Signed-off-by: Finn Thain fth...@telegraphics.com.au
---
Changes
Adopt nvram module to reduce code duplication.
The IOC_NVRAM_GET_OFFSET ioctl as implemented on PPC64 validates the offset
returned by pmac_get_partition(). Add this test to the nvram module.
Note that the old PPC32 generic_nvram module lacked this test.
So when CONFIG_PPC32 CONFIG_PPC_PMAC,
Signed-off-by: Finn Thain fth...@telegraphics.com.au
---
drivers/char/nvram.c |1 +
1 file changed, 1 insertion(+)
Index: linux/drivers/char/nvram.c
===
--- linux.orig/drivers/char/nvram.c 2015-06-14 17:45:46.0
Switch PPC32 kernels from the generic_nvram module to the nvram module.
Also fix a theoretical bug where CHRP omits the chrp_nvram_init()
call when CONFIG_NVRAM_MODULE=m.
As before, when CONFIG_PPC !CONFIG_PPC_PMAC, the IOC_NVRAM_GET_OFFSET
ioctl is unimplemented. For the nvram module,
Implement arch_nvram_ops for PPC32 and make use of it in the generic_nvram
misc device module so that the nvram_* function exports can be removed.
Signed-off-by: Finn Thain fth...@telegraphics.com.au
---
arch/powerpc/include/asm/nvram.h |3 ---
arch/powerpc/kernel/setup_32.c | 10
Add the nvram_size() function to those PowerPC platforms that don't already
have one: CHRP and PowerMac. This means that the ppc_md.nvram_size()
function can be used to implement arch_nvram_ops.get_size()
Since we are addressing inconsistencies here, also rename chrp_nvram_read
and
Make use of arch_nvram_ops in device drivers so that the nvram_*
function exports can be removed.
Since they are no longer global symbols, rename the PPC32 nvram_* functions
appropriately.
Add the missing CONFIG_NVRAM test to imsttfb to avoid a build failure.
Signed-off-by: Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au
---
drivers/char/nvram.c | 16 +---
1 file changed, 1 insertion(+), 15 deletions(-)
Index: linux/drivers/char/nvram.c
===
--- linux.orig/drivers/char/nvram.c
Also give functions more sensible names: nvram_misc_* for misc device ops,
nvram_proc_* for proc file ops and nvram_module_* for init and exit
functions. This makes them distict from nvram_ops members.
Signed-off-by: Finn Thain fth...@telegraphics.com.au
---
drivers/char/nvram.c | 194
Add the powerpc-specific sync() method to struct nvram_ops and implement
the corresponding ioctl in the nvram module. This allows the nvram module
to replace the generic_nvram module.
Signed-off-by: Finn Thain fth...@telegraphics.com.au
---
On PPC32, the IOC_NVRAM_SYNC ioctl call always returns
Move the m68k-specific code elsewhere to make the driver generic.
Change the vmode calculation from logical OR to bitwise OR, since it is
obviously wrong.
Signed-off-by: Finn Thain fth...@telegraphics.com.au
---
BTW, I didn't change the SCSI ID location in NVRAM. This code says 16
whereas
Make use of arch_nvram_ops in the thinkpad_acpi driver so that the
nvram_* function exports can be removed.
This patch series was tested on a ThinkPad T43.
Signed-off-by: Finn Thain fth...@telegraphics.com.au
Acked-by: Henrique de Moraes Holschuh h...@hmh.eng.br
Reviewed-by: Darren Hart
Atari RTC NVRAM has a checksum so implement the remaining arch_nvram_ops
methods for the set_checksum and initialize ioctls. Enable
CONFIG_HAVE_ARCH_NVRAM_OPS.
Signed-off-by: Finn Thain fth...@telegraphics.com.au
---
This re-enables the nvram module for Atari.
---
arch/m68k/Kconfig |
On 06/12/2015 03:30 PM, Michael Ellerman wrote:
Although this init call checks for device tree properties before doing
anything, it should still only run on powernv machines.
Signed-off-by: Michael Ellerman m...@ellerman.id.au
---
arch/powerpc/platforms/powernv/idle.c | 3 +--
1 file
On Sun, 2015-06-14 at 21:58 +0530, Shreyas B Prabhu wrote:
On 06/12/2015 03:30 PM, Michael Ellerman wrote:
Although this init call checks for device tree properties before doing
anything, it should still only run on powernv machines.
Signed-off-by: Michael Ellerman m...@ellerman.id.au
On Fri, Jun 12, 2015 at 08:06:43AM -0700, Nishanth Aravamudan wrote:
On 12.06.2015 [16:47:03 +1000], Gavin Shan wrote:
On Fri, Jun 12, 2015 at 04:19:17PM +1000, Alexey Kardashevskiy wrote:
The existing code puts all devices from a root PE to the same IOMMU group.
However it is a possible
Although this init call checks for device tree properties before doing
anything, it should still only run on powernv machines.
Reviewed-by: Shreyas B Prabhu shre...@linux.vnet.ibm.com
Signed-off-by: Michael Ellerman m...@ellerman.id.au
---
arch/powerpc/platforms/powernv/idle.c | 4 ++--
1 file
From: Srikar Dronamraju sri...@linux.vnet.ibm.com
perf kvm can be used to analyze guest exit reasons. This support already
exists in x86. Hence, porting it to powerpc.
- To trace KVM events :
perf kvm stat record
If many guests are running, we can track for a specific guest by using
--pid
powerpc provides hcall events that also provides insights into guest
behaviour. Enhance perf kvm to record and analyze hcall events.
- To trace hcall events :
perf kvm stat record
- To show the results :
perf kvm stat report --event=hcall
The result shows the number of hypervisor calls
On Mon, Jun 15, 2015 at 10:26:07AM +0530, Hemant Kumar wrote:
To analyze the kvm exits with perf, we will need to map the exit codes
with the exit reasons. Such a mapping exists today in trace_book3s.h.
Currently its not exported to perf.
This patch moves these kvm exit reasons and their
On Mon, Jun 15, 2015 at 10:26:09AM +0530, Hemant Kumar wrote:
For perf to analyze the KVM events like hcalls, we need the
hypervisor calls and their codes to be exported through uapi.
Why? The hcall codes are defined externally to the kernel (in the
PAPR document) and won't change. They're
This means the 'M' flag will work properly when the kernel prints a backtrace.
Signed-off-by: Daniel Axtens d...@axtens.net
---
arch/powerpc/kernel/traps.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 6530f1b..37de90f
On Fri, 12 Jun 2015 19:47:35 Michael Ellerman wrote:
On Thu, 2015-11-06 at 09:25:29 UTC, Alistair Popple wrote:
opal_init() is called via a machine_subsys_initcall(). Due to a hack
in the eeh code the eeh driver is initialised with at the same
initcall level. This means depending on link
To analyze the kvm exits with perf, we will need to map the exit codes
with the exit reasons. Such a mapping exists today in trace_book3s.h.
Currently its not exported to perf.
This patch moves these kvm exit reasons and their mapping from
arch/powerpc/kvm/trace_book3s.h to
On 12 June 2015 at 21:16, Thomas Gleixner t...@linutronix.de wrote:
On Fri, 12 Jun 2015, Baolin Wang wrote:
Sigh. Again threading of the series failed. Some patches are, the
whole series is not. Can you please get your tools straight?
You neither managed to cc me on the security patch.
-
10.06.2015 03:14, David Miller пишет:
From: Alexander Popov alex.po...@linux.com
Date: Wed, 10 Jun 2015 02:57:42 +0300
skb_copy_from_linear_data() which doesn't work well for non-linear sk_buff:
The correct fix is to use an SKB copy routine which can
handle non-linear data.
Thanks, David.
For perf to analyze the KVM events like hcalls, we need the
hypervisor calls and their codes to be exported through uapi.
This patch moves most of the pSeries hcall codes from
arch/powerpc/include/asm/hvcall.h to
arch/powerpc/include/uapi/asm/pseries_hcalls.h.
It also moves the mapping
This patch adds an exit reason RETURN_TO_HOST for the return code
0x0. Note that this is not related to any interrupt vector address, but
this is added just to make sure that perf doesn't complain if and when a
kvm exit happens with a trap code as 0x0.
Signed-off-by: Hemant Kumar
40 matches
Mail list logo