Tuesday, April 13, 2010

linux.kernel - 26 new messages in 12 topics - digest

linux.kernel
http://groups.google.com/group/linux.kernel?hl=en

linux.kernel@googlegroups.com

Today's topics:

* kconfig: introduce nonint_oldconfig and loose_nonint_oldconfig - 3 messages,
3 authors
http://groups.google.com/group/linux.kernel/t/ab3ec15e1d89ed39?hl=en
* perf, x86: setup NMI handler for IBS - 9 messages, 1 author
http://groups.google.com/group/linux.kernel/t/3660ac7771798be1?hl=en
* Socket Direct Protocol: help (2) - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/8169ee43dd3f6637?hl=en
* mm: disallow direct reclaim page writeback - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/019901c2ac5d237e?hl=en
* Writing to NAND, Which is not visible to USER - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/9b5c5e9cf8bbb792?hl=en
* USB: rename usb_buffer_alloc() and usb_buffer_free() - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/a96a33ce18e828e9?hl=en
* tun: orphan an skb on tx - 3 messages, 2 authors
http://groups.google.com/group/linux.kernel/t/27f4f72d2c57841a?hl=en
* ARM: hw-breakpoint: add ARM backend for the hw-breakpoint framework - 1
messages, 1 author
http://groups.google.com/group/linux.kernel/t/5f0feabf4ce1004a?hl=en
* procfs: Kill the bkl in ioctl - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/42d53c90f983ce30?hl=en
* MTD: Move reboot notifier from UBI to cfi_cmdset_0002 - 3 messages, 1 author
http://groups.google.com/group/linux.kernel/t/b18bb137ab6e62c3?hl=en
* [PATCH 1/1] sched: defer idle accounting till after load update period - 1
messages, 1 author
http://groups.google.com/group/linux.kernel/t/01c679fd5d1021e5?hl=en
* cxgb4i: main driver files - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/ba0a980379ed592d?hl=en

==============================================================================
TOPIC: kconfig: introduce nonint_oldconfig and loose_nonint_oldconfig
http://groups.google.com/group/linux.kernel/t/ab3ec15e1d89ed39?hl=en
==============================================================================

== 1 of 3 ==
Date: Tues, Apr 13 2010 1:30 pm
From: Randy Dunlap


On 04/13/10 13:18, Aristeu Rozanski wrote:
>>> This patch has been around for a long time in Fedora and Red Hat Enterprise
>>> Linux kernels and it may be useful for others. The nonint_oldconfig target
>>> will fail and print the unset config options while loose_nonint_oldconfig will
>>> simply let the config option unset. They're useful in distro kernel packages
>>> where the config files are built using a combination of smaller config files.
>>> The patch's author AFAIK is Arjan van de Ven. Arjan, please add a Signed-off-by
>>> if you're the original author.
>>
>> Roland McGrath added the loose parts according to his email of 2008.Mar.05:
>> "I added this one (loose_nonint_oldconfig target, -B option to conf)."
> hm, I can't see the -B there, maybe the functionality he's referring to is
> the def_no?

+loose_nonint_oldconfig: $(obj)/conf
+ $< -B $(Kconfig)

...

+ case 'B':
+ input_mode = dont_ask_dont_tell;
+ break;


>> after Dave Jones posted this patch.
>>
>> (adding linux-kbuild mailing list & kbuild maintainer)
>>
>> Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
>>
>>
>>
>>> Signed-off-by: Aristeu Rozanski <aris@redhat.com>
>>
>>
>>> @@ -613,5 +641,5 @@ int main(int ac, char **av)
>>> exit(1);
>>> }
>>> }
>>> - return 0;
>>> + return return_value;
>>> }
>>
>> Having 'make oldconfig' exit with Exit status: 139 (for example)
>> can be confusing. I know that from experience. It took me a bit
>> to find out what that meant. That part could be improved...
> ok, no real reason to keep incrementing that. no different error codes exist
> other than "1". Do you think we need to introduce different return codes?
>

