Signed-off-by: Finn Thain
Acked-by: Geert Uytterhoeven
---
drivers/macintosh/nvram.c | 130 --
1 file changed, 130 deletions(-)
Index: linux/drivers/macintosh/nvram.c
===
--- linux.orig
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 the
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 m6
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
---
BTW, I didn't change the SCSI ID location in NVRAM. This code says 16
whereas atari_scsi says 14. Which one i
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. Replace
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
platforms
Signed-off-by: Finn Thain
---
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 +1000
+++ linux/drivers/char/nv
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 mult
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
---
arch/powerpc/include/asm/nvram.h
Signed-off-by: Finn Thain
---
drivers/char/nvram.c | 16 +---
1 file changed, 1 insertion(+), 15 deletions(-)
Index: linux/drivers/char/nvram.c
===
--- linux.orig/drivers/char/nvram.c 2015-06-14 17:45:45.0
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
---
drivers/char/nvram.c | 194 ++-
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
---
This re-enables the nvram module for Atari.
---
arch/m68k/Kconfig |3 +++
arch/m68k/atari/nvr
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
Acked-by: Henrique de Moraes Holschuh
Reviewed-by: Darren Hart
---
drivers/platform/x86/thinkpad_acpi.c | 20
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 "r
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 chrp_nvram_writ
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
---
arch/powerpc/include/asm/nvram.h |3 ---
arch/powerpc/kernel/setup_32.c | 10 +++---
drivers/char/generic_
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, unimple
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
---
arc
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
---
Changes since v1:
- Don't introduce
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, t
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
---
On PPC32, the IOC_NVRAM_SYNC ioctl call always returns 0, even for those
platform
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
---
arch/m68k/atari/nvram.c |6 +++---
drivers/char/nvram.c| 27 +--
include/linux/nvram.h |8
And thus eliminate some twisted CONFIG_GENERIC_NVRAM logic.
Signed-off-by: Finn Thain
---
drivers/char/Makefile|6 -
drivers/char/generic_nvram.c | 176 ---
2 files changed, 1 insertion(+), 181 deletions(-)
Index: linux/drivers/char/Makefile
Signed-off-by: Finn Thain
---
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
---
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
> ---
> arch/powerpc/platforms/powernv/idle.c | 3 +--
> 1 file changed, 1 inse
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 possibl
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
> > ---
>
On 12 June 2015 at 21:16, Thomas Gleixner 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.
>
>> - Modify the
10.06.2015 03:14, David Miller пишет:
From: Alexander Popov
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.
I'll prepare the seco
This means the 'M' flag will work properly when the kernel prints a backtrace.
Signed-off-by: Daniel Axtens
---
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 100644
--- a/arch/pow
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 l
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
"arch/powerpc/include
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 from
arch/
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
---
arch/powe
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
Signed-off-by: Michael Ellerman
---
arch/powerpc/platforms/powernv/idle.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
v2:
From: Srikar Dronamraju
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 as in : perf kvm stat rec
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 fro
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 n
On 2015/3/27 5:14, Scott Wood wrote:
> Commit bb344ca5b90df6 ("powerpc/mpc85xx: Add ranges to etsec2 nodes")
> fixes a bug that was exposed by commit 746c9e9f92dd ("of/base: Fix
> PowerPC address parsing hack"). The latter commit was applied to stable
> trees, so the former should be as well.
>
On Sun, 2015-14-06 at 07:46:08 UTC, Finn Thain wrote:
> Signed-off-by: Finn Thain
> Acked-by: Geert Uytterhoeven
> ---
> drivers/macintosh/nvram.c | 130
> --
> 1 file changed, 130 deletions(-)
This seems uncontroversial, so I'll take it via powerpc
On Fri, 2015-12-06 at 06:19:17 UTC, Alexey Kardashevskiy wrote:
> The existing code puts all devices from a root PE to the same IOMMU group.
> However it is a possible situation when subordinate buses belong to
> separate PEs, in this case devices from these subordinate buses
> should be added to l
43 matches
Mail list logo