07 Apr, 2012

2 commits

  • Prior to 2.6.19 and as of 2.6.31, pci_enable_msix() can return a
    positive value to indicate the number of vectors (less than the amount
    requested) that can be set up for a given device. Returning this as an
    operation value (secondary result) is fine, but (primary) operation
    results are expected to be negative (error) or zero (success) according
    to the protocol. With the frontend fixed to match the XenoLinux
    behavior, the backend can now validly return zero (success) here,
    passing the upper limit on the number of vectors in op->value.

    Signed-off-by: Jan Beulich
    Signed-off-by: Konrad Rzeszutek Wilk

    Jan Beulich
     
  • commit b9136d207f08
    xen: initialize platform-pci even if xen_emul_unplug=never

    breaks blkfront/netfront by not loading them because of
    xen_platform_pci_unplug=0 and it is never set for PV guest.

    Signed-off-by: Andrew Jones
    Signed-off-by: Igor Mammedov
    Signed-off-by: Konrad Rzeszutek Wilk

    Igor Mammedov
     

24 Mar, 2012

1 commit

  • The functions: "acpi_processor_*" sound like they depend on CONFIG_ACPI_PROCESSOR
    but in reality they are exposed when CONFIG_CPU_FREQ=[y|m]. As such
    update the Kconfig to have this dependency and fix compile issues:

    ERROR: "acpi_processor_unregister_performance" [drivers/xen/xen-acpi-processor.ko] undefined!
    ERROR: "acpi_processor_notify_smm" [drivers/xen/xen-acpi-processor.ko] undefined!
    ERROR: "acpi_processor_register_performance" [drivers/xen/xen-acpi-processor.ko] undefined!
    ERROR: "acpi_processor_preregister_performance" [drivers/xen/xen-acpi-processor.ko] undefined!

    Note: We still need the CONFIG_ACPI
    Reported-by: Randy Dunlap
    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk
     

22 Mar, 2012

2 commits

  • When xen_emul_unplug=never is specified on kernel command line
    reading files from /sys/hypervisor is broken (returns -EBUSY).
    It is caused by xen_bus dependency on platform-pci and
    platform-pci isn't initialized when xen_emul_unplug=never is
    specified.

    Fix it by allowing platform-pci to ignore xen_emul_unplug=never,
    and do not intialize xen_[blk|net]front instead.

    Signed-off-by: Igor Mammedov
    Acked-by: Stefano Stabellini
    Signed-off-by: Konrad Rzeszutek Wilk

    Igor Mammedov
     
  • When booting the kernel under machines that do not have P-states
    we would end up with:

    ------------[ cut here ]------------
    WARNING: at drivers/xen/xen-acpi-processor.c:504
    xen_acpi_processor_init+0x286/0
    x2e0()
    Hardware name: ProLiant BL460c G6
    Modules linked in:
    Pid: 1, comm: swapper Not tainted 2.6.39-200.0.3.el5uek #1
    Call Trace:
    [] ? xen_acpi_processor_init+0x286/0x2e0
    [] warn_slowpath_common+0x90/0xc0
    [] ? check_acpi_ids+0x1e0/0x1e0
    [] warn_slowpath_null+0x1a/0x20
    [] xen_acpi_processor_init+0x286/0x2e0
    [] ? check_acpi_ids+0x1e0/0x1e0
    [] do_one_initcall+0xe8/0x130

    .. snip..

    Which is OK - the machines do not have P-states, so we fail to register
    to process the _PXX states. But there is no need to WARN the user
    of it.

    Oracle BZ# 13871288
    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk
     

21 Mar, 2012