I would prefer a fixed value, like 86. or 11. or a useful printf text message.

--
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


== 2 of 3 ==
Date: Tues, Apr 13 2010 1:50 pm
From: Arjan van de Ven


On 4/13/2010 12:47, Aristeu Rozanski wrote:
> This patch has been around for a long time in Fedora and Red Hat Enterprise
> Linux kernels and it may be useful for others. The nonint_oldconfig target
> will fail and print the unset config options while loose_nonint_oldconfig will
> simply let the config option unset. They're useful in distro kernel packages
> where the config files are built using a combination of smaller config files.
> The patch's author AFAIK is Arjan van de Ven. Arjan, please add a Signed-off-by
> if you're the original author.
>
> Signed-off-by: Aristeu Rozanski<aris@redhat.com>


this gets funny with employers chaning etc ;)


Signed-off-by: Arjan van de Ven <arjan@redhat.com> [defunct email]
Acked-by: Arjan van de Ven <arjan@linux.intel.com>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


== 3 of 3 ==
Date: Tues, Apr 13 2010 1:50 pm
From: Aristeu Rozanski


> >>> This patch has been around for a long time in Fedora and Red Hat Enterprise
> >>> Linux kernels and it may be useful for others. The nonint_oldconfig target
> >>> will fail and print the unset config options while loose_nonint_oldconfig will
> >>> simply let the config option unset. They're useful in distro kernel packages
> >>> where the config files are built using a combination of smaller config files.
> >>> The patch's author AFAIK is Arjan van de Ven. Arjan, please add a Signed-off-by
> >>> if you're the original author.
> >>
> >> Roland McGrath added the loose parts according to his email of 2008.Mar.05:
> >> "I added this one (loose_nonint_oldconfig target, -B option to conf)."
> > hm, I can't see the -B there, maybe the functionality he's referring to is
> > the def_no?
>
> +loose_nonint_oldconfig: $(obj)/conf
> + $< -B $(Kconfig)
>
> ...
>
> + case 'B':
> + input_mode = dont_ask_dont_tell;
> + break;
ah, duh, you mean he's the author of loose_nonint_oldconfig. I somewhat thought
you said the loose_nonint_oldconfig functionality was already in :)

> >> after Dave Jones posted this patch.
> >>
> >> (adding linux-kbuild mailing list & kbuild maintainer)
> >>
> >> Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
> >>
> >>
> >>
> >>> Signed-off-by: Aristeu Rozanski <aris@redhat.com>
> >>
> >>
> >>> @@ -613,5 +641,5 @@ int main(int ac, char **av)
> >>> exit(1);
> >>> }
> >>> }
> >>> - return 0;
> >>> + return return_value;
> >>> }
> >>
> >> Having 'make oldconfig' exit with Exit status: 139 (for example)
> >> can be confusing. I know that from experience. It took me a bit
> >> to find out what that meant. That part could be improved...
> > ok, no real reason to keep incrementing that. no different error codes exist
> > other than "1". Do you think we need to introduce different return codes?
> >
>
> I would prefer a fixed value, like 86. or 11. or a useful printf text message.
ok, will refresh and resend

--
Aristeu

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

==============================================================================
TOPIC: perf, x86: setup NMI handler for IBS
http://groups.google.com/group/linux.kernel/t/3660ac7771798be1?hl=en
==============================================================================

== 1 of 9 ==
Date: Tues, Apr 13 2010 1:30 pm
From: Robert Richter


This implements the perf nmi handler for ibs interrupts. The code was
copied from oprofile and should be merged somewhen.

Signed-off-by: Robert Richter <robert.richter@amd.com>
---
arch/x86/kernel/cpu/perf_event.c | 10 ++++
arch/x86/kernel/cpu/perf_event_amd.c | 87 ++++++++++++++++++++++++++++++++++
2 files changed, 97 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index a42d033..8f9674f 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -383,12 +383,15 @@ static void release_pmc_hardware(void) {}

