1. 24 9月, 2009 1 次提交
  2. 21 9月, 2009 3 次提交
    • I
      perf: Do the big rename: Performance Counters -> Performance Events · cdd6c482
      Ingo Molnar 提交于
      Bye-bye Performance Counters, welcome Performance Events!
      
      In the past few months the perfcounters subsystem has grown out its
      initial role of counting hardware events, and has become (and is
      becoming) a much broader generic event enumeration, reporting, logging,
      monitoring, analysis facility.
      
      Naming its core object 'perf_counter' and naming the subsystem
      'perfcounters' has become more and more of a misnomer. With pending
      code like hw-breakpoints support the 'counter' name is less and
      less appropriate.
      
      All in one, we've decided to rename the subsystem to 'performance
      events' and to propagate this rename through all fields, variables
      and API names. (in an ABI compatible fashion)
      
      The word 'event' is also a bit shorter than 'counter' - which makes
      it slightly more convenient to write/handle as well.
      
      Thanks goes to Stephane Eranian who first observed this misnomer and
      suggested a rename.
      
      User-space tooling and ABI compatibility is not affected - this patch
      should be function-invariant. (Also, defconfigs were not touched to
      keep the size down.)
      
      This patch has been generated via the following script:
      
        FILES=$(find * -type f | grep -vE 'oprofile|[^K]config')
      
        sed -i \
          -e 's/PERF_EVENT_/PERF_RECORD_/g' \
          -e 's/PERF_COUNTER/PERF_EVENT/g' \
          -e 's/perf_counter/perf_event/g' \
          -e 's/nb_counters/nb_events/g' \
          -e 's/swcounter/swevent/g' \
          -e 's/tpcounter_event/tp_event/g' \
          $FILES
      
        for N in $(find . -name perf_counter.[ch]); do
          M=$(echo $N | sed 's/perf_counter/perf_event/g')
          mv $N $M
        done
      
        FILES=$(find . -name perf_event.*)
      
        sed -i \
          -e 's/COUNTER_MASK/REG_MASK/g' \
          -e 's/COUNTER/EVENT/g' \
          -e 's/\<event\>/event_id/g' \
          -e 's/counter/event/g' \
          -e 's/Counter/Event/g' \
          $FILES
      
      ... to keep it as correct as possible. This script can also be
      used by anyone who has pending perfcounters patches - it converts
      a Linux kernel tree over to the new naming. We tried to time this
      change to the point in time where the amount of pending patches
      is the smallest: the end of the merge window.
      
      Namespace clashes were fixed up in a preparatory patch - and some
      stylistic fallout will be fixed up in a subsequent patch.
      
      ( NOTE: 'counters' are still the proper terminology when we deal
        with hardware registers - and these sed scripts are a bit
        over-eager in renaming them. I've undone some of that, but
        in case there's something left where 'counter' would be
        better than 'event' we can undo that on an individual basis
        instead of touching an otherwise nicely automated patch. )
      Suggested-by: NStephane Eranian <eranian@google.com>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NPaul Mackerras <paulus@samba.org>
      Reviewed-by: NArjan van de Ven <arjan@linux.intel.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: <linux-arch@vger.kernel.org>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cdd6c482
    • T
      Use macros for .bss.page_aligned section. · 02b7da37
      Tim Abbott 提交于
      This patch changes the remaining direct references to
      .bss.page_aligned in C and assembly code to use the macros in
      include/linux/linkage.h.
      Signed-off-by: NTim Abbott <tabbott@ksplice.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Acked-by: NPaul Mundt <lethal@linux-sh.org>
      Cc: Chris Zankel <chris@zankel.net>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      02b7da37
    • J
      d200c922
  3. 20 9月, 2009 1 次提交
  4. 16 9月, 2009 2 次提交
  5. 15 9月, 2009 1 次提交
  6. 14 9月, 2009 2 次提交
  7. 02 9月, 2009 1 次提交
    • D
      KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] · ee18d64c
      David Howells 提交于
      Add a keyctl to install a process's session keyring onto its parent.  This
      replaces the parent's session keyring.  Because the COW credential code does
      not permit one process to change another process's credentials directly, the
      change is deferred until userspace next starts executing again.  Normally this
      will be after a wait*() syscall.
      
      To support this, three new security hooks have been provided:
      cred_alloc_blank() to allocate unset security creds, cred_transfer() to fill in
      the blank security creds and key_session_to_parent() - which asks the LSM if
      the process may replace its parent's session keyring.
      
      The replacement may only happen if the process has the same ownership details
      as its parent, and the process has LINK permission on the session keyring, and
      the session keyring is owned by the process, and the LSM permits it.
      
      Note that this requires alteration to each architecture's notify_resume path.
      This has been done for all arches barring blackfin, m68k* and xtensa, all of
      which need assembly alteration to support TIF_NOTIFY_RESUME.  This allows the
      replacement to be performed at the point the parent process resumes userspace
      execution.
      
      This allows the userspace AFS pioctl emulation to fully emulate newpag() and
      the VIOCSETTOK and VIOCSETTOK2 pioctls, all of which require the ability to
      alter the parent process's PAG membership.  However, since kAFS doesn't use
      PAGs per se, but rather dumps the keys into the session keyring, the session
      keyring of the parent must be replaced if, for example, VIOCSETTOK is passed
      the newpag flag.
      
      This can be tested with the following program:
      
      	#include <stdio.h>
      	#include <stdlib.h>
      	#include <keyutils.h>
      
      	#define KEYCTL_SESSION_TO_PARENT	18
      
      	#define OSERROR(X, S) do { if ((long)(X) == -1) { perror(S); exit(1); } } while(0)
      
      	int main(int argc, char **argv)
      	{
      		key_serial_t keyring, key;
      		long ret;
      
      		keyring = keyctl_join_session_keyring(argv[1]);
      		OSERROR(keyring, "keyctl_join_session_keyring");
      
      		key = add_key("user", "a", "b", 1, keyring);
      		OSERROR(key, "add_key");
      
      		ret = keyctl(KEYCTL_SESSION_TO_PARENT);
      		OSERROR(ret, "KEYCTL_SESSION_TO_PARENT");
      
      		return 0;
      	}
      
      Compiled and linked with -lkeyutils, you should see something like:
      
      	[dhowells@andromeda ~]$ keyctl show
      	Session Keyring
      	       -3 --alswrv   4043  4043  keyring: _ses
      	355907932 --alswrv   4043    -1   \_ keyring: _uid.4043
      	[dhowells@andromeda ~]$ /tmp/newpag
      	[dhowells@andromeda ~]$ keyctl show
      	Session Keyring
      	       -3 --alswrv   4043  4043  keyring: _ses
      	1055658746 --alswrv   4043  4043   \_ user: a
      	[dhowells@andromeda ~]$ /tmp/newpag hello
      	[dhowells@andromeda ~]$ keyctl show
      	Session Keyring
      	       -3 --alswrv   4043  4043  keyring: hello
      	340417692 --alswrv   4043  4043   \_ user: a
      
      Where the test program creates a new session keyring, sticks a user key named
      'a' into it and then installs it on its parent.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      ee18d64c
  8. 01 9月, 2009 2 次提交
    • P
      sh: Kill off kgdb's magical NMI debouncing. · ade315d8
      Paul Mundt 提交于
      The kgdb stub has traditionally tied in to the NMI slot, and manually
      handled debounce. Now that we have a generic way to do this instead, all
      of the stub-specific debounce silliness can be killed off.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      ade315d8
    • P
      sh: nmi_debug support. · 1e1030dc
      Paul Mundt 提交于
      This implements support for NMI debugging that was shamelessly copied
      from the avr32 port. A bit of special magic is needed in the interrupt
      exception path given that the NMI exception handler is stubbed in to the
      regular exception handling table despite being reported in INTEVT. So we
      mangle the lookup and kick off an EXPEVT-style exception dispatch from
      the INTEVT path for exceptions that do_IRQ() has no chance of handling.
      As a result, we also drop the evt2irq() conversion from the do_IRQ() path
      and just do it in assembly.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      1e1030dc
  9. 31 8月, 2009 1 次提交
  10. 29 8月, 2009 1 次提交
  11. 27 8月, 2009 1 次提交
  12. 25 8月, 2009 1 次提交
    • P
      timekeeping: Fix up read_persistent_clock() breakage on sh · 0ceb4c3e
      Paul Mundt 提交于
      The recent commit "timekeeping: Increase granularity of
      read_persistent_clock()" introduced read_persistent_clock()
      rework which inadvertently broke the sh conversion:
      
      	arch/sh/kernel/time.c:45: error: passing argument 1 of 'rtc_sh_get_time' from incompatible pointer type
      	distcc[13470] ERROR: compile arch/sh/kernel/time.c on sprygo/32 failed
      	make[2]: *** [arch/sh/kernel/time.o] Error 1
      
      This trivial fix gets it working again.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      LKML-Reference: <20090824223239.GB20832@linux-sh.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0ceb4c3e
  13. 24 8月, 2009 16 次提交
  14. 23 8月, 2009 3 次提交
    • M
      sh: drop static UIO clocks for sh7722, sh7723 and sh7724 · cc58f597
      Magnus Damm 提交于
      The Runtime PM patch for UIO driver implements coarse grained
      dynamic power management for UIO devices. With that patch in
      place we can get rid of the static clock configuration. Which
      in turn makes it possible for cpuidle to enter deeper sleep.
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      cc58f597
    • P
      sh: Fix section mismatch in platform bus notifier. · a62926fe
      Paul Mundt 提交于
      The runtime PM for SH-Mobile code had platform_bus_notify() as __devinit,
      which is rather bogus. Kill off the annotation, which subsequently
      silences the section mismatch warnings.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      a62926fe
    • M
      sh: Runtime PM for SuperH Mobile platform bus devices · 6a93dde1
      Magnus Damm 提交于
      This patch is V3 of the SuperH Mobile Runtime PM platform bus
      implentation matching Rafael's Runtime PM v16.
      
      The code gets invoked from the SuperH specific Runtime PM
      platform bus functions that override the weak symbols for:
       - platform_pm_runtime_suspend()
       - platform_pm_runtime_resume()
       - platform_pm_runtime_idle()
      
      This Runtime PM implementation performs two levels of power
      management. At the time of platform bus runtime suspend the
      clock to the device is stopped instantly. Later on if all
      devices within the power domain has their clocks stopped
      then the device driver ->runtime_suspend() callbacks are
      used to save hardware register state for each device.
      
      Device driver ->runtime_suspend() calls are scheduled from
      cpuidle context using platform_pm_runtime_suspend_idle().
      When all devices have been fully suspended the processor
      is allowed to enter deep sleep from cpuidle.
      
      The runtime resume operation turns on clocks and also
      restores registers if needed. It is worth noting that the
      devices start in a suspended state and the device driver
      is responsible for calling runtime resume before accessing
      the actual hardware.
      
      In this particular platform bus implementation runtime
      resume is not allowed from interrupt context. Runtime
      suspend is however allowed from interrupt context as
      long as the synchronous functions are avoided.
      
      [ updated for v17 -- PFM. ]
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      6a93dde1
  15. 22 8月, 2009 3 次提交
  16. 21 8月, 2009 1 次提交