4 commits

  • Use 'bool' for boolean variables. Do proper section placement.
    Eliminate an unnecessary export.

    Signed-off-by: Jan Beulich
    Acked-by: Dan Magenheimer
    Signed-off-by: Konrad Rzeszutek Wilk

    Jan Beulich
     
  • The pirq_eoi_map is a bitmap offered by Xen to check which pirqs need to
    be EOI'd without having to issue an hypercall every time.
    We use PHYSDEVOP_pirq_eoi_gmfn_v2 to map the bitmap, then if we
    succeed we use pirq_eoi_map to check whether pirqs need eoi.

    Changes in v3:

    - explicitly use PHYSDEVOP_pirq_eoi_gmfn_v2 rather than
    PHYSDEVOP_pirq_eoi_gmfn;

    - introduce pirq_check_eoi_map, a function to check if a pirq needs an
    eoi using the map;

    -rename pirq_needs_eoi into pirq_needs_eoi_flag;

    - introduce a function pointer called pirq_needs_eoi that is going to be
    set to the right implementation depending on the availability of
    PHYSDEVOP_pirq_eoi_gmfn_v2.

    Signed-off-by: Stefano Stabellini
    Signed-off-by: Konrad Rzeszutek Wilk

    Stefano Stabellini
     
  • With patch "xen/cpufreq: Disable the cpu frequency scaling drivers
    from loading." we do not have to worry about said drivers loading
    themselves before the xen-acpi-processor driver. Hence we can remove
    the default selection (=y if CPU frequency drivers were built-in, or
    =m if CPU frequency drivers were built as modules), and just
    select =m for the default case.

    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk
     
  • useful for disabling cpufreq altogether. The cpu frequency
    scaling drivers and cpu frequency governors will fail to register.

    Signed-off-by: Konrad Rzeszutek Wilk
    Signed-off-by: Dave Jones

    Konrad Rzeszutek Wilk
     

16 Mar, 2012

1 commit

  • PV-on-HVM guests may want to use the xen keyboard/mouse frontend, but
    they don't use the xen frame buffer frontend. For this case it doesn't
    make much sense for INPUT_XEN_KBDDEV_FRONTEND to depend on
    XEN_FBDEV_FRONTEND. The opposite direction always makes more sense, i.e.
    if you're using xenfb, then you'll want xenkbd. Switch the dependencies.

    Acked-by: Dmitry Torokhov
    Signed-off-by: Andrew Jones
    Signed-off-by: Konrad Rzeszutek Wilk

    Andrew Jones
     

15 Mar, 2012

2 commits

  • This driver solves three problems:
    1). Parse and upload ACPI0007 (or PROCESSOR_TYPE) information to the
    hypervisor - aka P-states (cpufreq data).
    2). Upload the the Cx state information (cpuidle data).
    3). Inhibit CPU frequency scaling drivers from loading.

    The reason for wanting to solve 1) and 2) is such that the Xen hypervisor
    is the only one that knows the CPU usage of different guests and can
    make the proper decision of when to put CPUs and packages in proper states.
    Unfortunately the hypervisor has no support to parse ACPI DSDT tables, hence it
    needs help from the initial domain to provide this information. The reason
    for 3) is that we do not want the initial domain to change P-states while the
    hypervisor is doing it as well - it causes rather some funny cases of P-states
    transitions.

    For this to work, the driver parses the Power Management data and uploads said
    information to the Xen hypervisor. It also calls acpi_processor_notify_smm()
    to inhibit the other CPU frequency scaling drivers from being loaded.

    Everything revolves around the 'struct acpi_processor' structure which
    gets updated during the bootup cycle in different stages. At the startup, when
    the ACPI parser starts, the C-state information is processed (processor_idle)
    and saved in said structure as 'power' element. Later on, the CPU frequency
    scaling driver (powernow-k8 or acpi_cpufreq), would call the the
    acpi_processor_* (processor_perflib functions) to parse P-states information
    and populate in the said structure the 'performance' element.

    Since we do not want the CPU frequency scaling drivers from loading
    we have to call the acpi_processor_* functions to parse the P-states and
    call "acpi_processor_notify_smm" to stop them from loading.

    There is also one oddity in this driver which is that under Xen, the
    physical online CPU count can be different from the virtual online CPU count.
    Meaning that the macros 'for_[online|possible]_cpu' would process only
    up to virtual online CPU count. We on the other hand want to process
    the full amount of physical CPUs. For that, the driver checks if the ACPI IDs
    count is different from the APIC ID count - which can happen if the user
    choose to use dom0_max_vcpu argument. In such a case a backup of the PM
    structure is used and uploaded to the hypervisor.

    [v1-v2: Initial RFC implementations that were posted]
    [v3: Changed the name to passthru suggested by Pasi Kärkkäinen ]
    [v4: Added vCPU != pCPU support - aka dom0_max_vcpus support]
    [v5: Cleaned up the driver, fix bug under Athlon XP]
    [v6: Changed the driver to a CPU frequency governor]
    [v7: Jan Beulich suggestion to make it a cpufreq scaling driver
    made me rework it as driver that inhibits cpufreq scaling driver]
    [v8: Per Jan's review comments, fixed up the driver]
    [v9: Allow to continue even if acpi_processor_preregister_perf.. fails]
    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk
     
  • The functions these get passed to have been taking pointers to const
    since at least 2.6.16.

    Signed-off-by: Jan Beulich
    Signed-off-by: Konrad Rzeszutek Wilk

    Jan Beulich
     

14 Mar, 2012

5 commits

  • Unfortunately xend creates a bogus console/0 frotend/backend entry pair
    on xenstore that console backends cannot properly cope with.
    Any guest behavior that is not completely ignoring console/0 is going
    to either cause problems with xenconsoled or qemu.
    Returning 0 or -ENODEV from xencons_probe is not enough because it is
    going to cause the frontend state to become 4 or 6 respectively.
    The best possible thing we can do here is just ignore the entry from
    xenbus_probe_frontend.

    Signed-off-by: Stefano Stabellini
    Signed-off-by: Konrad Rzeszutek Wilk

    Stefano Stabellini
     
  • Introduce a new config option HVC_XEN_FRONTEND to enable/disable the
    xenbus based pv console frontend.

    Signed-off-by: Stefano Stabellini
    Signed-off-by: Konrad Rzeszutek Wilk

    Stefano Stabellini
     
  • This patch implements support for multiple consoles:
    consoles other than the first one are setup using the traditional xenbus
    and grant-table based mechanism.
    We use a list to keep track of the allocated consoles, we don't
    expect too many of them anyway.

    Changes in v3:

    - call hvc_remove before removing the console from xenconsoles;
    - do not lock xencons_lock twice in the destruction path;
    - use the DEFINE_XENBUS_DRIVER macro.

    Signed-off-by: Stefano Stabellini
    Signed-off-by: Konrad Rzeszutek Wilk

    Stefano Stabellini
     
  • Signed-off-by: Stefano Stabellini
    Signed-off-by: Konrad Rzeszutek Wilk

    Stefano Stabellini
     
  • The individual drivers' remove functions could legitimately attempt to
    access this information (for logging messages if nothing else). Note
    that I did not in fact observe a problem anywhere, but I came across
    this while looking into the reasons for what turned out to need the
    fix at https://lkml.org/lkml/2012/3/5/336 to vsprintf().

    Signed-off-by: Jan Beulich
    Signed-off-by: Konrad Rzeszutek Wilk

    Jan Beulich
     

27 Feb, 2012

1 commit


13 Jan, 2012

2 commits


12 Jan, 2012

3 commits

  • * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci: (80 commits)
    x86/PCI: Expand the x86_msi_ops to have a restore MSIs.
    PCI: Increase resource array mask bit size in pcim_iomap_regions()
    PCI: DEVICE_COUNT_RESOURCE should be equal to PCI_NUM_RESOURCES
    PCI: pci_ids: add device ids for STA2X11 device (aka ConneXT)
    PNP: work around Dell 1536/1546 BIOS MMCONFIG bug that breaks USB
    x86/PCI: amd: factor out MMCONFIG discovery
    PCI: Enable ATS at the device state restore
    PCI: msi: fix imbalanced refcount of msi irq sysfs objects
    PCI: kconfig: English typo in pci/pcie/Kconfig
    PCI/PM/Runtime: make PCI traces quieter
    PCI: remove pci_create_bus()
    xtensa/PCI: convert to pci_scan_root_bus() for correct root bus resources
    x86/PCI: convert to pci_create_root_bus() and pci_scan_root_bus()
    x86/PCI: use pci_scan_bus() instead of pci_scan_bus_parented()
    x86/PCI: read Broadcom CNB20LE host bridge info before PCI scan
    sparc32, leon/PCI: convert to pci_scan_root_bus() for correct root bus resources
    sparc/PCI: convert to pci_create_root_bus()
    sh/PCI: convert to pci_scan_root_bus() for correct root bus resources
    powerpc/PCI: convert to pci_create_root_bus()
    powerpc/PCI: split PHB part out of pcibios_map_io_space()
    ...

    Fix up conflicts in drivers/pci/msi.c and include/linux/pci_regs.h due
    to the same patches being applied in other branches.

    Linus Torvalds
     
  • frv, h8300, m68k, microblaze, openrisc, score, um and xtensa currently
    do not register a CPU device. Add the config option GENERIC_CPU_DEVICES
    which causes a generic CPU device to be registered for each present CPU,
    and make all these architectures select it.

    Richard Weinberger covered UML and suggested using
    per_cpu.

    Signed-off-by: Ben Hutchings
    Signed-off-by: Linus Torvalds

    Ben Hutchings
     
  • cpu_dev_init() is only called from driver_init(), which does not check
    its return value. Therefore make cpu_dev_init() return void.

    We must register the CPU subsystem, so panic if this fails.

    If sched_create_sysfs_power_savings_entries() fails, the damage is
    contained, so ignore this (as before).

    Signed-off-by: Ben Hutchings
    Signed-off-by: Linus Torvalds

    Ben Hutchings
     

11 Jan, 2012

17 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (54 commits)
    crypto: gf128mul - remove leftover "(EXPERIMENTAL)" in Kconfig
    crypto: serpent-sse2 - remove unneeded LRW/XTS #ifdefs
    crypto: serpent-sse2 - select LRW and XTS
    crypto: twofish-x86_64-3way - remove unneeded LRW/XTS #ifdefs
    crypto: twofish-x86_64-3way - select LRW and XTS
    crypto: xts - remove dependency on EXPERIMENTAL
    crypto: lrw - remove dependency on EXPERIMENTAL
    crypto: picoxcell - fix boolean and / or confusion
    crypto: caam - remove DECO access initialization code
    crypto: caam - fix polarity of "propagate error" logic
    crypto: caam - more desc.h cleanups
    crypto: caam - desc.h - convert spaces to tabs
    crypto: talitos - convert talitos_error to struct device
    crypto: talitos - remove NO_IRQ references
    crypto: talitos - fix bad kfree
    crypto: convert drivers/crypto/* to use module_platform_driver()
    char: hw_random: convert drivers/char/hw_random/* to use module_platform_driver()
    crypto: serpent-sse2 - should select CRYPTO_CRYPTD
    crypto: serpent - rename serpent.c to serpent_generic.c
    crypto: serpent - cleanup checkpatch errors and warnings
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://selinuxproject.org/~jmorris/linux-security: (32 commits)
    ima: fix invalid memory reference
    ima: free duplicate measurement memory
    security: update security_file_mmap() docs
    selinux: Casting (void *) value returned by kmalloc is useless
    apparmor: fix module parameter handling
    Security: tomoyo: add .gitignore file
    tomoyo: add missing rcu_dereference()
    apparmor: add missing rcu_dereference()
    evm: prevent racing during tfm allocation
    evm: key must be set once during initialization
    mpi/mpi-mpow: NULL dereference on allocation failure
    digsig: build dependency fix
    KEYS: Give key types their own lockdep class for key->sem
    TPM: fix transmit_cmd error logic
    TPM: NSC and TIS drivers X86 dependency fix
    TPM: Export wait_for_stat for other vendor specific drivers
    TPM: Use vendor specific function for status probe
    tpm_tis: add delay after aborting command
    tpm_tis: Check return code from getting timeouts/durations
    tpm: Introduce function to poll for result of self test
    ...

    Fix up trivial conflict in lib/Makefile due to addition of CONFIG_MPI
    and SIGSIG next to CONFIG_DQL addition.

    Linus Torvalds
     
  • * 'next' of git://git.monstr.eu/linux-2.6-microblaze:
    microblaze: Wire-up new system calls
    microblaze: Remove NO_IRQ from architecture
    input: xilinx_ps2: Don't use NO_IRQ
    block: xsysace: Don't use NO_IRQ
    microblaze: Trivial asm fix
    microblaze: Fix debug message in module
    microblaze: Remove eprintk macro
    microblaze: Send CR before LF for early console
    microblaze: Change NO_IRQ to 0
    microblaze: Use irq_of_parse_and_map for timer
    microblaze: intc: Change variable name
    microblaze: Use of_find_compatible_node for timer and intc
    microblaze: Add __cmpdi2
    microblaze: Synchronize __pa __va macros

    Linus Torvalds
     
  • * 'unicore32' of git://github.com/gxt/linux:
    rtc-puv3: solve section mismatch in rtc-puv3.c
    rtc-puv3: using module_platform_driver()
    i2c-puv3: using module_platform_driver()
    rtc-puv3: irq: remove IRQF_DISABLED
    unicore32: Remove IRQF_DISABLED
    unicore32: Use set_current_blocked()
    unicore32: add ioremap_nocache definition
    unicore32: delete specified xlate_dev_mem_ptr
    of: add include asm/setup.h in drivers/of/fdt.c
    unicore32: standardize /proc/iomem "Kernel code" name

    Linus Torvalds
     
  • Andrew elucidates:
    - First installmeant of MM. We have a HUGE number of MM patches this
    time. It's crazy.
    - MAINTAINERS updates
    - backlight updates
    - leds
    - checkpatch updates
    - misc ELF stuff
    - rtc updates
    - reiserfs
    - procfs
    - some misc other bits

    * akpm: (124 commits)
    user namespace: make signal.c respect user namespaces
    workqueue: make alloc_workqueue() take printf fmt and args for name
    procfs: add hidepid= and gid= mount options
    procfs: parse mount options
    procfs: introduce the /proc//map_files/ directory
    procfs: make proc_get_link to use dentry instead of inode
    signal: add block_sigmask() for adding sigmask to current->blocked
    sparc: make SA_NOMASK a synonym of SA_NODEFER
    reiserfs: don't lock root inode searching
    reiserfs: don't lock journal_init()
    reiserfs: delay reiserfs lock until journal initialization
    reiserfs: delete comments referring to the BKL
    drivers/rtc/interface.c: fix alarm rollover when day or month is out-of-range
    drivers/rtc/rtc-twl.c: add DT support for RTC inside twl4030/twl6030
    drivers/rtc/: remove redundant spi driver bus initialization
    drivers/rtc/rtc-jz4740.c: make jz4740_rtc_driver static
    drivers/rtc/rtc-mc13xxx.c: make mc13xxx_rtc_idtable static
    rtc: convert drivers/rtc/* to use module_platform_driver()
    drivers/rtc/rtc-wm831x.c: convert to devm_kzalloc()
    drivers/rtc/rtc-wm831x.c: remove unused period IRQ handler
    ...

    Linus Torvalds
     
  • Commit f44f7f96a20a ("RTC: Initialize kernel state from RTC") introduced a
    potential infinite loop. If an alarm time contains a wildcard month and
    an invalid day (> 31), or a wildcard year and an invalid month (>= 12),
    the loop searching for the next matching date will never terminate. Treat
    the invalid values as wildcards.

    Fixes ,

    Reported-by: leo weppelman
    Reported-by: "P. van Gaans"
    Signed-off-by: Ben Hutchings
    Signed-off-by: Jonathan Nieder
    Cc: Mark Brown
    Cc: Marcelo Roberto Jimenez
    Cc: Thomas Gleixner
    Cc: John Stultz
    Acked-by: Alessandro Zummo
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Hutchings
     
  • Add the DT support for the TI rtc-twl present in the twl4030 and twl6030
    devices.

    Signed-off-by: Benoit Cousson
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benoit Cousson
     
  • In ancient times it was necessary to manually initialize the bus field of
    an spi_driver to spi_bus_type. These days this is done in
    spi_driver_register(), so we can drop the manual assignment.

    The patch was generated using the following coccinelle semantic patch:
    //
    @@
    identifier _driver;
    @@
    struct spi_driver _driver = {
    .driver = {
    - .bus = &spi_bus_type,
    },
    };
    //

    Signed-off-by: Lars-Peter Clausen
    Cc: John Stultz
    Cc: Alessandro Zummo
    Cc: Grant Likely
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lars-Peter Clausen
     
  • Signed-off-by: Axel Lin
    Cc: Lars-Peter Clausen
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • Signed-off-by: Axel Lin
    Acked-by: Uwe Kleine-König
    Cc: Alessandro Zummo
    Acked-by: Jean-Christophe PLAGNIOL-VILLARD
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • This patch converts the drivers in drivers/rtc/* to use the
    module_platform_driver() macro which makes the code smaller and a bit
    simpler.

    Signed-off-by: Axel Lin
    Acked-by: Mark Brown
    Acked-by: Mike Frysinger
    Acked-by: Guan Xuetao
    Acked-by: Linus Walleij
    Acked-by: Haojian Zhuang
    Cc: Alessandro Zummo
    Cc: Srinidhi Kasagar
    Cc: Lars-Peter Clausen
    Cc: Ben Dooks
    Cc: John Stultz
    Acked-by: Jean-Christophe PLAGNIOL-VILLARD
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • Marginally less code and eliminate the possibility of memory leaks.

    Signed-off-by: Mark Brown
    Acked-by: Jean-Christophe PLAGNIOL-VILLARD
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Brown
     
  • Due to changes in the RTC core the period interrupt is now unused so
    delete the code managing it.

    Signed-off-by: Mark Brown
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Brown
     
  • The rtc_calibration attribute allows user-space to get and set the
    AB8500's RtcCalibration register. The AB8500 will then use the value in
    this register to compensate for RTC drift every 60 seconds.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Mark Godfrey
    Signed-off-by: Linus Walleij
    Acked-by: Jean-Christophe PLAGNIOL-VILLARD
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Godfrey
     
  • The resolution of msleep is related to HZ, so with HZ set to 100 any
    msleep of less than 10ms will become ~10ms. This is not what we want.
    Use the hrtimer-based usleep_range() and allow for some slack in the
    non-critical path so we have more control of what is happening here.

    Signed-off-by: Linus Walleij
    Cc: Jonas Aaberg
    Cc: Alessandro Zummo
    Cc: Jean-Christophe PLAGNIOL-VILLARD
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Walleij
     
  • Set can_wake flag so wakealarm property is visible in sysfs.

    Signed-off-by: Andrew Lynn
    Reviewed-by: Jonas ABERG
    Signed-off-by: Linus Walleij
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Lynn
     
  • We want this driver to be able to wake up the system.

    Signed-off-by: Robert Marklund
    Signed-off-by: Linus Walleij
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert Marklund