static int reserve_ds_buffers(void);
static void release_ds_buffers(void);
+static int reserve_ibs_hardware(void);
+static void release_ibs_hardware(void);

static void hw_perf_event_destroy(struct perf_event *event)
{
if (atomic_dec_and_mutex_lock(&active_events, &pmc_reserve_mutex)) {
release_pmc_hardware();
release_ds_buffers();
+ release_ibs_hardware();
mutex_unlock(&pmc_reserve_mutex);
}
}
@@ -537,6 +540,13 @@ static int __hw_perf_event_init(struct perf_event *event)
if (err)
release_pmc_hardware();
}
+ if (!err) {
+ err = reserve_ibs_hardware();
+ if (err) {
+ release_ds_buffers();
+ release_pmc_hardware();
+ }
+ }
}
if (!err)
atomic_inc(&active_events);
diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/kernel/cpu/perf_event_amd.c
index 246304d..27daead 100644
--- a/arch/x86/kernel/cpu/perf_event_amd.c
+++ b/arch/x86/kernel/cpu/perf_event_amd.c
@@ -1,5 +1,7 @@
#ifdef CONFIG_CPU_SUP_AMD

+#include <linux/pci.h>
+
static DEFINE_RAW_SPINLOCK(amd_nb_lock);

static __initconst const u64 amd_hw_cache_event_ids
@@ -106,6 +108,91 @@ static const u64 amd_perfmon_event_map[] =
[PERF_COUNT_HW_BRANCH_MISSES] = 0x00c5,
};

+#ifdef CONFIG_X86_LOCAL_APIC
+
+/* IBS - apic initialization, taken from oprofile, should be unified */
+
+static u8 ibs_eilvt_off;
+
+static inline void apic_init_ibs_nmi_per_cpu(void *arg)
+{
+ ibs_eilvt_off = setup_APIC_eilvt_ibs(0, APIC_EILVT_MSG_NMI, 0);
+}
+
+static inline void apic_clear_ibs_nmi_per_cpu(void *arg)
+{
+ setup_APIC_eilvt_ibs(0, APIC_EILVT_MSG_FIX, 1);
+}
+
+static int init_ibs_nmi(void)
+{
+#define IBSCTL_LVTOFFSETVAL (1 << 8)
+#define IBSCTL 0x1cc
+ struct pci_dev *cpu_cfg;
+ int nodes;
+ u32 value = 0;
+
+ /* per CPU setup */
+ on_each_cpu(apic_init_ibs_nmi_per_cpu, NULL, 1);
+
+ nodes = 0;
+ cpu_cfg = NULL;
+ do {
+ cpu_cfg = pci_get_device(PCI_VENDOR_ID_AMD,
+ PCI_DEVICE_ID_AMD_10H_NB_MISC,
+ cpu_cfg);
+ if (!cpu_cfg)
+ break;
+ ++nodes;
+ pci_write_config_dword(cpu_cfg, IBSCTL, ibs_eilvt_off
+ | IBSCTL_LVTOFFSETVAL);
+ pci_read_config_dword(cpu_cfg, IBSCTL, &value);
+ if (value != (ibs_eilvt_off | IBSCTL_LVTOFFSETVAL)) {
+ pci_dev_put(cpu_cfg);
+ printk(KERN_DEBUG "Failed to setup IBS LVT offset, "
+ "IBSCTL = 0x%08x", value);
+ return 1;
+ }
+ } while (1);
+
+ if (!nodes) {
+ printk(KERN_DEBUG "No CPU node configured for IBS");
+ return 1;
+ }
+
+ return 0;
+}
+
+/* uninitialize the APIC for the IBS interrupts if needed */
+static void clear_ibs_nmi(void)
+{
+ on_each_cpu(apic_clear_ibs_nmi_per_cpu, NULL, 1);
+}
+
+#else
+
+static inline int init_ibs_nmi(void) { return 1; }
+static inline void clear_ibs_nmi(void) { }
+
+

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate