* Re: [PATCH mm-unstable v17 11/14] mm/khugepaged: Introduce mTHP collapse support
From: Vernon Yang @ 2026-05-21 2:36 UTC (permalink / raw)
To: Nico Pache
Cc: linux-doc, linux-kernel, linux-mm, linux-trace-kernel, aarcange,
akpm, anshuman.khandual, apopple, baohua, baolin.wang, byungchul,
catalin.marinas, cl, corbet, dave.hansen, david, dev.jain, gourry,
hannes, hughd, jack, jackmanb, jannh, jglisse, joshua.hahnjy, kas,
lance.yang, liam, ljs, mathieu.desnoyers, matthew.brost, mhiramat,
mhocko, peterx, pfalcato, rakie.kim, raquini, rdunlap,
richard.weiyang, rientjes, rostedt, rppt, ryan.roberts, shivankg,
sunnanyong, surenb, thomas.hellstrom, tiwai, usamaarif642, vbabka,
vishal.moola, wangkefeng.wang, will, willy, yang, ying.huang, ziy,
zokeefe
In-Reply-To: <20260511185817.686831-12-npache@redhat.com>
On Mon, May 11, 2026 at 12:58:11PM -0600, Nico Pache wrote:
> Enable khugepaged to collapse to mTHP orders. This patch implements the
> main scanning logic using a bitmap to track occupied pages and a stack
> structure that allows us to find optimal collapse sizes.
>
> Previous to this patch, PMD collapse had 3 main phases, a light weight
> scanning phase (mmap_read_lock) that determines a potential PMD
> collapse, an alloc phase (mmap unlocked), then finally heavier collapse
> phase (mmap_write_lock).
>
> To enabled mTHP collapse we make the following changes:
>
> During PMD scan phase, track occupied pages in a bitmap. When mTHP
> orders are enabled, we remove the restriction of max_ptes_none during the
> scan phase to avoid missing potential mTHP collapse candidates. Once we
> have scanned the full PMD range and updated the bitmap to track occupied
> pages, we use the bitmap to find the optimal mTHP size.
>
> Implement collapse_scan_bitmap() to perform binary recursion on the bitmap
> and determine the best eligible order for the collapse. A stack structure
> is used instead of traditional recursion to manage the search. This also
> prevents a traditional recursive approach when the kernel stack struct is
> limited. The algorithm recursively splits the bitmap into smaller chunks to
> find the highest order mTHPs that satisfy the collapse criteria. We start
> by attempting the PMD order, then moved on the consecutively lower orders
> (mTHP collapse). The stack maintains a pair of variables (offset, order),
> indicating the number of PTEs from the start of the PMD, and the order of
> the potential collapse candidate.
>
> The algorithm for consuming the bitmap works as such:
> 1) push (0, HPAGE_PMD_ORDER) onto the stack
> 2) pop the stack
> 3) check if the number of set bits in that (offset,order) pair
> statisfy the max_ptes_none threshold for that order
> 4) if yes, attempt collapse
> 5) if no (or collapse fails), push two new stack items representing
> the left and right halves of the current bitmap range, at the
> next lower order
> 6) repeat at step (2) until stack is empty.
>
> Below is a diagram representing the algorithm and stack items:
>
> offset mid_offset
> | |
> | |
> v v
> ____________________________________
> | PTE Page Table |
> --------------------------------------
> <-------><------->
> order-1 order-1
>
> mTHP collapses reject regions containing swapped out or shared pages.
> This is because adding new entries can lead to new none pages, and these
> may lead to constant promotion into a higher order mTHP. A similar
> issue can occur with "max_ptes_none > HPAGE_PMD_NR/2" due to a collapse
> introducing at least 2x the number of pages, and on a future scan will
> satisfy the promotion condition once again. This issue is prevented via
> the collapse_max_ptes_none() function which imposes the max_ptes_none
> restrictions above.
>
> We currently only support mTHP collapse for max_ptes_none values of 0
> and HPAGE_PMD_NR - 1. resulting in the following behavior:
>
> - max_ptes_none=0: Never introduce new empty pages during collapse
> - max_ptes_none=HPAGE_PMD_NR-1: Always try collapse to the highest
> available mTHP order
>
> Any other max_ptes_none value will emit a warning and skip mTHP collapse
> attempts. There should be no behavior change for PMD collapse.
>
> Once we determine what mTHP sizes fits best in that PMD range a collapse
> is attempted. A minimum collapse order of 2 is used as this is the lowest
> order supported by anon memory as defined by THP_ORDERS_ALL_ANON.
>
> Currently madv_collapse is not supported and will only attempt PMD
> collapse.
>
> We can also remove the check for is_khugepaged inside the PMD scan as
> the collapse_max_ptes_none() function handles this logic now.
>
> Signed-off-by: Nico Pache <npache@redhat.com>
> ---
> mm/khugepaged.c | 182 +++++++++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 174 insertions(+), 8 deletions(-)
>
> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> index 3492b135d667..39bf7ea8a6e8 100644
> --- a/mm/khugepaged.c
> +++ b/mm/khugepaged.c
> @@ -100,6 +100,30 @@ static DEFINE_READ_MOSTLY_HASHTABLE(mm_slots_hash, MM_SLOTS_HASH_BITS);
>
> static struct kmem_cache *mm_slot_cache __ro_after_init;
>
> +#define KHUGEPAGED_MIN_MTHP_ORDER 2
> +/*
> + * mthp_collapse() does an iterative DFS over a binary tree, from
> + * HPAGE_PMD_ORDER down to KHUGEPAGED_MIN_MTHP_ORDER. The max stack
> + * size needed for a DFS on a binary tree is height + 1, where
> + * height = HPAGE_PMD_ORDER - KHUGEPAGED_MIN_MTHP_ORDER.
> + *
> + * ilog2 is used in place of HPAGE_PMD_ORDER because some architectures
> + * (e.g. ppc64le) do not define HPAGE_PMD_ORDER until after build time.
> + */
> +#define MTHP_STACK_SIZE (ilog2(MAX_PTRS_PER_PTE) - KHUGEPAGED_MIN_MTHP_ORDER + 1)
> +
> +/*
> + * Defines a range of PTE entries in a PTE page table which are being
> + * considered for mTHP collapse.
> + *
> + * @offset: the offset of the first PTE entry in a PMD range.
> + * @order: the order of the PTE entries being considered for collapse.
> + */
> +struct mthp_range {
> + u16 offset;
> + u8 order;
> +};
> +
> struct collapse_control {
> bool is_khugepaged;
>
> @@ -111,6 +135,12 @@ struct collapse_control {
>
> /* nodemask for allocation fallback */
> nodemask_t alloc_nmask;
> +
> + /* Each bit represents a single occupied (!none/zero) page. */
> + DECLARE_BITMAP(mthp_bitmap, MAX_PTRS_PER_PTE);
> + /* A mask of the current range being considered for mTHP collapse. */
> + DECLARE_BITMAP(mthp_bitmap_mask, MAX_PTRS_PER_PTE);
> + struct mthp_range mthp_bitmap_stack[MTHP_STACK_SIZE];
> };
>
> /**
> @@ -1404,20 +1434,140 @@ static enum scan_result collapse_huge_page(struct mm_struct *mm, unsigned long s
> return result;
> }
>
> +static void collapse_mthp_stack_push(struct collapse_control *cc, int *stack_size,
> + u16 offset, u8 order)
> +{
> + const int size = *stack_size;
> + struct mthp_range *stack = &cc->mthp_bitmap_stack[size];
> +
> + VM_WARN_ON_ONCE(size >= MTHP_STACK_SIZE);
> + stack->order = order;
> + stack->offset = offset;
> + (*stack_size)++;
> +}
> +
> +static struct mthp_range collapse_mthp_stack_pop(struct collapse_control *cc,
> + int *stack_size)
> +{
> + const int size = *stack_size;
> +
> + VM_WARN_ON_ONCE(size <= 0);
> + (*stack_size)--;
> + return cc->mthp_bitmap_stack[size - 1];
> +}
> +
> +static unsigned int collapse_mthp_count_present(struct collapse_control *cc,
> + u16 offset, unsigned int nr_ptes)
> +{
> + bitmap_zero(cc->mthp_bitmap_mask, MAX_PTRS_PER_PTE);
> + bitmap_set(cc->mthp_bitmap_mask, offset, nr_ptes);
> + return bitmap_weight_and(cc->mthp_bitmap, cc->mthp_bitmap_mask, MAX_PTRS_PER_PTE);
> +}
> +
> +/*
> + * mthp_collapse() consumes the bitmap that is generated during
> + * collapse_scan_pmd() to determine what regions and mTHP orders fit best.
> + *
> + * Each bit in cc->mthp_bitmap represents a single occupied (!none/zero) page.
> + * A stack structure cc->mthp_bitmap_stack is used to check different regions
> + * of the bitmap for collapse eligibility. The stack maintains a pair of
> + * variables (offset, order), indicating the number of PTEs from the start of
> + * the PMD, and the order of the potential collapse candidate respectively. We
> + * start at the PMD order and check if it is eligible for collapse; if not, we
> + * add two entries to the stack at a lower order to represent the left and right
> + * halves of the PTE page table we are examining.
> + *
> + * offset mid_offset
> + * | |
> + * | |
> + * v v
> + * --------------------------------------
> + * | cc->mthp_bitmap |
> + * --------------------------------------
> + * <-------><------->
> + * order-1 order-1
> + *
> + * For each of these, we determine how many PTE entries are occupied in the
> + * range of PTE entries we propose to collapse, then we compare this to a
> + * threshold number of PTE entries which would need to be occupied for a
> + * collapse to be permitted at that order (accounting for max_ptes_none).
> + *
> + * If a collapse is permitted, we attempt to collapse the PTE range into a
> + * mTHP.
> + */
> +static int mthp_collapse(struct mm_struct *mm, unsigned long address,
> + int referenced, int unmapped, struct collapse_control *cc,
> + unsigned long enabled_orders)
> +{
> + unsigned int nr_occupied_ptes, nr_ptes;
> + int max_ptes_none, collapsed = 0, stack_size = 0;
> + unsigned long collapse_address;
> + struct mthp_range range;
> + u16 offset;
> + u8 order;
> +
> + collapse_mthp_stack_push(cc, &stack_size, 0, HPAGE_PMD_ORDER);
> +
> + while (stack_size) {
> + range = collapse_mthp_stack_pop(cc, &stack_size);
> + order = range.order;
> + offset = range.offset;
> + nr_ptes = 1UL << order;
> +
> + if (!test_bit(order, &enabled_orders))
> + goto next_order;
> +
> + max_ptes_none = collapse_max_ptes_none(cc, NULL, order);
> +
> + if (max_ptes_none < 0)
> + return collapsed;
> +
> + nr_occupied_ptes = collapse_mthp_count_present(cc, offset,
> + nr_ptes);
> +
> + if (nr_occupied_ptes >= nr_ptes - max_ptes_none) {
> + int ret;
> +
> + collapse_address = address + offset * PAGE_SIZE;
> + ret = collapse_huge_page(mm, collapse_address, referenced,
> + unmapped, cc, order);
> + if (ret == SCAN_SUCCEED) {
> + collapsed += nr_ptes;
> + continue;
> + }
> + }
> +
> +next_order:
> + if (order > KHUGEPAGED_MIN_MTHP_ORDER) {
Hi Nico, thank you very much for your contributions to this series.
I found a minor issue, for MADV_COLLAPSE, if collapse_huge_page() fails
for some reason (e.g. allocate folio), it goes to next_order and
continues splitting to the next small order. However, enabled_orders
only supports HPAGE_PMD_ORDER, so it keeps runing the split operations
without any effective work until KHUGEPAGED_MIN_MTHP_ORDER is reached
before exiting. For khugepaged, e.g. setting only 2MB to always, also
same phenomenon.
This does not affect the overall functionality of mthp collapse, just
redundant.
The redundant operations can be easily skipped with the following
modification. If I miss some thing, please let me know. Thanks!
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 1a25af3d6d0f..fa407cce525c 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -1574,7 +1574,7 @@ static int mthp_collapse(struct mm_struct *mm, unsigned long address,
}
next_order:
- if (order > KHUGEPAGED_MIN_MTHP_ORDER) {
+ if ((BIT(order) - 1) & enabled_orders) {
const u8 next_order = order - 1;
const u16 mid_offset = offset + (nr_ptes / 2);
--
Cheers,
Vernon
> + const u8 next_order = order - 1;
> + const u16 mid_offset = offset + (nr_ptes / 2);
> +
> + collapse_mthp_stack_push(cc, &stack_size, mid_offset,
> + next_order);
> + collapse_mthp_stack_push(cc, &stack_size, offset,
> + next_order);
> + }
> + }
> + return collapsed;
> +}
> +
> static enum scan_result collapse_scan_pmd(struct mm_struct *mm,
> struct vm_area_struct *vma, unsigned long start_addr,
> bool *lock_dropped, struct collapse_control *cc)
> {
> - const int max_ptes_none = collapse_max_ptes_none(cc, vma, HPAGE_PMD_ORDER);
> + int max_ptes_none = collapse_max_ptes_none(cc, vma, HPAGE_PMD_ORDER);
> const unsigned int max_ptes_shared = collapse_max_ptes_shared(cc, HPAGE_PMD_ORDER);
> const unsigned int max_ptes_swap = collapse_max_ptes_swap(cc, HPAGE_PMD_ORDER);
> + enum tva_type tva_flags = cc->is_khugepaged ? TVA_KHUGEPAGED : TVA_FORCED_COLLAPSE;
> pmd_t *pmd;
> - pte_t *pte, *_pte;
> - int none_or_zero = 0, shared = 0, referenced = 0;
> + pte_t *pte, *_pte, pteval;
> + int i;
> + int none_or_zero = 0, shared = 0, nr_collapsed = 0, referenced = 0;
> enum scan_result result = SCAN_FAIL;
> struct page *page = NULL;
> struct folio *folio = NULL;
> unsigned long addr;
> + unsigned long enabled_orders;
> spinlock_t *ptl;
> int node = NUMA_NO_NODE, unmapped = 0;
>
> @@ -1429,8 +1579,19 @@ static enum scan_result collapse_scan_pmd(struct mm_struct *mm,
> goto out;
> }
>
> + bitmap_zero(cc->mthp_bitmap, MAX_PTRS_PER_PTE);
> memset(cc->node_load, 0, sizeof(cc->node_load));
> nodes_clear(cc->alloc_nmask);
> +
> + enabled_orders = collapse_allowable_orders(vma, vma->vm_flags, tva_flags);
> +
> + /*
> + * If PMD is the only enabled order, enforce max_ptes_none, otherwise
> + * scan all pages to populate the bitmap for mTHP collapse.
> + */
> + if (enabled_orders != BIT(HPAGE_PMD_ORDER))
> + max_ptes_none = KHUGEPAGED_MAX_PTES_LIMIT;
> +
> pte = pte_offset_map_lock(mm, pmd, start_addr, &ptl);
> if (!pte) {
> cc->progress++;
> @@ -1438,11 +1599,13 @@ static enum scan_result collapse_scan_pmd(struct mm_struct *mm,
> goto out;
> }
>
> - for (addr = start_addr, _pte = pte; _pte < pte + HPAGE_PMD_NR;
> - _pte++, addr += PAGE_SIZE) {
> + for (i = 0; i < HPAGE_PMD_NR; i++) {
> + _pte = pte + i;
> + addr = start_addr + i * PAGE_SIZE;
> + pteval = ptep_get(_pte);
> +
> cc->progress++;
>
> - pte_t pteval = ptep_get(_pte);
> if (pte_none_or_zero(pteval)) {
> if (++none_or_zero > max_ptes_none) {
> result = SCAN_EXCEED_NONE_PTE;
> @@ -1522,6 +1685,8 @@ static enum scan_result collapse_scan_pmd(struct mm_struct *mm,
> }
> }
>
> + /* Set bit for occupied pages */
> + __set_bit(i, cc->mthp_bitmap);
> /*
> * Record which node the original page is from and save this
> * information to cc->node_load[].
> @@ -1580,10 +1745,11 @@ static enum scan_result collapse_scan_pmd(struct mm_struct *mm,
> if (result == SCAN_SUCCEED) {
> /* collapse_huge_page expects the lock to be dropped before calling */
> mmap_read_unlock(mm);
> - result = collapse_huge_page(mm, start_addr, referenced,
> - unmapped, cc, HPAGE_PMD_ORDER);
> + nr_collapsed = mthp_collapse(mm, start_addr, referenced, unmapped,
> + cc, enabled_orders);
> /* collapse_huge_page will return with the mmap_lock released */
> *lock_dropped = true;
> + result = nr_collapsed ? SCAN_SUCCEED : SCAN_FAIL;
> }
> out:
> trace_mm_khugepaged_scan_pmd(mm, folio, referenced,
> --
> 2.54.0
>
>
^ permalink raw reply related
* Re: [PATCH v8 0/8] KVM: x86: nSVM: Improve PAT virtualization
From: Yosry Ahmed @ 2026-05-21 2:36 UTC (permalink / raw)
To: Sean Christopherson
Cc: Paolo Bonzini, Jonathan Corbet, Shuah Khan, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
kvm, linux-doc, linux-kernel, Jim Mattson
In-Reply-To: <ag4ZwD53B7a0ivgT@google.com>
On Wed, May 20, 2026 at 08:30:31PM +0000, Yosry Ahmed wrote:
> On Mon, May 18, 2026 at 05:41:06PM -0700, Sean Christopherson wrote:
> > On Tue, 07 Apr 2026 12:03:23 -0700, Jim Mattson wrote:
> > > Currently, KVM's implementation of nested SVM treats the PAT MSR the same
> > > way whether or not nested NPT is enabled: L1 and L2 share a single
> > > PAT. However, the AMD APM specifies that when nested NPT is enabled, the host
> > > (L1) and the guest (L2) should have independent PATs: hPAT for L1 and gPAT
> > > for L2.
> > >
> > > This patch series implements independent PATs for L1 and L2 when nested NPT
> > > is enabled, but only when a new quirk, KVM_X86_QUIRK_NESTED_SVM_SHARED_PAT,
> > > is disabled. By default, the quirk is enabled, preserving KVM's legacy
> > > behavior. When the quirk is disabled, KVM correctly virtualizes a separate
> > > PAT register for L2, using the g_pat field in the VMCB.
> > >
> > > [...]
> >
> > Applied to kvm-x86 svm. Yosry and/or Jim, please double check the result, the
> > goof with patch 5 was slightly more annoying than I was expecting.
>
> The result looks good to me. I also ran the selftest from v7 and it
> passes. I couldn't help myself from reworking it and cleaning it up, I
> will send a patch your way soon.
As promised, if you want something you can directly run against the
current kvm-x86 svm:
https://lore.kernel.org/kvm/20260521023448.3826878-1-yosry@kernel.org/
^ permalink raw reply
* [PATCH v2] kconfig: add optional warnings for changed input values
From: Pengpeng Hou @ 2026-05-21 2:28 UTC (permalink / raw)
To: Nathan Chancellor, Nicolas Schier, Masahiro Yamada
Cc: Jonathan Corbet, Shuah Khan, linux-kbuild, linux-doc,
linux-kernel, Pengpeng Hou
When reading .config input, Kconfig stores user-provided values first and
then resolves the final value after applying dependencies, ranges, and
other constraints.
If the final value differs from the user's input, Kconfig already tracks
that state internally, but it does not provide any focused diagnostic to
show which explicit inputs were adjusted. This is particularly confusing
for requested values that get forced down by unmet dependencies or
clamped by ranges.
Add an opt-in diagnostic controlled by KCONFIG_WARN_CHANGED_INPUT. Emit
the warnings from conf_write() and conf_write_defconfig() after value
resolution and through the existing message callback path so the default
behavior stays unchanged and interactive frontends remain usable.
Avoid the conf_message() formatting buffer for this diagnostic so long
warning lists are not truncated before reaching the callback, and mark
processed symbols as written before the SYMBOL_WRITE check so duplicate
menu nodes cannot emit duplicate warnings.
Document the new environment variable and add tests for both olddefconfig
and savedefconfig.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
Changes since v1: https://lore.kernel.org/all/20260406233001.1-kconfig-warn-changed-input-pengpeng@iscas.ac.cn/
- rename "found" to "changed_input_found" as suggested by Nicolas
- avoid the conf_message() 4096-byte formatting buffer so long warning
lists are not truncated before the callback sees them
- mark each processed symbol as SYMBOL_WRITTEN before checking
SYMBOL_WRITE to avoid duplicate warnings for duplicate menu nodes
- add duplicate-definition selftest coverage
- do not carry the Reviewed-by/Tested-by tags because v2 changes warning
emission and duplicate suppression
Documentation/kbuild/kconfig.rst | 5 +
scripts/kconfig/confdata.c | 107 +++++++++++++++++-
.../kconfig/tests/warn_changed_input/Kconfig | 40 +++++++
.../tests/warn_changed_input/__init__.py | 27 +++++
.../kconfig/tests/warn_changed_input/config | 3 +
.../tests/warn_changed_input/expected_config | 6 +
.../warn_changed_input/expected_defconfig | 1 +
.../tests/warn_changed_input/expected_stdout | 4 +
8 files changed, 189 insertions(+), 4 deletions(-)
create mode 100644 scripts/kconfig/tests/warn_changed_input/Kconfig
create mode 100644 scripts/kconfig/tests/warn_changed_input/__init__.py
create mode 100644 scripts/kconfig/tests/warn_changed_input/config
create mode 100644 scripts/kconfig/tests/warn_changed_input/expected_config
create mode 100644 scripts/kconfig/tests/warn_changed_input/expected_defconfig
create mode 100644 scripts/kconfig/tests/warn_changed_input/expected_stdout
diff --git a/Documentation/kbuild/kconfig.rst b/Documentation/kbuild/kconfig.rst
index d213c4f599a4..e35dd1d5f9d3 100644
--- a/Documentation/kbuild/kconfig.rst
+++ b/Documentation/kbuild/kconfig.rst
@@ -59,6 +59,11 @@ Environment variables for ``*config``:
This environment variable makes Kconfig warn about all unrecognized
symbols in the config input.
+``KCONFIG_WARN_CHANGED_INPUT``
+ If set to a non-blank value, Kconfig prints optional warnings for
+ user-provided values that change after Kconfig resolves dependencies
+ or applies other constraints such as ranges.
+
``KCONFIG_WERROR``
If set, Kconfig treats warnings as errors.
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 9599a0408862..1fe6d3644e79 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -206,6 +206,79 @@ static void conf_message(const char *fmt, ...)
va_end(ap);
}
+static void conf_message_raw(const char *s)
+{
+ if (conf_message_callback)
+ conf_message_callback(s);
+}
+
+static bool conf_warn_changed_input_enabled(void)
+{
+ const char *env = getenv("KCONFIG_WARN_CHANGED_INPUT");
+
+ return env && *env;
+}
+
+static const char *sym_get_user_value_string(struct symbol *sym)
+{
+ switch (sym->type) {
+ case S_BOOLEAN:
+ case S_TRISTATE:
+ switch (sym->def[S_DEF_USER].tri) {
+ case yes:
+ return "y";
+ case mod:
+ return "m";
+ default:
+ return "n";
+ }
+ default:
+ return sym->def[S_DEF_USER].val ?: "";
+ }
+}
+
+static bool sym_user_value_changed(struct symbol *sym)
+{
+ if (!sym_has_value(sym) || sym->type == S_UNKNOWN)
+ return false;
+
+ switch (sym->type) {
+ case S_BOOLEAN:
+ case S_TRISTATE:
+ return sym->def[S_DEF_USER].tri != sym_get_tristate_value(sym);
+ default:
+ return strcmp(sym_get_user_value_string(sym),
+ sym_get_string_value(sym));
+ }
+}
+
+static void conf_clear_written_flags(void)
+{
+ struct symbol *sym;
+
+ for_all_symbols(sym)
+ sym->flags &= ~SYMBOL_WRITTEN;
+}
+
+static void conf_append_changed_input_warning(struct gstr *gs,
+ struct symbol *sym,
+ bool *changed_input_found)
+{
+ if (!sym_user_value_changed(sym))
+ return;
+
+ if (!*changed_input_found) {
+ str_printf(gs,
+ "warning: user-provided values changed by Kconfig:\n");
+ *changed_input_found = true;
+ }
+
+ str_printf(gs, " %s%s: %s -> %s\n",
+ CONFIG_, sym->name,
+ sym_get_user_value_string(sym),
+ sym_get_string_value(sym));
+}
+
const char *conf_get_configname(void)
{
char *name = getenv("KCONFIG_CONFIG");
@@ -759,11 +832,15 @@ int conf_write_defconfig(const char *filename)
{
struct symbol *sym;
struct menu *menu;
+ struct gstr gs;
FILE *out;
+ bool warn_changed_input = conf_warn_changed_input_enabled();
+ bool changed_input_found = false;
out = fopen(filename, "w");
if (!out)
return 1;
+ gs = str_new();
sym_clear_all_valid();
@@ -772,10 +849,14 @@ int conf_write_defconfig(const char *filename)
sym = menu->sym;
- if (!sym || sym_is_choice(sym))
+ if (!sym || sym_is_choice(sym) || sym->flags & SYMBOL_WRITTEN)
continue;
sym_calc_value(sym);
+ if (warn_changed_input)
+ conf_append_changed_input_warning(&gs, sym,
+ &changed_input_found);
+ sym->flags |= SYMBOL_WRITTEN;
if (!(sym->flags & SYMBOL_WRITE))
continue;
sym->flags &= ~SYMBOL_WRITE;
@@ -798,6 +879,13 @@ int conf_write_defconfig(const char *filename)
print_symbol_for_dotconfig(out, sym);
}
fclose(out);
+
+ conf_clear_written_flags();
+
+ if (changed_input_found)
+ conf_message_raw(str_get(&gs));
+
+ str_free(&gs);
return 0;
}
@@ -809,7 +897,10 @@ int conf_write(const char *name)
const char *str;
char tmpname[PATH_MAX + 1], oldname[PATH_MAX + 1];
char *env;
+ struct gstr gs;
bool need_newline = false;
+ bool warn_changed_input = conf_warn_changed_input_enabled();
+ bool changed_input_found = false;
if (!name)
name = conf_get_configname();
@@ -838,6 +929,7 @@ int conf_write(const char *name)
}
if (!out)
return 1;
+ gs = str_new();
conf_write_heading(out, &comment_style_pound);
@@ -859,13 +951,16 @@ int conf_write(const char *name)
} else if (!sym_is_choice(sym) &&
!(sym->flags & SYMBOL_WRITTEN)) {
sym_calc_value(sym);
+ if (warn_changed_input)
+ conf_append_changed_input_warning(&gs, sym,
+ &changed_input_found);
+ sym->flags |= SYMBOL_WRITTEN;
if (!(sym->flags & SYMBOL_WRITE))
goto next;
if (need_newline) {
fprintf(out, "\n");
need_newline = false;
}
- sym->flags |= SYMBOL_WRITTEN;
print_symbol_for_dotconfig(out, sym);
}
@@ -892,8 +987,12 @@ int conf_write(const char *name)
}
fclose(out);
- for_all_symbols(sym)
- sym->flags &= ~SYMBOL_WRITTEN;
+ conf_clear_written_flags();
+
+ if (changed_input_found)
+ conf_message_raw(str_get(&gs));
+
+ str_free(&gs);
if (*tmpname) {
if (is_same(name, tmpname)) {
diff --git a/scripts/kconfig/tests/warn_changed_input/Kconfig b/scripts/kconfig/tests/warn_changed_input/Kconfig
new file mode 100644
index 000000000000..69845e2f3fb3
--- /dev/null
+++ b/scripts/kconfig/tests/warn_changed_input/Kconfig
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: GPL-2.0
+
+config DEP
+ bool "DEP"
+ help
+ Test dependency symbol for Kconfig warning coverage.
+ This is used by the warn_changed_input selftest.
+ It intentionally stays unset in the input fragment.
+ The test checks how dependent user input is adjusted.
+
+config A
+ bool "A"
+ depends on DEP
+ help
+ Test bool symbol for changed-input diagnostics.
+ The input fragment requests this symbol as built-in.
+ The unmet dependency on DEP forces the final value to n.
+ The warning should report that downgrade.
+
+config NUM
+ int "NUM"
+ range 10 20
+ help
+ Test integer symbol for changed-input diagnostics.
+ The input fragment requests a value outside the allowed range.
+ Kconfig resolves it to the constrained in-range value.
+ The warning should report that adjustment.
+
+config DUP
+ bool "DUP"
+ depends on DEP
+ help
+ Test duplicate-definition handling for changed-input diagnostics.
+ The input fragment requests this symbol as built-in.
+ The duplicate definition below must not produce a duplicate warning.
+ This keeps the warning output stable for repeated menu entries.
+
+config DUP
+ bool
+ depends on DEP
diff --git a/scripts/kconfig/tests/warn_changed_input/__init__.py b/scripts/kconfig/tests/warn_changed_input/__init__.py
new file mode 100644
index 000000000000..5a2b68fb1033
--- /dev/null
+++ b/scripts/kconfig/tests/warn_changed_input/__init__.py
@@ -0,0 +1,27 @@
+# SPDX-License-Identifier: GPL-2.0
+"""
+Test optional warnings for user-provided values changed by Kconfig.
+
+Warnings should stay disabled by default, and should only appear when
+KCONFIG_WARN_CHANGED_INPUT is enabled.
+"""
+
+
+def test(conf):
+ assert conf.olddefconfig('config') == 0
+ assert 'user-provided values changed by Kconfig' not in conf.stdout
+
+ assert conf._run_conf('--olddefconfig', dot_config='config',
+ extra_env={
+ 'KCONFIG_WARN_CHANGED_INPUT': '1',
+ }) == 0
+ assert conf.stdout_contains('expected_stdout')
+ assert conf.config_matches('expected_config')
+
+ assert conf._run_conf('--savedefconfig=defconfig', dot_config='config',
+ out_file='defconfig',
+ extra_env={
+ 'KCONFIG_WARN_CHANGED_INPUT': '1',
+ }) == 0
+ assert conf.stdout_contains('expected_stdout')
+ assert conf.config_matches('expected_defconfig')
diff --git a/scripts/kconfig/tests/warn_changed_input/config b/scripts/kconfig/tests/warn_changed_input/config
new file mode 100644
index 000000000000..dbe93ff26408
--- /dev/null
+++ b/scripts/kconfig/tests/warn_changed_input/config
@@ -0,0 +1,3 @@
+CONFIG_A=y
+CONFIG_NUM=30
+CONFIG_DUP=y
diff --git a/scripts/kconfig/tests/warn_changed_input/expected_config b/scripts/kconfig/tests/warn_changed_input/expected_config
new file mode 100644
index 000000000000..fe8bbec66c53
--- /dev/null
+++ b/scripts/kconfig/tests/warn_changed_input/expected_config
@@ -0,0 +1,6 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# Main menu
+#
+# CONFIG_DEP is not set
+CONFIG_NUM=20
diff --git a/scripts/kconfig/tests/warn_changed_input/expected_defconfig b/scripts/kconfig/tests/warn_changed_input/expected_defconfig
new file mode 100644
index 000000000000..af9e34851d2a
--- /dev/null
+++ b/scripts/kconfig/tests/warn_changed_input/expected_defconfig
@@ -0,0 +1 @@
+CONFIG_NUM=20
diff --git a/scripts/kconfig/tests/warn_changed_input/expected_stdout b/scripts/kconfig/tests/warn_changed_input/expected_stdout
new file mode 100644
index 000000000000..9ec8446b4ac2
--- /dev/null
+++ b/scripts/kconfig/tests/warn_changed_input/expected_stdout
@@ -0,0 +1,4 @@
+warning: user-provided values changed by Kconfig:
+ CONFIG_A: y -> n
+ CONFIG_NUM: 30 -> 20
+ CONFIG_DUP: y -> n
--
2.50.1 (Apple Git-155)
^ permalink raw reply related
* Re: [PATCH bpf-next v2] bpf, docs: add LOAD_ACQUIRE and STORE_RELEASE instructions
From: David Vernet @ 2026-05-21 2:17 UTC (permalink / raw)
To: Alexis Lothoré (eBPF Foundation)
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Eduard Zingerman, Kumar Kartikeya Dwivedi,
Song Liu, Yonghong Song, Jiri Olsa, Jonathan Corbet, Shuah Khan,
ebpf, Bastien Curutchet, Thomas Petazzoni, bpf, bpf, linux-doc,
linux-kernel
In-Reply-To: <20260521-bpf-insn-doc-v2-1-8c43c037d599@bootlin.com>
[-- Attachment #1: Type: text/plain, Size: 2920 bytes --]
On Thu, May 21, 2026 at 12:09:11AM +0200, Alexis Lothoré (eBPF Foundation) wrote:
Hi Alexis,
Thanks for working on this.
> Commit 880442305a39 ("bpf: Introduce load-acquire and store-release
> instructions") instroduced the LOAD_ACQUIRE and STORE_RELEASE atomic
introduced
> instructions modifiers. Those are currently not described in the
> documentation, despite being used in the verifier and the various JIT
> compilers supporting them.
>
> Add the missing entries in the instruction set documentation.
>
> Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Alexei et al -- if you plan to do a subsequent RFC, it will influence
how this document needs to be structured. [0] explains the process for
adding new instructions. To quote:
> Once a conformance group is registered with a set of instructions, no
> further instructions can be added to that conformance group. A
> specification should instead create a new conformance group that
> includes the original conformance group, plus any newly added
> instructions. Inclusion of the original conformance group is done via
> the "includes" column of the BPF Instruction Conformance Groups
> registry, and inclusion of newly added instructions is done via the
> "groups" column of the BPF Instruction Set registry.
So you would have to create a new conformance group for these new
atomics -- you can't just add them to the existing one. In general it
might be easier / advised to snapshot this file to RFC 9669 and create a
new one for the new instructions to make it easier to tease this stuff
apart later. If that's something you want, I'm happy to get us started
with a skeleton file. Again, though, that's only necessary if you plan
to submit a new document to the IETF WG.
[0]: https://www.rfc-editor.org/rfc/rfc9669.html#name-adding-instructions
[...]
> +The ``LOAD_ACQ`` and ``STORE_REL`` operations allow using lighter load and
> +store memory barriers rather than full barriers. The corresponding accesses
> +must be aligned, but are allowed for any access size (8-bit up to 64-bit
> +operations), with 8-bit and 16-bit ``LOAD_ACQ`` loaded values being
> +zero-extended. As atomics are encoded as stores, the meaning of dst and src
Nit:
``dst`` and ``src``
``src`` below as well.
Note though that as mentioned above, these instructions should probably
go into a new conformance group that includes the existing atomics.
> +are different for ``LOAD_ACQ``, effectively using src as memory based
> +pointer and dst as destination register for the fetched value.
> +
> 64-bit immediate instructions
> -----------------------------
>
>
> ---
> base-commit: ceeb3aa37bff895116944acf4347fcded0b7692d
> change-id: 20260520-bpf-insn-doc-756b369ca328
>
> Best regards,
> --
> Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* Re: [PATCH v5 08/13] ima: Introduce ima_dump_measurement()
From: Mimi Zohar @ 2026-05-21 2:07 UTC (permalink / raw)
To: Roberto Sassu, corbet, skhan, dmitry.kasatkin, eric.snowberg,
paul, jmorris, serge
Cc: linux-doc, linux-kernel, linux-integrity, linux-security-module,
gregorylumen, chenste, nramas, Roberto Sassu
In-Reply-To: <20260429160319.4162918-9-roberto.sassu@huaweicloud.com>
On Wed, 2026-04-29 at 18:03 +0200, Roberto Sassu wrote:
> From: Roberto Sassu <roberto.sassu@huawei.com>
>
> Introduce ima_dump_measurement() to simplify the code of
> ima_dump_measurement_list() and to avoid repeating the
> ima_dump_measurement() code block if iteration occurs on multiple lists.
>
> No functional change: only code moved to a separate function.
>
> Link: https://github.com/linux-integrity/linux/issues/1
> Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
^ permalink raw reply
* Re: [PATCH v5 07/13] ima: Use snprintf() in create_securityfs_measurement_lists
From: Mimi Zohar @ 2026-05-21 2:07 UTC (permalink / raw)
To: Roberto Sassu, corbet, skhan, dmitry.kasatkin, eric.snowberg,
paul, jmorris, serge
Cc: linux-doc, linux-kernel, linux-integrity, linux-security-module,
gregorylumen, chenste, nramas, Roberto Sassu
In-Reply-To: <20260429160319.4162918-8-roberto.sassu@huaweicloud.com>
On Wed, 2026-04-29 at 18:03 +0200, Roberto Sassu wrote:
> From: Roberto Sassu <roberto.sassu@huawei.com>
>
> Use the more secure snprintf() function (accepting the buffer size) in
> create_securityfs_measurement_lists().
>
> No functional change: sprintf() and snprintf() have the same behavior.
>
> Link: https://github.com/linux-integrity/linux/issues/1
> Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
^ permalink raw reply
* Re: [PATCH v5 06/13] ima: Mediate open/release method of the measurements list
From: Mimi Zohar @ 2026-05-21 2:07 UTC (permalink / raw)
To: Roberto Sassu, corbet, skhan, dmitry.kasatkin, eric.snowberg,
paul, jmorris, serge
Cc: linux-doc, linux-kernel, linux-integrity, linux-security-module,
gregorylumen, chenste, nramas, Roberto Sassu
In-Reply-To: <20260429160319.4162918-7-roberto.sassu@huaweicloud.com>
On Wed, 2026-04-29 at 18:03 +0200, Roberto Sassu wrote:
> From: Roberto Sassu <roberto.sassu@huawei.com>
>
> Introduce the ima_measure_users counter, to implement a semaphore-like
> locking scheme where the binary and ASCII measurements list interfaces can
> be concurrently open by multiple readers, or alternatively by a single
> writer.
>
> A semaphore cannot be used because the kernel cannot return to user space
> with a lock held.
>
> Introduce the ima_measure_lock() and ima_measure_unlock() primitives, to
> respectively lock/unlock the interfaces (safely with the ima_measure_users
> counter, without holding a lock).
>
> Finally, introduce _ima_measurements_open() to lock the interface before
> seq_open(), and call it from ima_measurements_open() and
> ima_ascii_measurements_open(). And, introduce ima_measurements_release(),
> to unlock the interface.
>
> Require CAP_SYS_ADMIN if the interface is opened for write (not possible
> for the current measurements interfaces, since they only have read
> permission).
>
> No functional changes: multiple readers are allowed as before.
>
> Link: https://github.com/linux-integrity/linux/issues/1
> Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
> ---
> security/integrity/ima/ima_fs.c | 71 +++++++++++++++++++++++++++++++--
> 1 file changed, 67 insertions(+), 4 deletions(-)
>
> diff --git a/security/integrity/ima/ima_fs.c b/security/integrity/ima/ima_fs.c
> index 9a8dba14d82a..68edea7139d5 100644
> --- a/security/integrity/ima/ima_fs.c
> +++ b/security/integrity/ima/ima_fs.c
> @@ -25,6 +25,8 @@
> #include "ima.h"
>
> static DEFINE_MUTEX(ima_write_mutex);
> +static DEFINE_MUTEX(ima_measure_mutex);
> +static long ima_measure_users;
long?
>
> bool ima_canonical_fmt;
> static int __init default_canonical_fmt_setup(char *str)
> @@ -209,16 +211,76 @@ static const struct seq_operations ima_measurments_seqops = {
> .show = ima_measurements_show
> };
>
> +static int ima_measure_lock(bool write)
> +{
> + mutex_lock(&ima_measure_mutex);
> + if ((write && ima_measure_users != 0) ||
> + (!write && ima_measure_users < 0)) {
> + mutex_unlock(&ima_measure_mutex);
> + return -EBUSY;
> + }
Thanks, Roberto. The code is really clear and well written. However, it could
use a comment indicating the different ima_measure_users values as a reminder.
ima_measure_users: > 0 open readers
ima_meaasure_users: == -1 open writer
> +
> + if (write)
> + ima_measure_users--;
> + else
> + ima_measure_users++;
> + mutex_unlock(&ima_measure_mutex);
> + return 0;
> +}
> +
> +static void ima_measure_unlock(bool write)
> +{
> + mutex_lock(&ima_measure_mutex);
> + if (write)
> + ima_measure_users++;
There should only be one writer at a time. ima_measure_users could be set to
zero.
> + else
> + ima_measure_users--;
> + mutex_unlock(&ima_measure_mutex);
> +}
> +
thanks,
Mimi
^ permalink raw reply
* Re: [PATCH v5 05/13] ima: Introduce _ima_measurements_start() and _ima_measurements_next()
From: Mimi Zohar @ 2026-05-21 2:06 UTC (permalink / raw)
To: Roberto Sassu, corbet, skhan, dmitry.kasatkin, eric.snowberg,
paul, jmorris, serge
Cc: linux-doc, linux-kernel, linux-integrity, linux-security-module,
gregorylumen, chenste, nramas, Roberto Sassu
In-Reply-To: <20260429160319.4162918-6-roberto.sassu@huaweicloud.com>
On Wed, 2026-04-29 at 18:03 +0200, Roberto Sassu wrote:
> From: Roberto Sassu <roberto.sassu@huawei.com>
>
> Introduce _ima_measurements_start() and _ima_measurements_next(), renamed
> from ima_measurements_start() and ima_measurements_next(), to include the
> list head as an additional parameter, so that iteration on different lists
> can be implemented by calling those functions.
>
> No functional change: ima_measurements_start() and ima_measurements_next()
> pass the ima_measurements list head, used before.
ima_measurements_start() and ima_measurments_next() become "wrappers" for the
new functions.
>
> Link: https://github.com/linux-integrity/linux/issues/1
> Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
^ permalink raw reply
* Re: [PATCH v5 04/13] ima: Introduce per binary measurements list type binary_runtime_size value
From: Mimi Zohar @ 2026-05-21 2:06 UTC (permalink / raw)
To: Roberto Sassu, corbet, skhan, dmitry.kasatkin, eric.snowberg,
paul, jmorris, serge
Cc: linux-doc, linux-kernel, linux-integrity, linux-security-module,
gregorylumen, chenste, nramas, Roberto Sassu
In-Reply-To: <20260429160319.4162918-5-roberto.sassu@huaweicloud.com>
On Wed, 2026-04-29 at 18:03 +0200, Roberto Sassu wrote:
> From: Roberto Sassu <roberto.sassu@huawei.com>
>
> Make binary_runtime_size as an array, to have separate counters per binary
> measurements list type. Currently, define the BINARY type for the existing
> binary measurements list.
>
> Introduce ima_update_binary_runtime_size() to facilitate updating a
> binary_runtime_size value with a given binary measurement list type.
>
> Also add the binary measurements list type parameter to
> ima_get_binary_runtime_size(), to retrieve the desired value. Retrieving
> the value is now done under the ima_extend_list_mutex, since there can be
> concurrent updates.
>
> No functional change (except for the mutex usage, that fixes the
> concurrency issue): the BINARY array element is equivalent to the old
> binary_runtime_size.
The patch is really clear and well written, but I don't see a concurrency issue
requiring taking the ima_extend_list_mutex at least in this patch.
Mimi
>
> Link: https://github.com/linux-integrity/linux/issues/1
> Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
^ permalink raw reply
* Re: [PATCH v5 03/13] ima: Introduce per binary measurements list type ima_num_entries counter
From: Mimi Zohar @ 2026-05-21 2:05 UTC (permalink / raw)
To: Roberto Sassu, corbet, skhan, dmitry.kasatkin, eric.snowberg,
paul, jmorris, serge
Cc: linux-doc, linux-kernel, linux-integrity, linux-security-module,
gregorylumen, chenste, nramas, Roberto Sassu
In-Reply-To: <20260429160319.4162918-4-roberto.sassu@huaweicloud.com>
On Wed, 2026-04-29 at 18:03 +0200, Roberto Sassu wrote:
> From: Roberto Sassu <roberto.sassu@huawei.com>
>
> Make ima_num_entries as an array, to have separate counters per binary
> measurements list type. Currently, define the BINARY type for the existing
> binary measurements list.
>
> No functional change: the BINARY type is equivalent to the value without
> the array.
>
> Link: https://github.com/linux-integrity/linux/issues/1
> Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Thanks, Roberto.
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
^ permalink raw reply
* Re: [PATCH v5 02/13] ima: Replace static htable queue with dynamically allocated array
From: Mimi Zohar @ 2026-05-21 2:05 UTC (permalink / raw)
To: Roberto Sassu, corbet, skhan, dmitry.kasatkin, eric.snowberg,
paul, jmorris, serge
Cc: linux-doc, linux-kernel, linux-integrity, linux-security-module,
gregorylumen, chenste, nramas, Roberto Sassu
In-Reply-To: <20260429160319.4162918-3-roberto.sassu@huaweicloud.com>
On Wed, 2026-04-29 at 18:03 +0200, Roberto Sassu wrote:
> From: Roberto Sassu <roberto.sassu@huawei.com>
>
> The IMA hash table is a fixed-size array of hlist_head buckets:
>
> struct hlist_head ima_htable[IMA_MEASURE_HTABLE_SIZE];
>
> IMA_MEASURE_HTABLE_SIZE is (1 << IMA_HASH_BITS) = 1024 buckets, each a
> struct hlist_head (one pointer, 8 bytes on 64-bit). That is 8 KiB allocated
> in BSS for every kernel, regardless of whether IMA is ever used, and
> regardless of how many measurements are actually made.
>
> Replace the fixed-size array with a RCU-protected pointer to a dynamically
> allocated array that is initialized in ima_init_htable(), which is called
> from ima_init() during early boot. ima_init_htable() calls the static
> function ima_alloc_replace_htable() which, other than initializing the hash
> table the first time, can also hot-swap the existing hash table with a
> blank one.
>
> The allocation in ima_alloc_replace_htable() uses kcalloc() so the buckets
> are zero-initialised (equivalent to HLIST_HEAD_INIT { .first = NULL }).
> Callers of ima_alloc_replace_htable() must call synchronize_rcu() and free
> the returned hash table.
>
> Finally, access the hash table with rcu_dereference() in
> ima_lookup_digest_entry() (reader side) and with
> rcu_dereference_protected() in ima_add_digest_entry() (writer side).
>
> No functional change: bucket count, hash function, and all locking remain
> identical.
>
> Link: https://github.com/linux-integrity/linux/issues/1
> Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
^ permalink raw reply
* Re: [PATCH v5 01/13] ima: Remove ima_h_table structure
From: Mimi Zohar @ 2026-05-21 2:05 UTC (permalink / raw)
To: Roberto Sassu, corbet, skhan, dmitry.kasatkin, eric.snowberg,
paul, jmorris, serge
Cc: linux-doc, linux-kernel, linux-integrity, linux-security-module,
gregorylumen, chenste, nramas, Roberto Sassu
In-Reply-To: <20260429160319.4162918-2-roberto.sassu@huaweicloud.com>
On Wed, 2026-04-29 at 18:03 +0200, Roberto Sassu wrote:
> From: Roberto Sassu <roberto.sassu@huawei.com>
>
Instead of jumping straight to "With the upcoming change ...", some context is
needed. Perhaps something like:
The ima_h_table structure is a collection of IMA measurement list metadata -
number of records in the IMA measurement list, number of integrity violations,
and a hash table containing the IMA template data hash, needed to prevent
measurement list record duplication.
Removing records from the measurement list needs to be reflected in the hash
table. As a pre-req to removing records from the measurement list, separate ...
> With the upcoming change of dynamically allocating and replacing the hash
> table, the ima_h_table structure would have been replaced with a new one.
>
> However, since the ima_h_table structure contains also the counters for
> number of measurements entries and violations, we would have needed to
> preserve their values in the new ima_h_table structure.
>
> Instead, separate those counters from the hash table, remove the
> ima_h_table structure, and just replace the hash table pointer.
>
> Finally, rename ima_show_htable_value(), ima_show_htable_violations()
> and ima_htable_violations_ops respectively to ima_show_counter(),
> ima_show_num_violations() and ima_num_violations_ops.
>
> Link: https://github.com/linux-integrity/linux/issues/1
> Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Other than referring to "entries" in the measurement list, the patch looks good.
I prefer referring to them as "records".
> ---
> security/integrity/ima/ima.h | 9 +++------
> security/integrity/ima/ima_api.c | 2 +-
> security/integrity/ima/ima_fs.c | 19 +++++++++----------
> security/integrity/ima/ima_kexec.c | 2 +-
> security/integrity/ima/ima_queue.c | 17 ++++++++++-------
> 5 files changed, 24 insertions(+), 25 deletions(-)
>
> diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h
> index 69e9bf0b82c6..51a8a582df56 100644
> --- a/security/integrity/ima/ima.h
> +++ b/security/integrity/ima/ima.h
> @@ -324,12 +324,9 @@ int ima_lsm_policy_change(struct notifier_block *nb, unsigned long event,
> */
> extern spinlock_t ima_queue_lock;
>
> -struct ima_h_table {
> - atomic_long_t len; /* number of stored measurements in the list */
> - atomic_long_t violations;
> - struct hlist_head queue[IMA_MEASURE_HTABLE_SIZE];
> -};
> -extern struct ima_h_table ima_htable;
> +extern atomic_long_t ima_num_entries;
-> ima_num_records /* Total number of measurement list records */
Will this be the current or total number of measurement list records since a
hard boot?
> +extern atomic_long_t ima_num_violations;
Similarly, will this be the current number or total number of violations since a
hard boot? Please add a comment.
> +extern struct hlist_head ima_htable[IMA_MEASURE_HTABLE_SIZE];
>
> static inline unsigned int ima_hash_key(u8 *digest)
> {
thanks,
Mimi
^ permalink raw reply
* Re: [PATCH v5 00/13] ima: Introduce staging mechanism
From: Mimi Zohar @ 2026-05-21 2:02 UTC (permalink / raw)
To: Roberto Sassu, corbet, skhan, dmitry.kasatkin, eric.snowberg,
paul, jmorris, serge
Cc: linux-doc, linux-kernel, linux-integrity, linux-security-module,
gregorylumen, chenste, nramas, Roberto Sassu
In-Reply-To: <20260429160319.4162918-1-roberto.sassu@huaweicloud.com>
On Wed, 2026-04-29 at 18:03 +0200, Roberto Sassu wrote:
> From: Roberto Sassu <roberto.sassu@huawei.com>
>
> Introduction
> ============
>
> The IMA measurements list is currently stored in the kernel memory.
> Memory occupation grows linearly with the number of entries, and can
> become a problem especially in environments with reduced resources.
>
> While there is an advantage in keeping the IMA measurements list in
> kernel memory, so that it is always available for reading from the
> securityfs interfaces, storing it elsewhere would make it possible to
> free precious memory for other kernel components.
-> for other kernel usage.
Prefix the following paragraph with:
The IMA measurement list needs to be retained and safely stored for new
attestation servers to validate the entire measurement list. Assuming the IMA
measurement list is properly saved, storing ...
> Storing the IMA measurements list outside the kernel does not introduce
> security issues, since its integrity is anyway protected by the TPM.
>
> Hence, the new IMA staging mechanism is introduced to allow user space
> to remove the desired portion of the measurements list from the kernel.
"desired portion" could be misconstrued as any subset of the measurement list.
-> to remove the entire or a portion of the measurement list ...
>
> Usage
> =====
> The IMA staging mechanism can be enabled from the kernel configuration
> with the CONFIG_IMA_STAGING option.
Continue with:
This option prevents inadvertently removing the IMA measurement list on systems
which do not properly save it.
>
> If it is enabled, IMA duplicates the current measurements interfaces
-> duplicates the current securityfs measurement list interfaces
> (both binary and ASCII), by adding the _staged file suffix. Both the
> original and the staging interfaces gain the write permission for the
> root user and group, but require the process to have CAP_SYS_ADMIN set.
>
> The staging mechanism supports two flavors.
>
> Staging with prompt
> ~~~~~~~~~~~~~~~~~~~
>
> The current measurements list is moved to a temporary staging area, and
> staged measurements are deleted upon confirmation.
-> The current measurement list is moved to a temporary staging area, allowing
it to be saved to external storage, before being deleted upon confirmation.
>
> This staging process is achieved with the following steps.
>
> 1. echo A > <original interface>: the user requests IMA to stage the
> entire measurements list;
> 2. cat <_staged interface>: the user reads the staged measurements;
> 3. echo D > <_staged interface>: the user requests IMA to delete
> staged measurements.
>
> Staging and deleting
> ~~~~~~~~~~~~~~~~~~~~
>
> N measurements are staged to a temporary staging area, and immediately
> deleted without further confirmation.
>
> This staging process is achieved with the following steps.
>
> 1. cat <original interface>: the user reads the current measurements
> list and determines what the value N for staging should be;
> 2. echo N > <original interface>: the user requests IMA to delete N
> measurements from the current measurements list.
>
>
> Management of Staged Measurements
> =================================
>
> Since with the staging mechanism measurement entries are removed from
> the kernel, the user needs to save the staged ones in a storage and
> concatenate them together, so that it can present them to remote
> attestation agents as if staging was never done.
"the user needs to save the staged ones" -> the staged measurements need to be
saved ....
Please mention this could be a system service.
thanks,
Mimi
^ permalink raw reply
* Re: [PATCH mm-unstable v17 11/14] mm/khugepaged: Introduce mTHP collapse support
From: Wei Yang @ 2026-05-21 1:55 UTC (permalink / raw)
To: Nico Pache
Cc: Wei Yang, linux-doc, linux-kernel, linux-mm, linux-trace-kernel,
aarcange, akpm, anshuman.khandual, apopple, baohua, baolin.wang,
byungchul, catalin.marinas, cl, corbet, dave.hansen, david,
dev.jain, gourry, hannes, hughd, jack, jackmanb, jannh, jglisse,
joshua.hahnjy, kas, lance.yang, liam, ljs, mathieu.desnoyers,
matthew.brost, mhiramat, mhocko, peterx, pfalcato, rakie.kim,
raquini, rdunlap, rientjes, rostedt, rppt, ryan.roberts, shivankg,
sunnanyong, surenb, thomas.hellstrom, tiwai, usamaarif642, vbabka,
vishal.moola, wangkefeng.wang, will, willy, yang, ying.huang, ziy,
zokeefe
In-Reply-To: <CAA1CXcD2KPKFrwCZd2PatQhf_e1nrvCguPD77GcNOVPFZLvsew@mail.gmail.com>
On Wed, May 20, 2026 at 06:05:31AM -0600, Nico Pache wrote:
>On Tue, May 12, 2026 at 9:44 AM Wei Yang <richard.weiyang@gmail.com> wrote:
>>
>> On Mon, May 11, 2026 at 12:58:11PM -0600, Nico Pache wrote:
>> >Enable khugepaged to collapse to mTHP orders. This patch implements the
>> >main scanning logic using a bitmap to track occupied pages and a stack
>> >structure that allows us to find optimal collapse sizes.
>> >
>> >Previous to this patch, PMD collapse had 3 main phases, a light weight
>> >scanning phase (mmap_read_lock) that determines a potential PMD
>> >collapse, an alloc phase (mmap unlocked), then finally heavier collapse
>> >phase (mmap_write_lock).
>> >
>> >To enabled mTHP collapse we make the following changes:
>> >
>> >During PMD scan phase, track occupied pages in a bitmap. When mTHP
>> >orders are enabled, we remove the restriction of max_ptes_none during the
>> >scan phase to avoid missing potential mTHP collapse candidates. Once we
>> >have scanned the full PMD range and updated the bitmap to track occupied
>> >pages, we use the bitmap to find the optimal mTHP size.
>> >
>> >Implement collapse_scan_bitmap() to perform binary recursion on the bitmap
>> >and determine the best eligible order for the collapse. A stack structure
>> >is used instead of traditional recursion to manage the search. This also
>> >prevents a traditional recursive approach when the kernel stack struct is
>> >limited. The algorithm recursively splits the bitmap into smaller chunks to
>> >find the highest order mTHPs that satisfy the collapse criteria. We start
>> >by attempting the PMD order, then moved on the consecutively lower orders
>> >(mTHP collapse). The stack maintains a pair of variables (offset, order),
>> >indicating the number of PTEs from the start of the PMD, and the order of
>> >the potential collapse candidate.
>> >
>> >The algorithm for consuming the bitmap works as such:
>> > 1) push (0, HPAGE_PMD_ORDER) onto the stack
>> > 2) pop the stack
>> > 3) check if the number of set bits in that (offset,order) pair
>> > statisfy the max_ptes_none threshold for that order
>> > 4) if yes, attempt collapse
>> > 5) if no (or collapse fails), push two new stack items representing
>> > the left and right halves of the current bitmap range, at the
>> > next lower order
>> > 6) repeat at step (2) until stack is empty.
>> >
>> >Below is a diagram representing the algorithm and stack items:
>> >
>> > offset mid_offset
>> > | |
>> > | |
>> > v v
>> > ____________________________________
>> > | PTE Page Table |
>> > --------------------------------------
>> > <-------><------->
>> > order-1 order-1
>> >
>> >mTHP collapses reject regions containing swapped out or shared pages.
>> >This is because adding new entries can lead to new none pages, and these
>> >may lead to constant promotion into a higher order mTHP. A similar
>> >issue can occur with "max_ptes_none > HPAGE_PMD_NR/2" due to a collapse
>> >introducing at least 2x the number of pages, and on a future scan will
>> >satisfy the promotion condition once again. This issue is prevented via
>> >the collapse_max_ptes_none() function which imposes the max_ptes_none
>> >restrictions above.
>> >
>> >We currently only support mTHP collapse for max_ptes_none values of 0
>> >and HPAGE_PMD_NR - 1. resulting in the following behavior:
>> >
>> > - max_ptes_none=0: Never introduce new empty pages during collapse
>> > - max_ptes_none=HPAGE_PMD_NR-1: Always try collapse to the highest
>> > available mTHP order
>> >
>> >Any other max_ptes_none value will emit a warning and skip mTHP collapse
>> >attempts. There should be no behavior change for PMD collapse.
>> >
>> >Once we determine what mTHP sizes fits best in that PMD range a collapse
>> >is attempted. A minimum collapse order of 2 is used as this is the lowest
>> >order supported by anon memory as defined by THP_ORDERS_ALL_ANON.
>> >
>> >Currently madv_collapse is not supported and will only attempt PMD
>> >collapse.
>> >
>> >We can also remove the check for is_khugepaged inside the PMD scan as
>> >the collapse_max_ptes_none() function handles this logic now.
>> >
>> >Signed-off-by: Nico Pache <npache@redhat.com>
>>
>> [...]
>>
>> >+static int mthp_collapse(struct mm_struct *mm, unsigned long address,
>> >+ int referenced, int unmapped, struct collapse_control *cc,
>> >+ unsigned long enabled_orders)
>> >+{
>> >+ unsigned int nr_occupied_ptes, nr_ptes;
>> >+ int max_ptes_none, collapsed = 0, stack_size = 0;
>> >+ unsigned long collapse_address;
>> >+ struct mthp_range range;
>> >+ u16 offset;
>> >+ u8 order;
>> >+
>> >+ collapse_mthp_stack_push(cc, &stack_size, 0, HPAGE_PMD_ORDER);
>> >+
>> >+ while (stack_size) {
>> >+ range = collapse_mthp_stack_pop(cc, &stack_size);
>> >+ order = range.order;
>> >+ offset = range.offset;
>> >+ nr_ptes = 1UL << order;
>> >+
>> >+ if (!test_bit(order, &enabled_orders))
>> >+ goto next_order;
>> >+
>> >+ max_ptes_none = collapse_max_ptes_none(cc, NULL, order);
>>
>> I am thinking whether there is a behavioral change for userfaultfd_armed(vma).
>>
>> collapse_single_pmd()
>> collapse_scan_pmd
>> max_ptes_none = collapse_max_ptes_none(cc, vma)
>> max_ptes_none = KHUGEPAGED_MAX_PTES_LIMIT --- (1)
>> mthp_collapse
>> max_ptes_none = collapse_max_ptes_none(cc, NULL) --- (2)
>> collapse_huge_page(mm)
>> hugepage_vma_revalidate(&vma)
>> __collapse_huge_page_isolate(vma)
>> max_ptes_none = collapse_max_ptes_none(cc, vma)
>>
>> Before mthp_collapse() introduced, userfaultfd_armed(vma) is skipped if there
>> is any pte_none_or_zero() in collapse_scan_pmd().
>>
>> But now, max_ptes_none could be set to KHUGEPAGED_MAX_PTES_LIMIT at (1), so
>> that we can scan all the pte to get the bitmap. This means
>> userfaultfd_armed(vma) could continue even with pte_none_or_zero().
>>
>> Then in mthp_collapse(), collapse_max_ptes_none() at (2) ignores
>> userfaultfd_armed(vma), which means it will continue to collapse a
>> userfaultfd_armed(vma) when there is pte_none_or_zero().
>>
>> The good news is we will stop at __collapse_huge_page_isolate(), where we
>> get collapse_max_ptes_none() with vma. But we already did a lot of work.
>
>Good catch!
>
>As you stated we eventually ensure we respect the uffd checks. So
>there are no correctness issues, just the potential for wasted cycles.
>
>At (1) we only do this if mTHPs are enabled. If that is the case, the
>only waste that can arise is at the PMD order, as that order respects
>the max_ptes_none value.
>
>I think one approach is to gate (1) with the uffd check as well. That
>way, if mTHPs are enabled and its uffd-armed, max_ptes_none will stay
>at 0, and we bail early on the scan early if any none_ptes are hit.
>
>But then we lose the ability to collapse to mTHPs that are uffd-armed,
>where the PMD has none/zero-ptes and the mTHP fully has 0
>non-none/zero-ptes.
>
>ie) assume a PMD is 16 x's [xxxxxxxx00000000]
>where x is a populated pte and 0 is not
>If we guard this scan (1), then we will never check if its possible to
>collapse to the smaller orders.
>
>Let me know if you see a flaw in my logic, I think it's best to keep it as is?
>
Yes, gate it at (1) is not a proper place.
I am thinking whether we could pass vma to (2)? So that we could respect
uffd-armed?
>>
>> Not sure if I missed something.
>>
>> >+
>> >+ if (max_ptes_none < 0)
>> >+ return collapsed;
>> >+
>> >+ nr_occupied_ptes = collapse_mthp_count_present(cc, offset,
>> >+ nr_ptes);
>> >+
>> >+ if (nr_occupied_ptes >= nr_ptes - max_ptes_none) {
>> >+ int ret;
>> >+
>> >+ collapse_address = address + offset * PAGE_SIZE;
>> >+ ret = collapse_huge_page(mm, collapse_address, referenced,
>> >+ unmapped, cc, order);
>> >+ if (ret == SCAN_SUCCEED) {
>> >+ collapsed += nr_ptes;
>> >+ continue;
>> >+ }
>> >+ }
>> >+
>> >+next_order:
>> >+ if (order > KHUGEPAGED_MIN_MTHP_ORDER) {
>> >+ const u8 next_order = order - 1;
>> >+ const u16 mid_offset = offset + (nr_ptes / 2);
>> >+
>> >+ collapse_mthp_stack_push(cc, &stack_size, mid_offset,
>> >+ next_order);
>> >+ collapse_mthp_stack_push(cc, &stack_size, offset,
>> >+ next_order);
>> >+ }
>> >+ }
>> >+ return collapsed;
>> >+}
>> >+
>> > static enum scan_result collapse_scan_pmd(struct mm_struct *mm,
>> > struct vm_area_struct *vma, unsigned long start_addr,
>> > bool *lock_dropped, struct collapse_control *cc)
>> > {
>> >- const int max_ptes_none = collapse_max_ptes_none(cc, vma, HPAGE_PMD_ORDER);
>> >+ int max_ptes_none = collapse_max_ptes_none(cc, vma, HPAGE_PMD_ORDER);
>> > const unsigned int max_ptes_shared = collapse_max_ptes_shared(cc, HPAGE_PMD_ORDER);
>> > const unsigned int max_ptes_swap = collapse_max_ptes_swap(cc, HPAGE_PMD_ORDER);
>> >+ enum tva_type tva_flags = cc->is_khugepaged ? TVA_KHUGEPAGED : TVA_FORCED_COLLAPSE;
>> > pmd_t *pmd;
>> >- pte_t *pte, *_pte;
>> >- int none_or_zero = 0, shared = 0, referenced = 0;
>> >+ pte_t *pte, *_pte, pteval;
>> >+ int i;
>> >+ int none_or_zero = 0, shared = 0, nr_collapsed = 0, referenced = 0;
>> > enum scan_result result = SCAN_FAIL;
>> > struct page *page = NULL;
>> > struct folio *folio = NULL;
>> > unsigned long addr;
>> >+ unsigned long enabled_orders;
>> > spinlock_t *ptl;
>> > int node = NUMA_NO_NODE, unmapped = 0;
>> >
>> >@@ -1429,8 +1579,19 @@ static enum scan_result collapse_scan_pmd(struct mm_struct *mm,
>> > goto out;
>> > }
>> >
>> >+ bitmap_zero(cc->mthp_bitmap, MAX_PTRS_PER_PTE);
>> > memset(cc->node_load, 0, sizeof(cc->node_load));
>> > nodes_clear(cc->alloc_nmask);
>> >+
>> >+ enabled_orders = collapse_allowable_orders(vma, vma->vm_flags, tva_flags);
>>
>> Would it be 0 at this point?
>
>If your question relates to the issue you brought up above, then yes,
>max_ptes_none would be 0 if it's uffd-armed. We must recheck the
>uffd-armed status before modifying it to 511.
>
>>
>> >+
>> >+ /*
>> >+ * If PMD is the only enabled order, enforce max_ptes_none, otherwise
>> >+ * scan all pages to populate the bitmap for mTHP collapse.
>> >+ */
>> >+ if (enabled_orders != BIT(HPAGE_PMD_ORDER))
>> >+ max_ptes_none = KHUGEPAGED_MAX_PTES_LIMIT;
>> >+
>> > pte = pte_offset_map_lock(mm, pmd, start_addr, &ptl);
>> > if (!pte) {
>> > cc->progress++;
>> >@@ -1438,11 +1599,13 @@ static enum scan_result collapse_scan_pmd(struct mm_struct *mm,
>> > goto out;
>> > }
>> >
>> >- for (addr = start_addr, _pte = pte; _pte < pte + HPAGE_PMD_NR;
>> >- _pte++, addr += PAGE_SIZE) {
>> >+ for (i = 0; i < HPAGE_PMD_NR; i++) {
>> >+ _pte = pte + i;
>> >+ addr = start_addr + i * PAGE_SIZE;
>> >+ pteval = ptep_get(_pte);
>> >+
>> > cc->progress++;
>> >
>> >- pte_t pteval = ptep_get(_pte);
>> > if (pte_none_or_zero(pteval)) {
>> > if (++none_or_zero > max_ptes_none) {
>> > result = SCAN_EXCEED_NONE_PTE;
>> >@@ -1522,6 +1685,8 @@ static enum scan_result collapse_scan_pmd(struct mm_struct *mm,
>> > }
>> > }
>> >
>> >+ /* Set bit for occupied pages */
>> >+ __set_bit(i, cc->mthp_bitmap);
>> > /*
>> > * Record which node the original page is from and save this
>> > * information to cc->node_load[].
>> >@@ -1580,10 +1745,11 @@ static enum scan_result collapse_scan_pmd(struct mm_struct *mm,
>> > if (result == SCAN_SUCCEED) {
>> > /* collapse_huge_page expects the lock to be dropped before calling */
>> > mmap_read_unlock(mm);
>> >- result = collapse_huge_page(mm, start_addr, referenced,
>> >- unmapped, cc, HPAGE_PMD_ORDER);
>> >+ nr_collapsed = mthp_collapse(mm, start_addr, referenced, unmapped,
>> >+ cc, enabled_orders);
>> > /* collapse_huge_page will return with the mmap_lock released */
>>
>> collapse_huge_page will return with mmap_lock released, but mthp_collapse()
>> may not?
>
>We are now releasing the lock before calling mthp_collapse, which
>subsequently calls collapse_huge_page. Even if `collapse_huge_page` is
>never called-- say, because enabled_orders is 0 (which should not
>happen) and all collapse orders are skipped (never calling
>collapse_huge_page)-- we still return here with the lock dropped.
>
>I think this is sound. Let me know if you think differently.
>
You are right. I missed the lock is released in previous patch.
>Cheers :)
>-- Nico
>
>>
>> > *lock_dropped = true;
>> >+ result = nr_collapsed ? SCAN_SUCCEED : SCAN_FAIL;
>> > }
>> > out:
>> > trace_mm_khugepaged_scan_pmd(mm, folio, referenced,
>> >--
>> >2.54.0
>>
>> --
>> Wei Yang
>> Help you, Help me
>>
--
Wei Yang
Help you, Help me
^ permalink raw reply
* Re: [PATCH net-next v3 05/14] libie: add bookkeeping support for control queue messages
From: Jakub Kicinski @ 2026-05-21 1:51 UTC (permalink / raw)
To: Tony Nguyen
Cc: davem, pabeni, edumazet, andrew+netdev, netdev, Phani R Burra,
larysa.zaremba, przemyslaw.kitszel, aleksander.lobakin,
sridhar.samudrala, anjali.singhai, michal.swiatkowski,
maciej.fijalkowski, emil.s.tantilov, madhu.chittim, joshua.a.hay,
jacob.e.keller, jayaprakash.shanmugam, jiri, horms, corbet,
richardcochran, linux-doc, Bharath R, Samuel Salin,
Aleksandr Loktionov
In-Reply-To: <20260515224443.2772147-6-anthony.l.nguyen@intel.com>
On Fri, 15 May 2026 15:44:29 -0700 Tony Nguyen wrote:
> + guard(spinlock)(&xnm->free_xns_bm_lock);
Quoting documentation:
Using device-managed and cleanup.h constructs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Netdev remains skeptical about promises of all "auto-cleanup" APIs,
including even ``devm_`` helpers, historically. They are not the preferred
style of implementation, merely an acceptable one.
Use of ``guard()`` is discouraged within any function longer than 20 lines,
``scoped_guard()`` is considered more readable. Using normal lock/unlock is
still (weakly) preferred.
Low level cleanup constructs (such as ``__free()``) can be used when building
APIs and helpers, especially scoped iterators. However, direct use of
``__free()`` within networking core and drivers is discouraged.
Similar guidance applies to declaring variables mid-function.
See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#using-device-managed-and-cleanup-h-constructs
^ permalink raw reply
* Re: [PATCH net-next v3 03/14] libeth: allow to create fill queues without NAPI
From: Jakub Kicinski @ 2026-05-21 1:49 UTC (permalink / raw)
To: Tony Nguyen
Cc: davem, pabeni, edumazet, andrew+netdev, netdev, Pavan Kumar Linga,
larysa.zaremba, przemyslaw.kitszel, aleksander.lobakin,
sridhar.samudrala, anjali.singhai, michal.swiatkowski,
maciej.fijalkowski, emil.s.tantilov, joshua.a.hay, jacob.e.keller,
jayaprakash.shanmugam, jiri, horms, corbet, richardcochran,
linux-doc, Bharath R, Samuel Salin
In-Reply-To: <20260515224443.2772147-4-anthony.l.nguyen@intel.com>
On Fri, 15 May 2026 15:44:27 -0700 Tony Nguyen wrote:
> +int libeth_rx_fq_create(struct libeth_fq *fq, void *napi_dev)
Why do you have to pass an opaque void pointer?
Just add another arg for dev.
int libeth_rx_fq_create(struct libeth_fq *fq, struct napi_struct *napi,
struct device *dev)
{
struct page_pool_params pp = {
.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV,
.order = LIBETH_RX_PAGE_ORDER,
.pool_size = fq->count,
.nid = fq->nid,
- .dev = napi->dev->dev.parent,
- .netdev = napi->dev,
+ .dev = dev ? dev : napi->dev->dev.parent,
+ .netdev = napi ? napi->dev : NULL,
^ permalink raw reply
* Re: [PATCH mm-new] Documentation/admin-guide/mm: Fix typos in transhuge.rst
From: SeongJae Park @ 2026-05-21 1:00 UTC (permalink / raw)
To: Leon Hwang
Cc: SeongJae Park, linux-mm, Andrew Morton, David Hildenbrand,
Lorenzo Stoakes, Zi Yan, Baolin Wang, Liam R . Howlett,
Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Jonathan Corbet, Shuah Khan, linux-doc, linux-kernel
In-Reply-To: <20260520051751.74396-1-leon.hwang@linux.dev>
On Wed, 20 May 2026 13:17:51 +0800 Leon Hwang <leon.hwang@linux.dev> wrote:
> Fix these two typos:
>
> 1. approporiately -> appropriately
> 2. presure -> pressure
>
> Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Reviewed-by: SeongJae Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply
* Re: [PATCH] dcache: add fs.dentry-limit sysctl with negative-first reaper
From: Ian Kent @ 2026-05-21 0:55 UTC (permalink / raw)
To: Amir Goldstein
Cc: Jan Kara, NeilBrown, Horst Birthelmer, Miklos Szeredi,
Jonathan Corbet, Shuah Khan, Alexander Viro, Christian Brauner,
linux-doc, linux-kernel, linux-fsdevel, Horst Birthelmer
In-Reply-To: <CAOQ4uxg-7Tsb0GWF4LN3iFBaY7uGxR5_7PwBF+GfMWtCdfi4xw@mail.gmail.com>
On 20/5/26 17:43, Amir Goldstein wrote:
> On Wed, May 20, 2026 at 9:16 AM Ian Kent <raven@themaw.net> wrote:
>> On 19/5/26 17:12, Jan Kara wrote:
>>> On Mon 18-05-26 21:39:13, Ian Kent wrote:
>>>> On 18/5/26 16:19, Jan Kara wrote:
>>>>> Hi Ian,
>>>>>
>>>>> On Mon 18-05-26 10:55:43, Ian Kent wrote:
>>>>>> On 18/5/26 07:55, NeilBrown wrote:
>>>>>>> On Fri, 15 May 2026, Horst Birthelmer wrote:
>>>>>>> According to the email you linked, a problem arises when a directory has
>>>>>>> a great many negative children. Code which walks the list of children
>>>>>>> (such as fsnotify) while holding a lock can suffer unpredictable delays
>>>>>>> and result in long lock-hold times. So maybe a limit on negative
>>>>>>> dentries for any parent is what we really want. That would be clumsy to
>>>>>>> implement I imagine.
>>>>>> But the notion of dropping the dentry in ->d_delete() on last dput() is
>>>>>> simple enough but did see regressions (the only other place in the VFS
>>>>>> besides dentry_kill() that the inode is unlinked from the dentry on
>>>>>> dput()). I wonder if the regression was related to the test itself
>>>>>> deliberately recreating deleted files and if that really is normal
>>>>>> behaviour. By itself that should prevent almost all negative dentries
>>>>>> being retained. Although file systems could do this as well (think XFS
>>>>>> inode recycling) it should be reasonable to require it be left to the
>>>>>> VFS.
>>>>>>
>>>>>> But even that's not enough given that, in my case, there would still be
>>>>>> around 4 million dentries in the LRU cache and in fsnotify there are
>>>>>> directory child traversals holding the parent i_lock "spinlock" that are
>>>>>> going to cause problems.
>>>>> Do you mean there are very many positive children of a directory?
>>>> Didn't quantify that.
>>>>
>>>> The symptom is the "Spinlock held for more than ... seconds" occurring in
>>>> the log. So there are certainly a lot of children in the list, but it's
>>>> an assumption the ratio of positive to negative entries is roughly the
>>>> same as the overall ratio in the dcache.
>>> OK, but that's not necessarily true. I have seen these complaints from the
>>> kernel but in all the cases I remember it was due to negative dentries
>>> accumultating in a particular directory. There are certain apps such as
>>> ElasticSearch which really do like creating huge amounts of negative
>>> dentries in one directory - they use hashes as filenames and use directory
>>> lookup instead of a DB table lookup and lookup lots of non-existent keys...
>> Umm ... that's a good point, I hadn't paid much attention to ENOENT result
>>
>> lookups, I'll need to check on the like cycle of those, I think they do get
>>
>> hashed. That has to be the other source of negative dentries that I've
>>
>> neglected ...
>>
> Yes, it has been claimed that some real life workloads create a lot of those.
>
> If we can keep those at the tail of the children list, it will be best
> for the fsnotify
> iteration, which only cares about positive dentries.
>
>>>>>> so why is this traversal even retained in fsnotify?
>>>>> Not sure which traversal you mean but if you set watch on a parent, you
>>>>> have to walk all children to set PARENT_WATCHED flag so that you don't miss
>>>>> events on children...
>>>> Yes, that traversal is what I'm questioning ... again thanks.
>>>>
>>>> I think the function name is still fsnotify_set_children_dentry_flags()
>>>> in recent kernels, the subject of commit 172e422ffea2 I mentioned above.
>>> OK, thanks.
>>>
>>>> When you say miss events are you saying that accessing the parent dentry to
>>>> work out if the child needs to respond to an event is quite expensive in the
>>>> overall event processing context, that might make more sense to me ... or do
>>>> I completely not yet understand the reasoning behind the need for the flag?
>>> Close but not quite. The cost is the overhead of dget_parent() in
>>> fsnotify_parent() which is often a couple of cache cold loads and atomic
>>> instructions to find out we don't need to send any event for the current
>>> write(2) or read(2) call. It gets worse if there are many IOs happening to
>>> dentries in the same directory from multiple CPUs because instead of
>>> cache-cold loads you get a cacheline contention on the parent.
>>>
>>>>>>> But what if we move dentries to the end of the list when they become
>>>>>>> negative, and to the start of the list when they become positive? Then
>>>>>>> code which walks the child list could simply abort on the first
>>>>>>> negative.
>>>>>>>
>>>>>>> I doubt that would be quite as easy as it sounds, but it would at least
>>>>>>> be more focused on the observed symptom rather than some whole-system
>>>>>>> number which only vaguely correlates with the observed symptom.
>>>>>>>
>>>>>>> Maybe a completely different approach: change children-walking code to
>>>>>>> drop and retake the lock (with appropriate validation) periodically.
>>>>>>> What too would address the specific symptom.
>>>>>> Another good question.
>>>>>>
>>>>>> I have assumed that dropping and re-taking the lock cannot be done but
>>>>>> this is a question I would like answered as well. Dropping and re-taking
>>>>>> lock would require, as Miklos pointed out to me off-list, recording the
>>>>>> list position with say a cursor, introducing unwanted complexity when it
>>>>>> would be better to accept the cost of a single extra access to the parent
>>>>>> flags (which I assume is one reason to set the flag in the child).
>>>>> The parent access is actually more expensive than you might think. Based on
>>>>> experience with past fsnotify related performance regression I expect some
>>>>> 20% performance hit for small tmpfs writes if you add unconditional parent
>>>>> access to the write path.
>>>> That sounds like a lot for what should be a memory access of an already in
>>>> memory structure since the parent must be accessed to traverse the list of
>>>> child entries. I clearly don't fully understand the implications of what
>>>> I'm saying but there has been mention of another context ...
>>> Parent dentry is of course in memory but often cache cold - you don't need
>>> the parent to do e.g. write(2) to an already open file. You seem to be
>>> somewhat confused about the child dentry list traversal (or maybe I'm
>>> misunderstanding) - that happens only when placing the notification mark
>>> but definitely not for each IO operation.
>> LOL, confusion is a pretty common state of mind for me!
>>
>>
>> I do get your point though and I am confusing the traversal with other
>>
>> operations. I think this answers the question I've been asking (maybe
>>
>> that wasn't obvious) about the reason for the traversal (ie. the reason
>>
>> to maintain a flag in the child).
>>
>>
>> While I have looked at the code here I haven't absorbed it and I
>>
>> definitely don't understand it, your continued patience is appreciated
>>
>> and will be beneficial when I get time to look at it a bit closer. I
>>
>> do still need to use a notifications mechanism to match up with Miklos's
>>
>> statmount implementation to get the full benefit of that in user space,
>>
>> if I ever get a chance to work on that again.
>>
>>
>> So it sounds like it would be worth while considering a traversal that's
>>
>> based on taking a reference on each dentry rather than a spinlock for
>>
>> the duration. It would be tricky though, for obvious reasons, like
>>
>> children added during the traversal, added overhead of getting the next
>>
>> entry reference, etc.
> Didn't look closely, but it feels like RCU traversal should be
> possible if entries are added to the tail, or to the END_OF_POSITIVE
> location.
>
> When we discussed the "negavites at tail" at LSFMM
> it was said that managing the transitions positive<->negative
> would be challenging, but I don't know that anyone tried to look closer at this.
I guess that should be straight forward as long as it's done at the point of
transition except if it's done by a filesystem instead of the VFS (maybe
require
a helper be used ...). Might be a bit harder for dentries that don't
transition
(ie. ENOENT lookups that start out and stay negative) might escape the
needed
handling.
>
> At least for fsnotify, positive->negative transition is not a problem
> w.r.t skipping entry and observing entry twice during positive iteration.
>
> If negative->positive transitions inserts at END_OF_POSITIVE
> location, then should be fine as well?
>
> Iterators that need to iterate all children can do this under lock.
Only catch there is the number of positive children might be large as well.
>
> Does that make sense?
Yep, the notion of a cursor is a good idea.
Nevertheless the challenge is to identify dentries that should be discarded
rather than kept at final dput() in addition to what we already have in
dout()
but there doesn't seem to be anything sensible to add to those checks.
On a different note another possibility to identify candidates to discard on
traversals might be a ttl, basically an extension of the referenced
flag. The
dentry d_time field could be used for that but only for negative
dentries since,
IIRC, nfs uses that dentry field.
But now I'm not sure I'm making sense as a couple of your comments sound
like
they refer to a discussion I'm not aware of, ;)
Ian
^ permalink raw reply
* Re: [PATCH net-next v3 01/14] virtchnl: create 'include/linux/intel' and move necessary header files
From: Jakub Kicinski @ 2026-05-21 0:52 UTC (permalink / raw)
To: Tony Nguyen
Cc: davem, pabeni, edumazet, andrew+netdev, netdev, larysa.zaremba,
przemyslaw.kitszel, aleksander.lobakin, sridhar.samudrala,
anjali.singhai, michal.swiatkowski, maciej.fijalkowski,
emil.s.tantilov, madhu.chittim, joshua.a.hay, jacob.e.keller,
jayaprakash.shanmugam, jiri, horms, corbet, richardcochran,
linux-doc, tatyana.e.nikolova, krzysztof.czurylo, jgg, leon,
linux-rdma, Samuel Salin, Aleksandr Loktionov
In-Reply-To: <20260515224443.2772147-2-anthony.l.nguyen@intel.com>
On Fri, 15 May 2026 15:44:25 -0700 Tony Nguyen wrote:
> include/linux/intel is vacant
I don't see any other vendor directory under include/linux
and TBH I don't want to be the maintainer making a precedent
for this sort of stuff. include/net/intel is a better choice.
Or rather, at least its in "our" section of the tree so nobody
will complain.
^ permalink raw reply
* Re: [RFC PATCH 3/5] mm/damon/core: floor effective quota size at minimum region size
From: SeongJae Park @ 2026-05-21 0:36 UTC (permalink / raw)
To: Ravi Jonnalagadda
Cc: SeongJae Park, damon, linux-mm, linux-kernel, linux-doc, akpm,
corbet, bijan311, ajayjoshi, honggyu.kim, yunjeong.mun
In-Reply-To: <CALa+Y14AKLXSP8HhOMQomXczok-BS7aderfj_tYG9qdS9bKgvg@mail.gmail.com>
On Wed, 20 May 2026 11:37:50 -0700 Ravi Jonnalagadda <ravis.opensrc@gmail.com> wrote:
> On Sun, May 17, 2026 at 11:47 AM SeongJae Park <sj@kernel.org> wrote:
> >
> > On Sat, 16 May 2026 14:03:55 -0700 Ravi Jonnalagadda <ravis.opensrc@gmail.com> wrote:
[...]
> Dropping patches 1 and 3.
No worry, thank you for clarifying the all details!
>
> Patches 2, 4, and 5 are independent of this scaffolding; I'll
> reply on each thread separately with the relevant context.
Sure, let's keep the discussion go on :)
>
> Thanks again for the careful review.
Thank you for sharing patches!
Thanks,
SJ
[...[
^ permalink raw reply
* Re: [RFC PATCH 0/7] mm/damon: hardware-sampled access reports + AMD IBS Op example
From: SeongJae Park @ 2026-05-21 0:32 UTC (permalink / raw)
To: Ravi Jonnalagadda
Cc: SeongJae Park, damon, linux-mm, linux-kernel, linux-doc, akpm,
corbet, bijan311, ajayjoshi, honggyu.kim, yunjeong.mun, bharata,
Akinobu Mita
In-Reply-To: <CALa+Y15fsgb1SU1xBq6BHsgk9QSJr39L5CZSCahpRu7udGuwKw@mail.gmail.com>
On Wed, 20 May 2026 12:01:43 -0700 Ravi Jonnalagadda <ravis.opensrc@gmail.com> wrote:
> On Mon, May 18, 2026 at 11:19 PM SeongJae Park <sj@kernel.org> wrote:
> >
> > + Akinobu
> >
> > Hello Ravi,
> >
> > On Sat, 16 May 2026 15:34:25 -0700 Ravi Jonnalagadda <ravis.opensrc@gmail.com> wrote:
> >
> > > Hi all,
> > >
> > > This is an RFC, not for merge. The series exercises and validates
> > > damon_report_access() -- the consumer API SeongJae introduced in [1]
> > > -- as a substrate for ingesting access reports from hardware-sampling
> > > sources. The series includes one worked-example backend, an AMD IBS
> > > Op module (damon_ibs.ko), that runs on Zen 3+ silicon via the
> > > existing perf event subsystem.
> >
> > Thank you for sharing this great RFC series!
> >
> > [...]
> > > Why a hardware-source primitive complements existing primitives
> > > ===============================================================
> > [...]
> > > Both primitives produce a view of hotness that converges to the
> > > true distribution over the aggregation interval. For systems where
> > > the address space is small relative to the aggregation rate, this is
> > > the right tool. On large heterogeneous-memory systems with goal-
> > > driven schemes asking the closed-loop tuner to converge on a target
> > > distribution, a complementary lower-latency view of accesses can
> > > tighten the loop -- reducing the time DAMON's nr_accesses takes to
> > > reflect the workload's actual access distribution, which in turn
> > > reduces ramp duration and oscillation amplitude during convergence
> > > of goal-driven schemes.
> > >
> > > A hardware-sampling primitive provides this complementary view:
> > > hardware retirement records each access at its natural event rate,
> > > with a physical address per sample, independent of TLB state and
> > > independent of the unmap/fault path.
> >
> > Yes, I fully agree. Different multiple access check primitives have different
> > characteristics.
> >
> > [...]
> >
> > > Demonstration
> > > =============
> > [...]
> > > In both regimes, convergence to target is quick, and the workload's
> > > measured DRAM share then holds within 1.3 percentage points of
> > > target with standard deviation under 1.3 percentage points, sustained
> > > over runs of 15-30 minutes per target.
> >
> > I understand this demonstration shows your AMD IBS-based version of DAMON is
> > functioning as expected. Thank you for sharing this!
> >
> > [...]
> > > What's in this series
> > > =====================
> > >
> > > Patch 1. mm/damon/core: refcount ops owner module to prevent
> > > rmmod UAF
> > > Patch 2. mm/damon/paddr: export damon_pa_* ops for IBS module
> > > Patch 3. mm/damon/core: replace mutex-protected report buffer
> > > with per-CPU lockless ring
> > > Patch 4. mm/damon/core: flat-array snapshot + bsearch in ring-
> > > drain loop
> > > Patch 5. mm/damon: add sysfs binding and dispatch hookup for
> > > paddr_ibs operations
> > > Patch 6. mm/damon/core: accept paddr_ibs in node_eligible_mem_bp
> > > ops check
> > > Patch 7. mm/damon/damon_ibs: add AMD IBS-based access sampling
> > > backend
> > >
> > > Patches 1, 3, and 4 are general infrastructure that benefits any
> > > consumer of damon_report_access(). Patches 2, 5, 6, and 7 are the
> > > worked-example backend (paddr_ibs ops, sysfs binding, IBS module).
> >
> > I didn't read the detailed code of each patch. But my high level understanding
> > is as below.
> >
> > Patches 1 and 2 are needed for supporting loadable module-based DAMON operation
> > sets (access sampling backend).
> >
> > Patch 3 is needed for supporting access check primitives that can provide the
> > access information in only nmi context. It can also speedup the access
> > reporting in general, though.
> >
> > Patch 4 makes DAMON's internal reported access information retrieval faster, so
> > will help any reporting-based DAMON operation set use case.
> >
> > Patches 5-7 are required for only the IBS-based DAMON operations set
> > (paddr_ibs).
> >
> > So I agree patch 4 is a general infrastructure improvement that benefits
> > multiple use cases.
> >
> > Patch 3 is also arguably general infrastructure improvement, as it will make
> > the reporting faster in general.
> >
> > Patch 1 is not technically coupled with paddr_ibs, and will be needed for
> > general loadable module based access check primitives. But, should we support
> > lodable modules? If so, why?
> >
> > Patch 2 is also not technically coupled with paddr_ibs, to my understanding, so
> > should be categorized together with patch 1? In other words, if we agree we
> > should support lodable modules based DAMON operation sets, this should be
> > useful for not only paddr_ibs but more general cases.
> >
> > Correct me if I'm wrong.
> >
> > >
> > >
> > > Patches worth folding into damon/next
> > > =====================================
> > >
> > > Patches 1, 3, and 4 are not specific to IBS or to this RFC's
> > > backend. Each is preparatory infrastructure that any consumer of
> > > damon_report_access() will need:
> > >
> > > - Patch 1 (refcount ops owner) -- any modular ops set, including
> > > out-of-tree backends, needs clean module unload to avoid UAF
> > > on damon_unregister_ops.
> > > - Patch 3 (per-CPU lockless ring) -- damon_report_access() cannot
> > > be called from NMI context with the current mutex-protected
> > > buffer. Hardware samplers all need NMI-safe submission.
> > > - Patch 4 (flat-array snapshot + bsearch drain) -- the linear-
> > > scan drain is O(reports x regions) and exceeds the sample
> > > interval at high-CPU x large-region products. Bsearch brings
> > > it to O(reports x log regions).
> > >
> > > If these belong directly on damon/next as preparatory patches for
> > > damon_report_access() rather than living inside an IBS-specific
> > > track, we are happy to rebase and resend them that way.
> >
> > So I'm bit unsure about patch 1. If we don't have a plan to support lodable
> > modules based DAMON operations set, we might not need it for now.
> >
> > For patches 3 and 4, I agree those will be useful in general. Nonetheless, I'd
> > slightly prefer to do that optimizations at the later part of the long term
> > project.
> >
> > >
> > >
> > > Relation to prior and ongoing work
> > > ==================================
> > >
> > > The IBS sampling pattern in patch 7 -- attr.config=0 to use IBS Op
> > > default config, dc_phy_addr_valid filter, NMI-safe sample submission
> > > -- is derived from concepts in Bharata B Rao's pghot RFC v5 [3].
> > > The attribution header is in mm/damon/damon_ibs.c and the patch
> > > carries a Suggested-by: trailer.
> > >
> > > Bharata's pghot v7 [4] introduces a different IBS driver targeting
> > > the new IBS Memory Profiler (IBS-MProf) facility, which Bharata
> > > describes as a facility "that will be present in future AMD
> > > processors" -- a separate IBS instance from the one this RFC's
> > > backend uses. This version of driver based out of v5 [3] is an
> > > example of how DAMON can be benefited from AMD IBS Hardware
> > > source and validates importance of IBS information indepedently.
> > > It is not meant to be merged in the current form.
> > > @Bharata if you see a path where IBS samples can be consumed
> > > by DAMON at some point, will be happy to collaborate.
> > >
> > > Akinobu Mita's perf-event-based access-check RFC [5] explores a
> > > configurable perf-event-driven access source for DAMON. IBS has
> > > vendor-specific MSR setup beyond what perf_event_attr alone
> > > expresses (e.g. dc_phy_addr_valid filtering on the produced sample,
> > > not on the perf attr), so the IBS path here appears complementary
> > > to [5] -- operators choose based on whether their hardware sampler
> > > fits stock perf or needs additional kernel-side setup.
> >
> > So apparently there are multiple approaches to develop and use h/w-based access
> > monitoring. Akinobu and you are trying to do that using DAMON as the frontend,
> > and already made the working prototypes. There were more people who showed
> > interest and will to contribute to this project other than you, too. I 100%
> > agree h/w-based access monitoring can be useful, and I of course thinking using
> > DAMON as the fronend is the right approach. I'm all for making this
> > upstreamed.
> >
> > I was therefore spending time on thinking about in what long-term maintainable
> > shape this capability can successfully be upstreamed. I suggested
> > damon_report_access() as the internal interface between DAMON and the h/w-based
> > access check primitives, and apparently we all (I, Ravi and Akinobu in this
> > context) agreed. Akinobu thankfully revisioned his implementation based on
> > damon_report_access() interface. Ravi also implemented this RFC based on the
> > interface.
> >
> > After making the consensus with Akinobu, I was taking time on the user space
> > interface. When I was discussing with Akinobu, my idea was extending the user
> > interface for the page faults based monitoring v3 [1]. But, recently I decided
> > to make this more general, so proposed data attributes monitoring extension [2]
> > at LSFMMBPF. The patch series for the initial change [3] is merged into mm-new
> > for more testing, today. The cover letter of the patch series is also sharing
> > how it will be extended for h/w based access monitoring in long term.
> >
> > I of course want us to go in this direction. I believe you already had chances
> > to take a look on the long term plan and didn't make some voice because you
> > don't strongly disagree about the plan. If not, please make a voice.
> >
> Hi SJ,
>
> One layering question I'd like to flag before the plan is written,
> since it affects how this RFC's substrate slots in:
To my understanding, this RFC reuses the damon_report_access() infrastructure
that shared with the per-CPUs/threds/writes/reads monitoring series [1]. My
plan at the moment is to keep using it. So from high level view, I think the
final picture would be not really different from this RFC.
>
> In [3], .apply_probes is a periodic per-region classifier driven
> from kdamond_fn after .check_accesses, in process context, that
> applies a (folio -> bool) predicate to each region's sampling_addr
> and accounts the results in r->probe_hits[]. damon_report_access()
> on the other hand is a per-event delivery callback into a per-CPU
> buffer, called from the access source (NMI for IBS / PEBS / SPE,
> process context for page-fault-based sources). These appear to
> me to sit at different layers - delivery vs. classification.
>
> The reason I want to confirm this: NMI context for HW samplers
> precludes the operations .apply_probes can do today (no mutex, no
> kmalloc, no sleep, no folio lookup that touches pte_lock). And
> the data shape is inverted - .apply_probes asks "does region R's
> sampling_addr have attribute A?", evaluated on the kdamond-chosen
> address; an HW sample announces "PA Y was accessed at retirement
> time T", arriving asynchronously and needing to find the region
> it falls into. If access events end up routed through
> .apply_probes in the long-term plan, the IBS / PEBS / SPE
> backends would each need a deferral path under it (per-CPU ring
> for NMI-safe submission, region mapping at drain time).
It will not routed through .apply_probes, but work in a way similar to the
damon_report_access() based design. That is, each (sampled) access event will
syncronously call damon_report_access() with the access information. The
information is stored in DAMON's internal data structure. The information will
contain the access destination address, the accessor CPU/thread, whether it was
reads or writes etc, if available.
Then kdamond will read the reports in the data structure once per sampling
interval and assess if each region got accessed or not since the last sampling
interval.
So my plan is not to reuse .apply_probes, but in terms of who consumes the
information, it is not very different. Accessor will produce the information
(report), and kdamond will consume those. But this is how
damon_report_access() based structure is working on, so my understanding is
that your RFC is also not very different. Am I missing something, or do you
have any concern on this structure?
>
> Happy to be wrong here if you see a unified shape that handles
> both - just want to surface the constraint before the plan is
> written.
>
> On the loadable-module question for patches 1 and 2: agreed it's a
> genuinely open architectural call, not just a paddr_ibs convenience.
>
> - paddr_ibs (this RFC) targets the existing IBS Op facility on
> Zen 3+ silicon via the perf event subsystem and uses a
> vendor-specific
> overflow-handler filter that perf_event_attr cannot express
> (dc_phy_addr_valid in IBS_OP_DATA3). Bharata's pghot v7
> [pghot-v7] introduces a separate IBS driver targeting the new
> IBS-MProf
> facility on future AMD silicon via direct MSR programming -
> not perf at all. These are two AMD-specific HW samplers with
> non-overlapping silicon coverage and non-overlapping kernel
> paths. A distro shipping a single kernel image to a fleet
> with mixed silicon needs runtime-selectable backends, which
> obj=y can't do across exclusive `depends on` chains.
> - Akinobu's perf-event RFC v3 [akinobu-v3] is a useful contrast:
> it stays builtin because it's a generic configurable
> perf_event_attr passthrough, no vendor-specific code in the
> overflow handler. The tristate case is specifically for the
> backends that need vendor logic outside perf_event_attr
> (IBS dc_phy_addr_valid, future ARM SPE record-format
> handling, future Intel PEBS DLA quirks if they need
> kernel-side filtering beyond what perf delivers).
I'm still not familiar with IBS and perf events. Please bear in mind with me.
My understanding is that there are vendor-specific knobs for IBS that perf
event is not supporting. So far, that makes sense. And are you saying that
you have to write paddr_ibs as a loadable module if you want to support the
vendor-specific knobs? If I'm understanding you correctly could you further
share why it cannot be done as a builtin module?
[1] https://lore.kernel.org/20251208062943.68824-1-sj@kernel.org
Thanks,
SJ
[...]
^ permalink raw reply
* [PATCH v2 6/7] docs: net: arcnet: remove outdated/irrelevant information; improve style
From: Ethan Nelson-Moore @ 2026-05-21 0:16 UTC (permalink / raw)
To: netdev, linux-doc
Cc: Michael Grzeschik, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Ethan Nelson-Moore, Simon Horman,
Jonathan Corbet, Shuah Khan
In-Reply-To: <20260521001631.45434-1-enelsonmoore@gmail.com>
The ARCnet documentation contains a lot of outdated and irrelevant
information (such as changes in decades-old driver versions and
messages from a former maintainer) and has some writing style issues.
Remove this unnecessary information and improve the writing style. Also
remove links to pages that no longer exist.
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
Documentation/networking/arcnet-hardware.rst | 36 +++++-----
Documentation/networking/arcnet.rst | 69 +++-----------------
2 files changed, 26 insertions(+), 79 deletions(-)
diff --git a/Documentation/networking/arcnet-hardware.rst b/Documentation/networking/arcnet-hardware.rst
index 17450e8e6ca7..37c016cee353 100644
--- a/Documentation/networking/arcnet-hardware.rst
+++ b/Documentation/networking/arcnet-hardware.rst
@@ -8,10 +8,8 @@ ARCnet Hardware
.. note::
- 1) This file is a supplement to arcnet.rst. Please read that for general
- driver configuration help.
- 2) This file is no longer Linux-specific. It should probably be moved out
- of the kernel sources. Ideas?
+ This file is a supplement to arcnet.rst. Please read that for general
+ driver configuration help.
Because so many people (myself included) seem to have obtained ARCnet cards
without manuals, this file contains a quick introduction to ARCnet hardware
@@ -134,13 +132,11 @@ And now to the cabling. What you can connect together:
network.
2. A card to a passive hub. Remember that all unused connectors on the hub
- must be properly terminated with 93 Ohm (or something else if you don't
- have the right ones) terminators.
+ must be properly terminated with 93 Ohm terminators (or something else if you
+ don't have the right ones), although the network may work without
+ terminators.
- (Avery's note: oops, I didn't know that. Mine (TV cable) works
- anyway, though.)
-
-3. A card to an active hub. Here is no need to terminate the unused
+3. A card to an active hub. Here there is no need to terminate the unused
connectors except some kind of aesthetic feeling. But, there may not be
more than eleven active hubs between any two computers. That of course
doesn't limit the number of active hubs on the network.
@@ -150,7 +146,7 @@ And now to the cabling. What you can connect together:
5. An active hub to passive hub.
Remember that you cannot connect two passive hubs together. The power loss
-implied by such a connection is too high for the net to operate reliably.
+implied by such a connection is too high for the network to operate reliably.
An example of a typical ARCnet network::
@@ -163,8 +159,8 @@ An example of a typical ARCnet network::
|
S
-The BUS topology is very similar to the one used by Ethernet. The only
-difference is in cable and terminators: they should be 93 Ohm. Ethernet
+The BUS topology is very similar to the one used by 10BASE2 Ethernet. The only
+difference is in cable and terminators: they should be 93 Ohm. 10BASE2 Ethernet
uses 50 Ohm impedance. You use T connectors to put the computers on a single
line of cable, the bus. You have to put terminators at both ends of the
cable. A typical BUS ARCnet network looks like::
@@ -177,7 +173,7 @@ cable. A typical BUS ARCnet network looks like::
T - T connector
But that is not all! The two types can be connected together. According to
-the official documentation the only way of connecting them is using an active
+the official documentation, the only way of connecting them is using an active
hub::
A------T------T------TR
@@ -186,7 +182,7 @@ hub::
|
S
-The official docs also state that you can use STAR cards at the ends of
+The official docs also state that you can use STAR cards at the ends of a
BUS network in place of a BUS card and a terminator::
S------T------T------S
@@ -211,7 +207,7 @@ example::
| | S------T----H---S |
S S B R S
-A basically different cabling scheme is used with Twisted Pair cabling. Each
+A completely different cabling scheme is used with Twisted Pair cabling. Each
of the TP cards has two RJ (phone-cord style) connectors. The cards are
then daisy-chained together using a cable connecting every two neighboring
cards. The ends are terminated with RJ 93 Ohm terminators which plug into
@@ -292,11 +288,13 @@ Setting the Jumpers
Make sure you set ETS1 and ETS2 to the SAME VALUE for all cards on your
network.
-Also, on many cards (not mine, though) there are red and green LED's.
-Vojtech Pavlik <vojtech@suse.cz> tells me this is what they mean:
+LED Indicators
+==============
+
+Many cards have red and green LEDs, which have the following meanings:
=============== =============== =====================================
- GREEN RED Status
+ Green Red Status
=============== =============== =====================================
OFF OFF Power off
OFF Short flashes Cabling problems (broken cable or not
diff --git a/Documentation/networking/arcnet.rst b/Documentation/networking/arcnet.rst
index ce1b009bef96..4e541aa44aec 100644
--- a/Documentation/networking/arcnet.rst
+++ b/Documentation/networking/arcnet.rst
@@ -12,26 +12,6 @@ ARCnet
and cabling information if you're like many of us and didn't happen to get a
manual with your ARCnet card.
-Since no one seems to listen to me otherwise, perhaps a poem will get your
-attention::
-
- This driver's getting fat and beefy,
- But my cat is still named Fifi.
-
-Hmm, I think I'm allowed to call that a poem, even though it's only two
-lines. Hey, I'm in Computer Science, not English. Give me a break.
-
-The point is: I REALLY REALLY REALLY REALLY REALLY want to hear from you if
-you test this and get it working. Or if you don't. Or anything.
-
-ARCnet 0.32 ALPHA first made it into the Linux kernel 1.1.80 - this was
-nice, but after that even FEWER people started writing to me because they
-didn't even have to install the patch. <sigh>
-
-Come on, be a sport! Send me a success report!
-
-(hey, that was even better than my original poem... this is getting bad!)
-
----
These are the ARCnet drivers for Linux.
@@ -62,31 +42,9 @@ netdev@vger.kernel.org and make sure to Cc: maintainer listed in
Other Drivers and Info
----------------------
-You can try my ARCNET page on the World Wide Web at:
-
- http://www.qis.net/~jschmitz/arcnet/
-
-Also, SMC (one of the companies that makes ARCnet cards) has a WWW site you
-might be interested in, which includes several drivers for various cards
-including ARCnet. Try:
-
- http://www.smc.com/
-
-Performance Technologies makes various network software that supports
-ARCnet:
-
- http://www.perftech.com/ or ftp to ftp.perftech.com.
-
-Novell makes a networking stack for DOS which includes ARCnet drivers. Try
-FTPing to ftp.novell.com.
-
-You can get the Crynwr packet driver collection (including arcether.com, the
-one you'll want to use with ARCnet cards) from
-oak.oakland.edu:/simtel/msdos/pktdrvr. It won't work perfectly on a 386+
-without patches, though, and also doesn't like several cards. Fixed
-versions are available on my WWW page, or via e-mail if you don't have WWW
-access.
+You can try JoAnne Schmitz's ARCNET page on the World Wide Web at:
+ https://www.qis.net/~jschmitz/arcnet/
Supported Hardware
@@ -162,9 +120,8 @@ LAN Manager and Windows for Workgroups:
are incompatible with the Internet standard. They try to pretend
the cards are Ethernet, and confuse everyone else on the network.
- However, v2.00 and higher of the Linux ARCnet driver supports this
- protocol via the 'arc0e' device. See the section on "Multiprotocol
- Support" for more information.
+ The Linux ARCnet driver supports this protocol via the 'arc0e' device.
+ See the section on "Multiprotocol Support" for more information.
Using the freeware Samba server and clients for Linux, you can now
interface quite nicely with TCP/IP-based WfWg or Lan Manager
@@ -199,7 +156,7 @@ NetBSD/AmiTCP:
Using Multiprotocol ARCnet
--------------------------
-The ARCnet driver v2.10 ALPHA supports three protocols, each on its own
+The ARCnet driver supports three protocols, each on its own
"virtual network device":
====== ===============================================================
@@ -391,7 +348,7 @@ can set up your network then:
It works: what now?
-------------------
-Send mail following :ref:`arcnet-netdev`. Describe your setup, preferably
+:ref:`Send an email to netdev <arcnet-netdev>`. Describe your setup, preferably
including driver version, kernel version, ARCnet card model, CPU type, number
of systems on your network, and list of software in use.
@@ -435,16 +392,8 @@ You can change the debug level without recompiling the kernel by typing::
where "xxx" is the debug level you want. For example, "metric 1015" would put
you at debug level 15. Debug level 7 is currently the default.
-Note that the debug level is (starting with v1.90 ALPHA) a binary
-combination of different debug flags; so debug level 7 is really 1+2+4 or
-D_NORMAL+D_EXTRA+D_INIT. To include D_DURING, you would add 16 to this,
-resulting in debug level 23.
+Note that the debug level is a binary combination of different debug flags;
+debug level 7 is really 1+2+4 or D_NORMAL+D_EXTRA+D_INIT. To include D_DURING,
+you would add 16 to this, resulting in debug level 23.
If you don't understand that, you probably don't want to know anyway.
-E-mail me about your problem.
-
-
-I want to send money: what now?
--------------------------------
-
-Go take a nap or something. You'll feel better in the morning.
--
2.43.0
^ permalink raw reply related
* [PATCH v2 3/7] net: arcnet: remove ISA and PCMCIA support; modernize documentation
From: Ethan Nelson-Moore @ 2026-05-21 0:16 UTC (permalink / raw)
To: netdev, linux-doc, linux-mips
Cc: Michael Grzeschik, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Ethan Nelson-Moore, Jonathan Corbet,
Shuah Khan, Simon Horman, Thomas Bogendoerfer, Theodore Ts'o
In-Reply-To: <20260521001631.45434-1-enelsonmoore@gmail.com>
While ARCnet is still used in industrial environments, and cards are
still manufactured, it is unlikely anyone is still using it with ISA
and PCMCIA cards. Reduce future maintenance burden by removing all ISA
and PCMCIA ARCnet drivers and documentation related to them. Update
instructions for loading modules and passing parameters to work on
modern kernels and with the com20020_pci driver. Also take the
opportunity to document the rest of the module parameters, correct a
file path in Documentation/networking/arcnet.rst, and change a
reference to /etc/rc.inet1, which no longer exists, to refer to
ifconfig.
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
.../admin-guide/kernel-parameters.txt | 14 -
Documentation/networking/arcnet-hardware.rst | 2943 +----------------
Documentation/networking/arcnet.rst | 166 +-
arch/mips/configs/mtx1_defconfig | 4 -
drivers/net/arcnet/Kconfig | 52 +-
drivers/net/arcnet/Makefile | 5 -
drivers/net/arcnet/arc-rimi.c | 386 ---
drivers/net/arcnet/com20020-isa.c | 230 --
drivers/net/arcnet/com20020.c | 4 +-
drivers/net/arcnet/com20020_cs.c | 330 --
drivers/net/arcnet/com90io.c | 427 ---
drivers/net/arcnet/com90xx.c | 716 ----
12 files changed, 37 insertions(+), 5240 deletions(-)
delete mode 100644 drivers/net/arcnet/arc-rimi.c
delete mode 100644 drivers/net/arcnet/com20020-isa.c
delete mode 100644 drivers/net/arcnet/com20020_cs.c
delete mode 100644 drivers/net/arcnet/com90io.c
delete mode 100644 drivers/net/arcnet/com90xx.c
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 7834ee927310..063c11ca33e5 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -558,9 +558,6 @@ Kernel parameters
1 -- enable.
Default value is set via kernel config option.
- arcrimi= [HW,NET] ARCnet - "RIM I" (entirely mem-mapped) cards
- Format: <io>,<irq>,<nodeID>
-
arm64.no32bit_el0 [ARM64] Unconditionally disable the execution of
32 bit applications.
@@ -911,17 +908,6 @@ Kernel parameters
Sets the size of memory pool for coherent, atomic dma
allocations, by default set to 256K.
- com20020= [HW,NET] ARCnet - COM20020 chipset
- Format:
- <io>[,<irq>[,<nodeID>[,<backplane>[,<ckp>[,<timeout>]]]]]
-
- com90io= [HW,NET] ARCnet - COM90xx chipset (IO-mapped buffers)
- Format: <io>[,<irq>]
-
- com90xx= [HW,NET]
- ARCnet - COM90xx chipset (memory-mapped buffers)
- Format: <io>[,<irq>[,<memstart>]]
-
condev= [HW,S390] console device
conmode=
diff --git a/Documentation/networking/arcnet-hardware.rst b/Documentation/networking/arcnet-hardware.rst
index 20e5075d0d0e..17450e8e6ca7 100644
--- a/Documentation/networking/arcnet-hardware.rst
+++ b/Documentation/networking/arcnet-hardware.rst
@@ -14,10 +14,9 @@ ARCnet Hardware
of the kernel sources. Ideas?
Because so many people (myself included) seem to have obtained ARCnet cards
-without manuals, this file contains a quick introduction to ARCnet hardware,
-some cabling tips, and a listing of all jumper settings I can find. If you
-have any settings for your particular card, and/or any other information you
-have, do not hesitate to :ref:`email to netdev <arcnet-netdev>`.
+without manuals, this file contains a quick introduction to ARCnet hardware
+and some cabling tips. If you have any other information, do not hesitate to
+:ref:`send an email to netdev <arcnet-netdev>`.
Introduction to ARCnet
@@ -264,95 +263,13 @@ of a TP cable between two cards/hubs is 650 meters.
Setting the Jumpers
===================
-All ARCnet cards should have a total of four or five different settings:
-
- - the I/O address: this is the "port" your ARCnet card is on. Probed
- values in the Linux ARCnet driver are only from 0x200 through 0x3F0. (If
- your card has additional ones, which is possible, please tell me.) This
- should not be the same as any other device on your system. According to
- a doc I got from Novell, MS Windows prefers values of 0x300 or more,
- eating net connections on my system (at least) otherwise. My guess is
- this may be because, if your card is at 0x2E0, probing for a serial port
- at 0x2E8 will reset the card and probably mess things up royally.
-
- - Avery's favourite: 0x300.
-
- - the IRQ: on 8-bit cards, it might be 2 (9), 3, 4, 5, or 7.
- on 16-bit cards, it might be 2 (9), 3, 4, 5, 7, or 10-15.
-
- Make sure this is different from any other card on your system. Note
- that IRQ2 is the same as IRQ9, as far as Linux is concerned. You can
- "cat /proc/interrupts" for a somewhat complete list of which ones are in
- use at any given time. Here is a list of common usages from Vojtech
- Pavlik <vojtech@suse.cz>:
-
- ("Not on bus" means there is no way for a card to generate this
- interrupt)
-
- ====== =========================================================
- IRQ 0 Timer 0 (Not on bus)
- IRQ 1 Keyboard (Not on bus)
- IRQ 2 IRQ Controller 2 (Not on bus, nor does interrupt the CPU)
- IRQ 3 COM2
- IRQ 4 COM1
- IRQ 5 FREE (LPT2 if you have it; sometimes COM3; maybe PLIP)
- IRQ 6 Floppy disk controller
- IRQ 7 FREE (LPT1 if you don't use the polling driver; PLIP)
- IRQ 8 Realtime Clock Interrupt (Not on bus)
- IRQ 9 FREE (VGA vertical sync interrupt if enabled)
- IRQ 10 FREE
- IRQ 11 FREE
- IRQ 12 FREE
- IRQ 13 Numeric Coprocessor (Not on bus)
- IRQ 14 Fixed Disk Controller
- IRQ 15 FREE (Fixed Disk Controller 2 if you have it)
- ====== =========================================================
-
-
- .. note::
-
- IRQ 9 is used on some video cards for the "vertical retrace"
- interrupt. This interrupt would have been handy for things like
- video games, as it occurs exactly once per screen refresh, but
- unfortunately IBM cancelled this feature starting with the original
- VGA and thus many VGA/SVGA cards do not support it. For this
- reason, no modern software uses this interrupt and it can almost
- always be safely disabled, if your video card supports it at all.
-
- If your card for some reason CANNOT disable this IRQ (usually there
- is a jumper), one solution would be to clip the printed circuit
- contact on the board: it's the fourth contact from the left on the
- back side. I take no responsibility if you try this.
-
- - Avery's favourite: IRQ2 (actually IRQ9). Watch that VGA, though.
-
- - the memory address: Unlike most cards, ARCnets use "shared memory" for
- copying buffers around. Make SURE it doesn't conflict with any other
- used memory in your system!
-
- ::
-
- A0000 - VGA graphics memory (ok if you don't have VGA)
- B0000 - Monochrome text mode
- C0000 \ One of these is your VGA BIOS - usually C0000.
- E0000 /
- F0000 - System BIOS
-
- Anything less than 0xA0000 is, well, a BAD idea since it isn't above
- 640k.
-
- - Avery's favourite: 0xD0000
-
- - the station address: Every ARCnet card has its own "unique" network
- address from 0 to 255. Unlike Ethernet, you can set this address
- yourself with a jumper or switch (or on some cards, with special
- software). Since it's only 8 bits, you can only have 254 ARCnet cards
- on a network. DON'T use 0 or 255, since these are reserved (although
- neat stuff will probably happen if you DO use them). By the way, if you
- haven't already guessed, don't set this the same as any other ARCnet on
- your network!
-
- - Avery's favourite: 3 and 4. Not that it matters.
+ - Every ARCnet card has its own "unique" network address from 0 to 255.
+ Unlike Ethernet, you can set this address yourself with a jumper or switch
+ (or on some cards, with special software). Since it's only 8 bits, you can
+ only have 254 ARCnet cards on a network. DON'T use 0 or 255, since these
+ are reserved (although neat stuff will probably happen if you DO use them).
+ By the way, if you haven't already guessed, don't set this the same as any
+ other ARCnet device on your network!
- There may be ETS1 and ETS2 settings. These may or may not make a
difference on your card (many manuals call them "reserved"), but are
@@ -390,2843 +307,3 @@ Vojtech Pavlik <vojtech@suse.cz> tells me this is what they mean:
ON Long flashes Data transfer
ON OFF Never happens (maybe when wrong ID)
=============== =============== =====================================
-
-
-The following is all the specific information people have sent me about
-their own particular ARCnet cards. It is officially a mess, and contains
-huge amounts of duplicated information. I have no time to fix it. If you
-want to, PLEASE DO! Just send me a 'diff -u' of all your changes.
-
-The model # is listed right above specifics for that card, so you should be
-able to use your text viewer's "search" function to find the entry you want.
-If you don't KNOW what kind of card you have, try looking through the
-various diagrams to see if you can tell.
-
-If your model isn't listed and/or has different settings, PLEASE PLEASE
-tell me. I had to figure mine out without the manual, and it WASN'T FUN!
-
-Even if your ARCnet model isn't listed, but has the same jumpers as another
-model that is, please e-mail me to say so.
-
-Cards Listed in this file (in this order, mostly):
-
- =============== ======================= ====
- Manufacturer Model # Bits
- =============== ======================= ====
- SMC PC100 8
- SMC PC110 8
- SMC PC120 8
- SMC PC130 8
- SMC PC270E 8
- SMC PC500 16
- SMC PC500Longboard 16
- SMC PC550Longboard 16
- SMC PC600 16
- SMC PC710 8
- SMC? LCS-8830(-T) 8/16
- Puredata PDI507 8
- CNet Tech CN120-Series 8
- CNet Tech CN160-Series 16
- Lantech? UM9065L chipset 8
- Acer 5210-003 8
- Datapoint? LAN-ARC-8 8
- Topware TA-ARC/10 8
- Thomas-Conrad 500-6242-0097 REV A 8
- Waterloo? (C)1985 Waterloo Micro. 8
- No Name -- 8/16
- No Name Taiwan R.O.C? 8
- No Name Model 9058 8
- Tiara Tiara Lancard? 8
- =============== ======================= ====
-
-
-* SMC = Standard Microsystems Corp.
-* CNet Tech = CNet Technology, Inc.
-
-Unclassified Stuff
-==================
-
- - Please send any other information you can find.
-
- - And some other stuff (more info is welcome!)::
-
- From: root@ultraworld.xs4all.nl (Timo Hilbrink)
- To: apenwarr@foxnet.net (Avery Pennarun)
- Date: Wed, 26 Oct 1994 02:10:32 +0000 (GMT)
- Reply-To: timoh@xs4all.nl
-
- [...parts deleted...]
-
- About the jumpers: On my PC130 there is one more jumper, located near the
- cable-connector and it's for changing to star or bus topology;
- closed: star - open: bus
- On the PC500 are some more jumper-pins, one block labeled with RX,PDN,TXI
- and another with ALE,LA17,LA18,LA19 these are undocumented..
-
- [...more parts deleted...]
-
- --- CUT ---
-
-Standard Microsystems Corp (SMC)
-================================
-
-PC100, PC110, PC120, PC130 (8-bit cards) and PC500, PC600 (16-bit cards)
-------------------------------------------------------------------------
-
- - mainly from Avery Pennarun <apenwarr@worldvisions.ca>. Values depicted
- are from Avery's setup.
- - special thanks to Timo Hilbrink <timoh@xs4all.nl> for noting that PC120,
- 130, 500, and 600 all have the same switches as Avery's PC100.
- PC500/600 have several extra, undocumented pins though. (?)
- - PC110 settings were verified by Stephen A. Wood <saw@cebaf.gov>
- - Also, the JP- and S-numbers probably don't match your card exactly. Try
- to find jumpers/switches with the same number of settings - it's
- probably more reliable.
-
-::
-
- JP5 [|] : : : :
- (IRQ Setting) IRQ2 IRQ3 IRQ4 IRQ5 IRQ7
- Put exactly one jumper on exactly one set of pins.
-
-
- 1 2 3 4 5 6 7 8 9 10
- S1 /----------------------------------\
- (I/O and Memory | 1 1 * 0 0 0 0 * 1 1 0 1 |
- addresses) \----------------------------------/
- |--| |--------| |--------|
- (a) (b) (m)
-
- WARNING. It's very important when setting these which way
- you're holding the card, and which way you think is '1'!
-
- If you suspect that your settings are not being made
- correctly, try reversing the direction or inverting the
- switch positions.
-
- a: The first digit of the I/O address.
- Setting Value
- ------- -----
- 00 0
- 01 1
- 10 2
- 11 3
-
- b: The second digit of the I/O address.
- Setting Value
- ------- -----
- 0000 0
- 0001 1
- 0010 2
- ... ...
- 1110 E
- 1111 F
-
- The I/O address is in the form ab0. For example, if
- a is 0x2 and b is 0xE, the address will be 0x2E0.
-
- DO NOT SET THIS LESS THAN 0x200!!!!!
-
-
- m: The first digit of the memory address.
- Setting Value
- ------- -----
- 0000 0
- 0001 1
- 0010 2
- ... ...
- 1110 E
- 1111 F
-
- The memory address is in the form m0000. For example, if
- m is D, the address will be 0xD0000.
-
- DO NOT SET THIS TO C0000, F0000, OR LESS THAN A0000!
-
- 1 2 3 4 5 6 7 8
- S2 /--------------------------\
- (Station Address) | 1 1 0 0 0 0 0 0 |
- \--------------------------/
-
- Setting Value
- ------- -----
- 00000000 00
- 10000000 01
- 01000000 02
- ...
- 01111111 FE
- 11111111 FF
-
- Note that this is binary with the digits reversed!
-
- DO NOT SET THIS TO 0 OR 255 (0xFF)!
-
-
-PC130E/PC270E (8-bit cards)
----------------------------
-
- - from Juergen Seifert <seifert@htwm.de>
-
-This description has been written by Juergen Seifert <seifert@htwm.de>
-using information from the following Original SMC Manual
-
- "Configuration Guide for ARCNET(R)-PC130E/PC270 Network
- Controller Boards Pub. # 900.044A June, 1989"
-
-ARCNET is a registered trademark of the Datapoint Corporation
-SMC is a registered trademark of the Standard Microsystems Corporation
-
-The PC130E is an enhanced version of the PC130 board, is equipped with a
-standard BNC female connector for connection to RG-62/U coax cable.
-Since this board is designed both for point-to-point connection in star
-networks and for connection to bus networks, it is downwardly compatible
-with all the other standard boards designed for coax networks (that is,
-the PC120, PC110 and PC100 star topology boards and the PC220, PC210 and
-PC200 bus topology boards).
-
-The PC270E is an enhanced version of the PC260 board, is equipped with two
-modular RJ11-type jacks for connection to twisted pair wiring.
-It can be used in a star or a daisy-chained network.
-
-::
-
- 8 7 6 5 4 3 2 1
- ________________________________________________________________
- | | S1 | |
- | |_________________| |
- | Offs|Base |I/O Addr |
- | RAM Addr | ___|
- | ___ ___ CR3 |___|
- | | \/ | CR4 |___|
- | | PROM | ___|
- | | | N | | 8
- | | SOCKET | o | | 7
- | |________| d | | 6
- | ___________________ e | | 5
- | | | A | S | 4
- | |oo| EXT2 | | d | 2 | 3
- | |oo| EXT1 | SMC | d | | 2
- | |oo| ROM | 90C63 | r |___| 1
- | |oo| IRQ7 | | |o| _____|
- | |oo| IRQ5 | | |o| | J1 |
- | |oo| IRQ4 | | STAR |_____|
- | |oo| IRQ3 | | | J2 |
- | |oo| IRQ2 |___________________| |_____|
- |___ ______________|
- | |
- |_____________________________________________|
-
-Legend::
-
- SMC 90C63 ARCNET Controller / Transceiver /Logic
- S1 1-3: I/O Base Address Select
- 4-6: Memory Base Address Select
- 7-8: RAM Offset Select
- S2 1-8: Node ID Select
- EXT Extended Timeout Select
- ROM ROM Enable Select
- STAR Selected - Star Topology (PC130E only)
- Deselected - Bus Topology (PC130E only)
- CR3/CR4 Diagnostic LEDs
- J1 BNC RG62/U Connector (PC130E only)
- J1 6-position Telephone Jack (PC270E only)
- J2 6-position Telephone Jack (PC270E only)
-
-Setting one of the switches to Off/Open means "1", On/Closed means "0".
-
-
-Setting the Node ID
-^^^^^^^^^^^^^^^^^^^
-
-The eight switches in group S2 are used to set the node ID.
-These switches work in a way similar to the PC100-series cards; see that
-entry for more information.
-
-
-Setting the I/O Base Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The first three switches in switch group S1 are used to select one
-of eight possible I/O Base addresses using the following table::
-
-
- Switch | Hex I/O
- 1 2 3 | Address
- -------|--------
- 0 0 0 | 260
- 0 0 1 | 290
- 0 1 0 | 2E0 (Manufacturer's default)
- 0 1 1 | 2F0
- 1 0 0 | 300
- 1 0 1 | 350
- 1 1 0 | 380
- 1 1 1 | 3E0
-
-
-Setting the Base Memory (RAM) buffer Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The memory buffer requires 2K of a 16K block of RAM. The base of this
-16K block can be located in any of eight positions.
-Switches 4-6 of switch group S1 select the Base of the 16K block.
-Within that 16K address space, the buffer may be assigned any one of four
-positions, determined by the offset, switches 7 and 8 of group S1.
-
-::
-
- Switch | Hex RAM | Hex ROM
- 4 5 6 7 8 | Address | Address *)
- -----------|---------|-----------
- 0 0 0 0 0 | C0000 | C2000
- 0 0 0 0 1 | C0800 | C2000
- 0 0 0 1 0 | C1000 | C2000
- 0 0 0 1 1 | C1800 | C2000
- | |
- 0 0 1 0 0 | C4000 | C6000
- 0 0 1 0 1 | C4800 | C6000
- 0 0 1 1 0 | C5000 | C6000
- 0 0 1 1 1 | C5800 | C6000
- | |
- 0 1 0 0 0 | CC000 | CE000
- 0 1 0 0 1 | CC800 | CE000
- 0 1 0 1 0 | CD000 | CE000
- 0 1 0 1 1 | CD800 | CE000
- | |
- 0 1 1 0 0 | D0000 | D2000 (Manufacturer's default)
- 0 1 1 0 1 | D0800 | D2000
- 0 1 1 1 0 | D1000 | D2000
- 0 1 1 1 1 | D1800 | D2000
- | |
- 1 0 0 0 0 | D4000 | D6000
- 1 0 0 0 1 | D4800 | D6000
- 1 0 0 1 0 | D5000 | D6000
- 1 0 0 1 1 | D5800 | D6000
- | |
- 1 0 1 0 0 | D8000 | DA000
- 1 0 1 0 1 | D8800 | DA000
- 1 0 1 1 0 | D9000 | DA000
- 1 0 1 1 1 | D9800 | DA000
- | |
- 1 1 0 0 0 | DC000 | DE000
- 1 1 0 0 1 | DC800 | DE000
- 1 1 0 1 0 | DD000 | DE000
- 1 1 0 1 1 | DD800 | DE000
- | |
- 1 1 1 0 0 | E0000 | E2000
- 1 1 1 0 1 | E0800 | E2000
- 1 1 1 1 0 | E1000 | E2000
- 1 1 1 1 1 | E1800 | E2000
-
- *) To enable the 8K Boot PROM install the jumper ROM.
- The default is jumper ROM not installed.
-
-
-Setting the Timeouts and Interrupt
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The jumpers labeled EXT1 and EXT2 are used to determine the timeout
-parameters. These two jumpers are normally left open.
-
-To select a hardware interrupt level set one (only one!) of the jumpers
-IRQ2, IRQ3, IRQ4, IRQ5, IRQ7. The Manufacturer's default is IRQ2.
-
-
-Configuring the PC130E for Star or Bus Topology
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The single jumper labeled STAR is used to configure the PC130E board for
-star or bus topology.
-When the jumper is installed, the board may be used in a star network, when
-it is removed, the board can be used in a bus topology.
-
-
-Diagnostic LEDs
-^^^^^^^^^^^^^^^
-
-Two diagnostic LEDs are visible on the rear bracket of the board.
-The green LED monitors the network activity: the red one shows the
-board activity::
-
- Green | Status Red | Status
- -------|------------------- ---------|-------------------
- on | normal activity flash/on | data transfer
- blink | reconfiguration off | no data transfer;
- off | defective board or | incorrect memory or
- | node ID is zero | I/O address
-
-
-PC500/PC550 Longboard (16-bit cards)
-------------------------------------
-
- - from Juergen Seifert <seifert@htwm.de>
-
-
- .. note::
-
- There is another Version of the PC500 called Short Version, which
- is different in hard- and software! The most important differences
- are:
-
- - The long board has no Shared memory.
- - On the long board the selection of the interrupt is done by binary
- coded switch, on the short board directly by jumper.
-
-[Avery's note: pay special attention to that: the long board HAS NO SHARED
-MEMORY. This means the current Linux-ARCnet driver can't use these cards.
-I have obtained a PC500Longboard and will be doing some experiments on it in
-the future, but don't hold your breath. Thanks again to Juergen Seifert for
-his advice about this!]
-
-This description has been written by Juergen Seifert <seifert@htwm.de>
-using information from the following Original SMC Manual
-
- "Configuration Guide for SMC ARCNET-PC500/PC550
- Series Network Controller Boards Pub. # 900.033 Rev. A
- November, 1989"
-
-ARCNET is a registered trademark of the Datapoint Corporation
-SMC is a registered trademark of the Standard Microsystems Corporation
-
-The PC500 is equipped with a standard BNC female connector for connection
-to RG-62/U coax cable.
-The board is designed both for point-to-point connection in star networks
-and for connection to bus networks.
-
-The PC550 is equipped with two modular RJ11-type jacks for connection
-to twisted pair wiring.
-It can be used in a star or a daisy-chained (BUS) network.
-
-::
-
- 1
- 0 9 8 7 6 5 4 3 2 1 6 5 4 3 2 1
- ____________________________________________________________________
- < | SW1 | | SW2 | |
- > |_____________________| |_____________| |
- < IRQ |I/O Addr |
- > ___|
- < CR4 |___|
- > CR3 |___|
- < ___|
- > N | | 8
- < o | | 7
- > d | S | 6
- < e | W | 5
- > A | 3 | 4
- < d | | 3
- > d | | 2
- < r |___| 1
- > |o| _____|
- < |o| | J1 |
- > 3 1 JP6 |_____|
- < |o|o| JP2 | J2 |
- > |o|o| |_____|
- < 4 2__ ______________|
- > | | |
- <____| |_____________________________________________|
-
-Legend::
-
- SW1 1-6: I/O Base Address Select
- 7-10: Interrupt Select
- SW2 1-6: Reserved for Future Use
- SW3 1-8: Node ID Select
- JP2 1-4: Extended Timeout Select
- JP6 Selected - Star Topology (PC500 only)
- Deselected - Bus Topology (PC500 only)
- CR3 Green Monitors Network Activity
- CR4 Red Monitors Board Activity
- J1 BNC RG62/U Connector (PC500 only)
- J1 6-position Telephone Jack (PC550 only)
- J2 6-position Telephone Jack (PC550 only)
-
-Setting one of the switches to Off/Open means "1", On/Closed means "0".
-
-
-Setting the Node ID
-^^^^^^^^^^^^^^^^^^^
-
-The eight switches in group SW3 are used to set the node ID. Each node
-attached to the network must have an unique node ID which must be
-different from 0.
-Switch 1 serves as the least significant bit (LSB).
-
-The node ID is the sum of the values of all switches set to "1"
-These values are::
-
- Switch | Value
- -------|-------
- 1 | 1
- 2 | 2
- 3 | 4
- 4 | 8
- 5 | 16
- 6 | 32
- 7 | 64
- 8 | 128
-
-Some Examples::
-
- Switch | Hex | Decimal
- 8 7 6 5 4 3 2 1 | Node ID | Node ID
- ----------------|---------|---------
- 0 0 0 0 0 0 0 0 | not allowed
- 0 0 0 0 0 0 0 1 | 1 | 1
- 0 0 0 0 0 0 1 0 | 2 | 2
- 0 0 0 0 0 0 1 1 | 3 | 3
- . . . | |
- 0 1 0 1 0 1 0 1 | 55 | 85
- . . . | |
- 1 0 1 0 1 0 1 0 | AA | 170
- . . . | |
- 1 1 1 1 1 1 0 1 | FD | 253
- 1 1 1 1 1 1 1 0 | FE | 254
- 1 1 1 1 1 1 1 1 | FF | 255
-
-
-Setting the I/O Base Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The first six switches in switch group SW1 are used to select one
-of 32 possible I/O Base addresses using the following table::
-
- Switch | Hex I/O
- 6 5 4 3 2 1 | Address
- -------------|--------
- 0 1 0 0 0 0 | 200
- 0 1 0 0 0 1 | 210
- 0 1 0 0 1 0 | 220
- 0 1 0 0 1 1 | 230
- 0 1 0 1 0 0 | 240
- 0 1 0 1 0 1 | 250
- 0 1 0 1 1 0 | 260
- 0 1 0 1 1 1 | 270
- 0 1 1 0 0 0 | 280
- 0 1 1 0 0 1 | 290
- 0 1 1 0 1 0 | 2A0
- 0 1 1 0 1 1 | 2B0
- 0 1 1 1 0 0 | 2C0
- 0 1 1 1 0 1 | 2D0
- 0 1 1 1 1 0 | 2E0 (Manufacturer's default)
- 0 1 1 1 1 1 | 2F0
- 1 1 0 0 0 0 | 300
- 1 1 0 0 0 1 | 310
- 1 1 0 0 1 0 | 320
- 1 1 0 0 1 1 | 330
- 1 1 0 1 0 0 | 340
- 1 1 0 1 0 1 | 350
- 1 1 0 1 1 0 | 360
- 1 1 0 1 1 1 | 370
- 1 1 1 0 0 0 | 380
- 1 1 1 0 0 1 | 390
- 1 1 1 0 1 0 | 3A0
- 1 1 1 0 1 1 | 3B0
- 1 1 1 1 0 0 | 3C0
- 1 1 1 1 0 1 | 3D0
- 1 1 1 1 1 0 | 3E0
- 1 1 1 1 1 1 | 3F0
-
-
-Setting the Interrupt
-^^^^^^^^^^^^^^^^^^^^^
-
-Switches seven through ten of switch group SW1 are used to select the
-interrupt level. The interrupt level is binary coded, so selections
-from 0 to 15 would be possible, but only the following eight values will
-be supported: 3, 4, 5, 7, 9, 10, 11, 12.
-
-::
-
- Switch | IRQ
- 10 9 8 7 |
- ---------|--------
- 0 0 1 1 | 3
- 0 1 0 0 | 4
- 0 1 0 1 | 5
- 0 1 1 1 | 7
- 1 0 0 1 | 9 (=2) (default)
- 1 0 1 0 | 10
- 1 0 1 1 | 11
- 1 1 0 0 | 12
-
-
-Setting the Timeouts
-^^^^^^^^^^^^^^^^^^^^
-
-The two jumpers JP2 (1-4) are used to determine the timeout parameters.
-These two jumpers are normally left open.
-Refer to the COM9026 Data Sheet for alternate configurations.
-
-
-Configuring the PC500 for Star or Bus Topology
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The single jumper labeled JP6 is used to configure the PC500 board for
-star or bus topology.
-When the jumper is installed, the board may be used in a star network, when
-it is removed, the board can be used in a bus topology.
-
-
-Diagnostic LEDs
-^^^^^^^^^^^^^^^
-
-Two diagnostic LEDs are visible on the rear bracket of the board.
-The green LED monitors the network activity: the red one shows the
-board activity::
-
- Green | Status Red | Status
- -------|------------------- ---------|-------------------
- on | normal activity flash/on | data transfer
- blink | reconfiguration off | no data transfer;
- off | defective board or | incorrect memory or
- | node ID is zero | I/O address
-
-
-PC710 (8-bit card)
-------------------
-
- - from J.S. van Oosten <jvoosten@compiler.tdcnet.nl>
-
-Note: this data is gathered by experimenting and looking at info of other
-cards. However, I'm sure I got 99% of the settings right.
-
-The SMC710 card resembles the PC270 card, but is much more basic (i.e. no
-LEDs, RJ11 jacks, etc.) and 8 bit. Here's a little drawing::
-
- _______________________________________
- | +---------+ +---------+ |____
- | | S2 | | S1 | |
- | +---------+ +---------+ |
- | |
- | +===+ __ |
- | | R | | | X-tal ###___
- | | O | |__| ####__'|
- | | M | || ###
- | +===+ |
- | |
- | .. JP1 +----------+ |
- | .. | big chip | |
- | .. | 90C63 | |
- | .. | | |
- | .. +----------+ |
- ------- -----------
- |||||||||||||||||||||
-
-The row of jumpers at JP1 actually consists of 8 jumpers, (sometimes
-labelled) the same as on the PC270, from top to bottom: EXT2, EXT1, ROM,
-IRQ7, IRQ5, IRQ4, IRQ3, IRQ2 (gee, wonder what they would do? :-) )
-
-S1 and S2 perform the same function as on the PC270, only their numbers
-are swapped (S1 is the nodeaddress, S2 sets IO- and RAM-address).
-
-I know it works when connected to a PC110 type ARCnet board.
-
-
-*****************************************************************************
-
-Possibly SMC
-============
-
-LCS-8830(-T) (8 and 16-bit cards)
----------------------------------
-
- - from Mathias Katzer <mkatzer@HRZ.Uni-Bielefeld.DE>
- - Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl> says the
- LCS-8830 is slightly different from LCS-8830-T. These are 8 bit, BUS
- only (the JP0 jumper is hardwired), and BNC only.
-
-This is a LCS-8830-T made by SMC, I think ('SMC' only appears on one PLCC,
-nowhere else, not even on the few Xeroxed sheets from the manual).
-
-SMC ARCnet Board Type LCS-8830-T::
-
- ------------------------------------
- | |
- | JP3 88 8 JP2 |
- | ##### | \ |
- | ##### ET1 ET2 ###|
- | 8 ###|
- | U3 SW 1 JP0 ###| Phone Jacks
- | -- ###|
- | | | |
- | | | SW2 |
- | | | |
- | | | ##### |
- | -- ##### #### BNC Connector
- | ####
- | 888888 JP1 |
- | 234567 |
- -- -------
- |||||||||||||||||||||||||||
- --------------------------
-
-
- SW1: DIP-Switches for Station Address
- SW2: DIP-Switches for Memory Base and I/O Base addresses
-
- JP0: If closed, internal termination on (default open)
- JP1: IRQ Jumpers
- JP2: Boot-ROM enabled if closed
- JP3: Jumpers for response timeout
-
- U3: Boot-ROM Socket
-
-
- ET1 ET2 Response Time Idle Time Reconfiguration Time
-
- 78 86 840
- X 285 316 1680
- X 563 624 1680
- X X 1130 1237 1680
-
- (X means closed jumper)
-
- (DIP-Switch downwards means "0")
-
-The station address is binary-coded with SW1.
-
-The I/O base address is coded with DIP-Switches 6,7 and 8 of SW2:
-
-======== ========
-Switches Base
-678 Address
-======== ========
-000 260-26f
-100 290-29f
-010 2e0-2ef
-110 2f0-2ff
-001 300-30f
-101 350-35f
-011 380-38f
-111 3e0-3ef
-======== ========
-
-
-DIP Switches 1-5 of SW2 encode the RAM and ROM Address Range:
-
-======== ============= ================
-Switches RAM ROM
-12345 Address Range Address Range
-======== ============= ================
-00000 C:0000-C:07ff C:2000-C:3fff
-10000 C:0800-C:0fff
-01000 C:1000-C:17ff
-11000 C:1800-C:1fff
-00100 C:4000-C:47ff C:6000-C:7fff
-10100 C:4800-C:4fff
-01100 C:5000-C:57ff
-11100 C:5800-C:5fff
-00010 C:C000-C:C7ff C:E000-C:ffff
-10010 C:C800-C:Cfff
-01010 C:D000-C:D7ff
-11010 C:D800-C:Dfff
-00110 D:0000-D:07ff D:2000-D:3fff
-10110 D:0800-D:0fff
-01110 D:1000-D:17ff
-11110 D:1800-D:1fff
-00001 D:4000-D:47ff D:6000-D:7fff
-10001 D:4800-D:4fff
-01001 D:5000-D:57ff
-11001 D:5800-D:5fff
-00101 D:8000-D:87ff D:A000-D:bfff
-10101 D:8800-D:8fff
-01101 D:9000-D:97ff
-11101 D:9800-D:9fff
-00011 D:C000-D:c7ff D:E000-D:ffff
-10011 D:C800-D:cfff
-01011 D:D000-D:d7ff
-11011 D:D800-D:dfff
-00111 E:0000-E:07ff E:2000-E:3fff
-10111 E:0800-E:0fff
-01111 E:1000-E:17ff
-11111 E:1800-E:1fff
-======== ============= ================
-
-
-PureData Corp
-=============
-
-PDI507 (8-bit card)
---------------------
-
- - from Mark Rejhon <mdrejhon@magi.com> (slight modifications by Avery)
- - Avery's note: I think PDI508 cards (but definitely NOT PDI508Plus cards)
- are mostly the same as this. PDI508Plus cards appear to be mainly
- software-configured.
-
-Jumpers:
-
- There is a jumper array at the bottom of the card, near the edge
- connector. This array is labelled J1. They control the IRQs and
- something else. Put only one jumper on the IRQ pins.
-
- ETS1, ETS2 are for timing on very long distance networks. See the
- more general information near the top of this file.
-
- There is a J2 jumper on two pins. A jumper should be put on them,
- since it was already there when I got the card. I don't know what
- this jumper is for though.
-
- There is a two-jumper array for J3. I don't know what it is for,
- but there were already two jumpers on it when I got the card. It's
- a six pin grid in a two-by-three fashion. The jumpers were
- configured as follows::
-
- .-------.
- o | o o |
- :-------: ------> Accessible end of card with connectors
- o | o o | in this direction ------->
- `-------'
-
-Carl de Billy <CARL@carainfo.com> explains J3 and J4:
-
- J3 Diagram::
-
- .-------.
- o | o o |
- :-------: TWIST Technology
- o | o o |
- `-------'
- .-------.
- | o o | o
- :-------: COAX Technology
- | o o | o
- `-------'
-
- - If using coax cable in a bus topology the J4 jumper must be removed;
- place it on one pin.
-
- - If using bus topology with twisted pair wiring move the J3
- jumpers so they connect the middle pin and the pins closest to the RJ11
- Connectors. Also the J4 jumper must be removed; place it on one pin of
- J4 jumper for storage.
-
- - If using star topology with twisted pair wiring move the J3
- jumpers so they connect the middle pin and the pins closest to the RJ11
- connectors.
-
-
-DIP Switches:
-
- The DIP switches accessible on the accessible end of the card while
- it is installed, is used to set the ARCnet address. There are 8
- switches. Use an address from 1 to 254
-
- ========== =========================
- Switch No. ARCnet address
- 12345678
- ========== =========================
- 00000000 FF (Don't use this!)
- 00000001 FE
- 00000010 FD
- ...
- 11111101 2
- 11111110 1
- 11111111 0 (Don't use this!)
- ========== =========================
-
- There is another array of eight DIP switches at the top of the
- card. There are five labelled MS0-MS4 which seem to control the
- memory address, and another three labelled IO0-IO2 which seem to
- control the base I/O address of the card.
-
- This was difficult to test by trial and error, and the I/O addresses
- are in a weird order. This was tested by setting the DIP switches,
- rebooting the computer, and attempting to load ARCETHER at various
- addresses (mostly between 0x200 and 0x400). The address that caused
- the red transmit LED to blink, is the one that I thought works.
-
- Also, the address 0x3D0 seem to have a special meaning, since the
- ARCETHER packet driver loaded fine, but without the red LED
- blinking. I don't know what 0x3D0 is for though. I recommend using
- an address of 0x300 since Windows may not like addresses below
- 0x300.
-
- ============= ===========
- IO Switch No. I/O address
- 210
- ============= ===========
- 111 0x260
- 110 0x290
- 101 0x2E0
- 100 0x2F0
- 011 0x300
- 010 0x350
- 001 0x380
- 000 0x3E0
- ============= ===========
-
- The memory switches set a reserved address space of 0x1000 bytes
- (0x100 segment units, or 4k). For example if I set an address of
- 0xD000, it will use up addresses 0xD000 to 0xD100.
-
- The memory switches were tested by booting using QEMM386 stealth,
- and using LOADHI to see what address automatically became excluded
- from the upper memory regions, and then attempting to load ARCETHER
- using these addresses.
-
- I recommend using an ARCnet memory address of 0xD000, and putting
- the EMS page frame at 0xC000 while using QEMM stealth mode. That
- way, you get contiguous high memory from 0xD100 almost all the way
- the end of the megabyte.
-
- Memory Switch 0 (MS0) didn't seem to work properly when set to OFF
- on my card. It could be malfunctioning on my card. Experiment with
- it ON first, and if it doesn't work, set it to OFF. (It may be a
- modifier for the 0x200 bit?)
-
- ============= ============================================
- MS Switch No.
- 43210 Memory address
- ============= ============================================
- 00001 0xE100 (guessed - was not detected by QEMM)
- 00011 0xE000 (guessed - was not detected by QEMM)
- 00101 0xDD00
- 00111 0xDC00
- 01001 0xD900
- 01011 0xD800
- 01101 0xD500
- 01111 0xD400
- 10001 0xD100
- 10011 0xD000
- 10101 0xCD00
- 10111 0xCC00
- 11001 0xC900 (guessed - crashes tested system)
- 11011 0xC800 (guessed - crashes tested system)
- 11101 0xC500 (guessed - crashes tested system)
- 11111 0xC400 (guessed - crashes tested system)
- ============= ============================================
-
-CNet Technology Inc. (8-bit cards)
-==================================
-
-120 Series (8-bit cards)
-------------------------
- - from Juergen Seifert <seifert@htwm.de>
-
-This description has been written by Juergen Seifert <seifert@htwm.de>
-using information from the following Original CNet Manual
-
- "ARCNET USER'S MANUAL for
- CN120A
- CN120AB
- CN120TP
- CN120ST
- CN120SBT
- P/N:12-01-0007
- Revision 3.00"
-
-ARCNET is a registered trademark of the Datapoint Corporation
-
-- P/N 120A ARCNET 8 bit XT/AT Star
-- P/N 120AB ARCNET 8 bit XT/AT Bus
-- P/N 120TP ARCNET 8 bit XT/AT Twisted Pair
-- P/N 120ST ARCNET 8 bit XT/AT Star, Twisted Pair
-- P/N 120SBT ARCNET 8 bit XT/AT Star, Bus, Twisted Pair
-
-::
-
- __________________________________________________________________
- | |
- | ___|
- | LED |___|
- | ___|
- | N | | ID7
- | o | | ID6
- | d | S | ID5
- | e | W | ID4
- | ___________________ A | 2 | ID3
- | | | d | | ID2
- | | | 1 2 3 4 5 6 7 8 d | | ID1
- | | | _________________ r |___| ID0
- | | 90C65 || SW1 | ____|
- | JP 8 7 | ||_________________| | |
- | |o|o| JP1 | | | J2 |
- | |o|o| |oo| | | JP 1 1 1 | |
- | ______________ | | 0 1 2 |____|
- | | PROM | |___________________| |o|o|o| _____|
- | > SOCKET | JP 6 5 4 3 2 |o|o|o| | J1 |
- | |______________| |o|o|o|o|o| |o|o|o| |_____|
- |_____ |o|o|o|o|o| ______________|
- | |
- |_____________________________________________|
-
-Legend::
-
- 90C65 ARCNET Probe
- S1 1-5: Base Memory Address Select
- 6-8: Base I/O Address Select
- S2 1-8: Node ID Select (ID0-ID7)
- JP1 ROM Enable Select
- JP2 IRQ2
- JP3 IRQ3
- JP4 IRQ4
- JP5 IRQ5
- JP6 IRQ7
- JP7/JP8 ET1, ET2 Timeout Parameters
- JP10/JP11 Coax / Twisted Pair Select (CN120ST/SBT only)
- JP12 Terminator Select (CN120AB/ST/SBT only)
- J1 BNC RG62/U Connector (all except CN120TP)
- J2 Two 6-position Telephone Jack (CN120TP/ST/SBT only)
-
-Setting one of the switches to Off means "1", On means "0".
-
-
-Setting the Node ID
-^^^^^^^^^^^^^^^^^^^
-
-The eight switches in SW2 are used to set the node ID. Each node attached
-to the network must have an unique node ID which must be different from 0.
-Switch 1 (ID0) serves as the least significant bit (LSB).
-
-The node ID is the sum of the values of all switches set to "1"
-These values are:
-
- ======= ====== =====
- Switch Label Value
- ======= ====== =====
- 1 ID0 1
- 2 ID1 2
- 3 ID2 4
- 4 ID3 8
- 5 ID4 16
- 6 ID5 32
- 7 ID6 64
- 8 ID7 128
- ======= ====== =====
-
-Some Examples::
-
- Switch | Hex | Decimal
- 8 7 6 5 4 3 2 1 | Node ID | Node ID
- ----------------|---------|---------
- 0 0 0 0 0 0 0 0 | not allowed
- 0 0 0 0 0 0 0 1 | 1 | 1
- 0 0 0 0 0 0 1 0 | 2 | 2
- 0 0 0 0 0 0 1 1 | 3 | 3
- . . . | |
- 0 1 0 1 0 1 0 1 | 55 | 85
- . . . | |
- 1 0 1 0 1 0 1 0 | AA | 170
- . . . | |
- 1 1 1 1 1 1 0 1 | FD | 253
- 1 1 1 1 1 1 1 0 | FE | 254
- 1 1 1 1 1 1 1 1 | FF | 255
-
-
-Setting the I/O Base Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The last three switches in switch block SW1 are used to select one
-of eight possible I/O Base addresses using the following table::
-
-
- Switch | Hex I/O
- 6 7 8 | Address
- ------------|--------
- ON ON ON | 260
- OFF ON ON | 290
- ON OFF ON | 2E0 (Manufacturer's default)
- OFF OFF ON | 2F0
- ON ON OFF | 300
- OFF ON OFF | 350
- ON OFF OFF | 380
- OFF OFF OFF | 3E0
-
-
-Setting the Base Memory (RAM) buffer Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The memory buffer (RAM) requires 2K. The base of this buffer can be
-located in any of eight positions. The address of the Boot Prom is
-memory base + 8K or memory base + 0x2000.
-Switches 1-5 of switch block SW1 select the Memory Base address.
-
-::
-
- Switch | Hex RAM | Hex ROM
- 1 2 3 4 5 | Address | Address *)
- --------------------|---------|-----------
- ON ON ON ON ON | C0000 | C2000
- ON ON OFF ON ON | C4000 | C6000
- ON ON ON OFF ON | CC000 | CE000
- ON ON OFF OFF ON | D0000 | D2000 (Manufacturer's default)
- ON ON ON ON OFF | D4000 | D6000
- ON ON OFF ON OFF | D8000 | DA000
- ON ON ON OFF OFF | DC000 | DE000
- ON ON OFF OFF OFF | E0000 | E2000
-
- *) To enable the Boot ROM install the jumper JP1
-
-.. note::
-
- Since the switches 1 and 2 are always set to ON it may be possible
- that they can be used to add an offset of 2K, 4K or 6K to the base
- address, but this feature is not documented in the manual and I
- haven't tested it yet.
-
-
-Setting the Interrupt Line
-^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-To select a hardware interrupt level install one (only one!) of the jumpers
-JP2, JP3, JP4, JP5, JP6. JP2 is the default::
-
- Jumper | IRQ
- -------|-----
- 2 | 2
- 3 | 3
- 4 | 4
- 5 | 5
- 6 | 7
-
-
-Setting the Internal Terminator on CN120AB/TP/SBT
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The jumper JP12 is used to enable the internal terminator::
-
- -----
- 0 | 0 |
- ----- ON | | ON
- | 0 | | 0 |
- | | OFF ----- OFF
- | 0 | 0
- -----
- Terminator Terminator
- disabled enabled
-
-
-Selecting the Connector Type on CN120ST/SBT
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-::
-
- JP10 JP11 JP10 JP11
- ----- -----
- 0 0 | 0 | | 0 |
- ----- ----- | | | |
- | 0 | | 0 | | 0 | | 0 |
- | | | | ----- -----
- | 0 | | 0 | 0 0
- ----- -----
- Coaxial Cable Twisted Pair Cable
- (Default)
-
-
-Setting the Timeout Parameters
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The jumpers labeled EXT1 and EXT2 are used to determine the timeout
-parameters. These two jumpers are normally left open.
-
-
-CNet Technology Inc. (16-bit cards)
-===================================
-
-160 Series (16-bit cards)
--------------------------
- - from Juergen Seifert <seifert@htwm.de>
-
-This description has been written by Juergen Seifert <seifert@htwm.de>
-using information from the following Original CNet Manual
-
- "ARCNET USER'S MANUAL for
- CN160A CN160AB CN160TP
- P/N:12-01-0006 Revision 3.00"
-
-ARCNET is a registered trademark of the Datapoint Corporation
-
-- P/N 160A ARCNET 16 bit XT/AT Star
-- P/N 160AB ARCNET 16 bit XT/AT Bus
-- P/N 160TP ARCNET 16 bit XT/AT Twisted Pair
-
-::
-
- ___________________________________________________________________
- < _________________________ ___|
- > |oo| JP2 | | LED |___|
- < |oo| JP1 | 9026 | LED |___|
- > |_________________________| ___|
- < N | | ID7
- > 1 o | | ID6
- < 1 2 3 4 5 6 7 8 9 0 d | S | ID5
- > _______________ _____________________ e | W | ID4
- < | PROM | | SW1 | A | 2 | ID3
- > > SOCKET | |_____________________| d | | ID2
- < |_______________| | IO-Base | MEM | d | | ID1
- > r |___| ID0
- < ____|
- > | |
- < | J1 |
- > | |
- < |____|
- > 1 1 1 1 |
- < 3 4 5 6 7 JP 8 9 0 1 2 3 |
- > |o|o|o|o|o| |o|o|o|o|o|o| |
- < |o|o|o|o|o| __ |o|o|o|o|o|o| ___________|
- > | | |
- <____________| |_______________________________________|
-
-Legend::
-
- 9026 ARCNET Probe
- SW1 1-6: Base I/O Address Select
- 7-10: Base Memory Address Select
- SW2 1-8: Node ID Select (ID0-ID7)
- JP1/JP2 ET1, ET2 Timeout Parameters
- JP3-JP13 Interrupt Select
- J1 BNC RG62/U Connector (CN160A/AB only)
- J1 Two 6-position Telephone Jack (CN160TP only)
- LED
-
-Setting one of the switches to Off means "1", On means "0".
-
-
-Setting the Node ID
-^^^^^^^^^^^^^^^^^^^
-
-The eight switches in SW2 are used to set the node ID. Each node attached
-to the network must have an unique node ID which must be different from 0.
-Switch 1 (ID0) serves as the least significant bit (LSB).
-
-The node ID is the sum of the values of all switches set to "1"
-These values are::
-
- Switch | Label | Value
- -------|-------|-------
- 1 | ID0 | 1
- 2 | ID1 | 2
- 3 | ID2 | 4
- 4 | ID3 | 8
- 5 | ID4 | 16
- 6 | ID5 | 32
- 7 | ID6 | 64
- 8 | ID7 | 128
-
-Some Examples::
-
- Switch | Hex | Decimal
- 8 7 6 5 4 3 2 1 | Node ID | Node ID
- ----------------|---------|---------
- 0 0 0 0 0 0 0 0 | not allowed
- 0 0 0 0 0 0 0 1 | 1 | 1
- 0 0 0 0 0 0 1 0 | 2 | 2
- 0 0 0 0 0 0 1 1 | 3 | 3
- . . . | |
- 0 1 0 1 0 1 0 1 | 55 | 85
- . . . | |
- 1 0 1 0 1 0 1 0 | AA | 170
- . . . | |
- 1 1 1 1 1 1 0 1 | FD | 253
- 1 1 1 1 1 1 1 0 | FE | 254
- 1 1 1 1 1 1 1 1 | FF | 255
-
-
-Setting the I/O Base Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The first six switches in switch block SW1 are used to select the I/O Base
-address using the following table::
-
- Switch | Hex I/O
- 1 2 3 4 5 6 | Address
- ------------------------|--------
- OFF ON ON OFF OFF ON | 260
- OFF ON OFF ON ON OFF | 290
- OFF ON OFF OFF OFF ON | 2E0 (Manufacturer's default)
- OFF ON OFF OFF OFF OFF | 2F0
- OFF OFF ON ON ON ON | 300
- OFF OFF ON OFF ON OFF | 350
- OFF OFF OFF ON ON ON | 380
- OFF OFF OFF OFF OFF ON | 3E0
-
-Note: Other IO-Base addresses seem to be selectable, but only the above
- combinations are documented.
-
-
-Setting the Base Memory (RAM) buffer Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The switches 7-10 of switch block SW1 are used to select the Memory
-Base address of the RAM (2K) and the PROM::
-
- Switch | Hex RAM | Hex ROM
- 7 8 9 10 | Address | Address
- ----------------|---------|-----------
- OFF OFF ON ON | C0000 | C8000
- OFF OFF ON OFF | D0000 | D8000 (Default)
- OFF OFF OFF ON | E0000 | E8000
-
-.. note::
-
- Other MEM-Base addresses seem to be selectable, but only the above
- combinations are documented.
-
-
-Setting the Interrupt Line
-^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-To select a hardware interrupt level install one (only one!) of the jumpers
-JP3 through JP13 using the following table::
-
- Jumper | IRQ
- -------|-----------------
- 3 | 14
- 4 | 15
- 5 | 12
- 6 | 11
- 7 | 10
- 8 | 3
- 9 | 4
- 10 | 5
- 11 | 6
- 12 | 7
- 13 | 2 (=9) Default!
-
-.. note::
-
- - Do not use JP11=IRQ6, it may conflict with your Floppy Disk
- Controller
- - Use JP3=IRQ14 only, if you don't have an IDE-, MFM-, or RLL-
- Hard Disk, it may conflict with their controllers
-
-
-Setting the Timeout Parameters
-------------------------------
-
-The jumpers labeled JP1 and JP2 are used to determine the timeout
-parameters. These two jumpers are normally left open.
-
-
-Lantech
-=======
-
-8-bit card, unknown model
--------------------------
- - from Vlad Lungu <vlungu@ugal.ro> - his e-mail address seemed broken at
- the time I tried to reach him. Sorry Vlad, if you didn't get my reply.
-
-::
-
- ________________________________________________________________
- | 1 8 |
- | ___________ __|
- | | SW1 | LED |__|
- | |__________| |
- | ___|
- | _____________________ |S | 8
- | | | |W |
- | | | |2 |
- | | | |__| 1
- | | UM9065L | |o| JP4 ____|____
- | | | |o| | CN |
- | | | |________|
- | | | |
- | |___________________| |
- | |
- | |
- | _____________ |
- | | | |
- | | PROM | |ooooo| JP6 |
- | |____________| |ooooo| |
- |_____________ _ _|
- |____________________________________________| |__|
-
-
-UM9065L : ARCnet Controller
-
-SW 1 : Shared Memory Address and I/O Base
-
-::
-
- ON=0
-
- 12345|Memory Address
- -----|--------------
- 00001| D4000
- 00010| CC000
- 00110| D0000
- 01110| D1000
- 01101| D9000
- 10010| CC800
- 10011| DC800
- 11110| D1800
-
-It seems that the bits are considered in reverse order. Also, you must
-observe that some of those addresses are unusual and I didn't probe them; I
-used a memory dump in DOS to identify them. For the 00000 configuration and
-some others that I didn't write here the card seems to conflict with the
-video card (an S3 GENDAC). I leave the full decoding of those addresses to
-you.
-
-::
-
- 678| I/O Address
- ---|------------
- 000| 260
- 001| failed probe
- 010| 2E0
- 011| 380
- 100| 290
- 101| 350
- 110| failed probe
- 111| 3E0
-
- SW 2 : Node ID (binary coded)
-
- JP 4 : Boot PROM enable CLOSE - enabled
- OPEN - disabled
-
- JP 6 : IRQ set (ONLY ONE jumper on 1-5 for IRQ 2-6)
-
-
-Acer
-====
-
-8-bit card, Model 5210-003
---------------------------
-
- - from Vojtech Pavlik <vojtech@suse.cz> using portions of the existing
- arcnet-hardware file.
-
-This is a 90C26 based card. Its configuration seems similar to the SMC
-PC100, but has some additional jumpers I don't know the meaning of.
-
-::
-
- __
- | |
- ___________|__|_________________________
- | | | |
- | | BNC | |
- | |______| ___|
- | _____________________ |___
- | | | |
- | | Hybrid IC | |
- | | | o|o J1 |
- | |_____________________| 8|8 |
- | 8|8 J5 |
- | o|o |
- | 8|8 |
- |__ 8|8 |
- (|__| LED o|o |
- | 8|8 |
- | 8|8 J15 |
- | |
- | _____ |
- | | | _____ |
- | | | | | ___|
- | | | | | |
- | _____ | ROM | | UFS | |
- | | | | | | | |
- | | | ___ | | | | |
- | | | | | |__.__| |__.__| |
- | | NCR | |XTL| _____ _____ |
- | | | |___| | | | | |
- | |90C26| | | | | |
- | | | | RAM | | UFS | |
- | | | J17 o|o | | | | |
- | | | J16 o|o | | | | |
- | |__.__| |__.__| |__.__| |
- | ___ |
- | | |8 |
- | |SW2| |
- | | | |
- | |___|1 |
- | ___ |
- | | |10 J18 o|o |
- | | | o|o |
- | |SW1| o|o |
- | | | J21 o|o |
- | |___|1 |
- | |
- |____________________________________|
-
-
-Legend::
-
- 90C26 ARCNET Chip
- XTL 20 MHz Crystal
- SW1 1-6 Base I/O Address Select
- 7-10 Memory Address Select
- SW2 1-8 Node ID Select (ID0-ID7)
- J1-J5 IRQ Select
- J6-J21 Unknown (Probably extra timeouts & ROM enable ...)
- LED1 Activity LED
- BNC Coax connector (STAR ARCnet)
- RAM 2k of SRAM
- ROM Boot ROM socket
- UFS Unidentified Flying Sockets
-
-
-Setting the Node ID
-^^^^^^^^^^^^^^^^^^^
-
-The eight switches in SW2 are used to set the node ID. Each node attached
-to the network must have an unique node ID which must not be 0.
-Switch 1 (ID0) serves as the least significant bit (LSB).
-
-Setting one of the switches to OFF means "1", ON means "0".
-
-The node ID is the sum of the values of all switches set to "1"
-These values are::
-
- Switch | Value
- -------|-------
- 1 | 1
- 2 | 2
- 3 | 4
- 4 | 8
- 5 | 16
- 6 | 32
- 7 | 64
- 8 | 128
-
-Don't set this to 0 or 255; these values are reserved.
-
-
-Setting the I/O Base Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The switches 1 to 6 of switch block SW1 are used to select one
-of 32 possible I/O Base addresses using the following tables::
-
- | Hex
- Switch | Value
- -------|-------
- 1 | 200
- 2 | 100
- 3 | 80
- 4 | 40
- 5 | 20
- 6 | 10
-
-The I/O address is sum of all switches set to "1". Remember that
-the I/O address space below 0x200 is RESERVED for mainboard, so
-switch 1 should be ALWAYS SET TO OFF.
-
-
-Setting the Base Memory (RAM) buffer Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The memory buffer (RAM) requires 2K. The base of this buffer can be
-located in any of sixteen positions. However, the addresses below
-A0000 are likely to cause system hang because there's main RAM.
-
-Jumpers 7-10 of switch block SW1 select the Memory Base address::
-
- Switch | Hex RAM
- 7 8 9 10 | Address
- ----------------|---------
- OFF OFF OFF OFF | F0000 (conflicts with main BIOS)
- OFF OFF OFF ON | E0000
- OFF OFF ON OFF | D0000
- OFF OFF ON ON | C0000 (conflicts with video BIOS)
- OFF ON OFF OFF | B0000 (conflicts with mono video)
- OFF ON OFF ON | A0000 (conflicts with graphics)
-
-
-Setting the Interrupt Line
-^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Jumpers 1-5 of the jumper block J1 control the IRQ level. ON means
-shorted, OFF means open::
-
- Jumper | IRQ
- 1 2 3 4 5 |
- ----------------------------
- ON OFF OFF OFF OFF | 7
- OFF ON OFF OFF OFF | 5
- OFF OFF ON OFF OFF | 4
- OFF OFF OFF ON OFF | 3
- OFF OFF OFF OFF ON | 2
-
-
-Unknown jumpers & sockets
-^^^^^^^^^^^^^^^^^^^^^^^^^
-
-I know nothing about these. I just guess that J16&J17 are timeout
-jumpers and maybe one of J18-J21 selects ROM. Also J6-J10 and
-J11-J15 are connecting IRQ2-7 to some pins on the UFSs. I can't
-guess the purpose.
-
-Datapoint?
-==========
-
-LAN-ARC-8, an 8-bit card
-------------------------
-
- - from Vojtech Pavlik <vojtech@suse.cz>
-
-This is another SMC 90C65-based ARCnet card. I couldn't identify the
-manufacturer, but it might be DataPoint, because the card has the
-original arcNet logo in its upper right corner.
-
-::
-
- _______________________________________________________
- | _________ |
- | | SW2 | ON arcNet |
- | |_________| OFF ___|
- | _____________ 1 ______ 8 | | 8
- | | | SW1 | XTAL | ____________ | S |
- | > RAM (2k) | |______|| | | W |
- | |_____________| | H | | 3 |
- | _________|_____ y | |___| 1
- | _________ | | |b | |
- | |_________| | | |r | |
- | | SMC | |i | |
- | | 90C65| |d | |
- | _________ | | | | |
- | | SW1 | ON | | |I | |
- | |_________| OFF |_________|_____/C | _____|
- | 1 8 | | | |___
- | ______________ | | | BNC |___|
- | | | |____________| |_____|
- | > EPROM SOCKET | _____________ |
- | |______________| |_____________| |
- | ______________|
- | |
- |________________________________________|
-
-Legend::
-
- 90C65 ARCNET Chip
- SW1 1-5: Base Memory Address Select
- 6-8: Base I/O Address Select
- SW2 1-8: Node ID Select
- SW3 1-5: IRQ Select
- 6-7: Extra Timeout
- 8 : ROM Enable
- BNC Coax connector
- XTAL 20 MHz Crystal
-
-
-Setting the Node ID
-^^^^^^^^^^^^^^^^^^^
-
-The eight switches in SW3 are used to set the node ID. Each node attached
-to the network must have an unique node ID which must not be 0.
-Switch 1 serves as the least significant bit (LSB).
-
-Setting one of the switches to Off means "1", On means "0".
-
-The node ID is the sum of the values of all switches set to "1"
-These values are::
-
- Switch | Value
- -------|-------
- 1 | 1
- 2 | 2
- 3 | 4
- 4 | 8
- 5 | 16
- 6 | 32
- 7 | 64
- 8 | 128
-
-
-Setting the I/O Base Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The last three switches in switch block SW1 are used to select one
-of eight possible I/O Base addresses using the following table::
-
-
- Switch | Hex I/O
- 6 7 8 | Address
- ------------|--------
- ON ON ON | 260
- OFF ON ON | 290
- ON OFF ON | 2E0 (Manufacturer's default)
- OFF OFF ON | 2F0
- ON ON OFF | 300
- OFF ON OFF | 350
- ON OFF OFF | 380
- OFF OFF OFF | 3E0
-
-
-Setting the Base Memory (RAM) buffer Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The memory buffer (RAM) requires 2K. The base of this buffer can be
-located in any of eight positions. The address of the Boot Prom is
-memory base + 0x2000.
-
-Jumpers 3-5 of switch block SW1 select the Memory Base address.
-
-::
-
- Switch | Hex RAM | Hex ROM
- 1 2 3 4 5 | Address | Address *)
- --------------------|---------|-----------
- ON ON ON ON ON | C0000 | C2000
- ON ON OFF ON ON | C4000 | C6000
- ON ON ON OFF ON | CC000 | CE000
- ON ON OFF OFF ON | D0000 | D2000 (Manufacturer's default)
- ON ON ON ON OFF | D4000 | D6000
- ON ON OFF ON OFF | D8000 | DA000
- ON ON ON OFF OFF | DC000 | DE000
- ON ON OFF OFF OFF | E0000 | E2000
-
- *) To enable the Boot ROM set the switch 8 of switch block SW3 to position ON.
-
-The switches 1 and 2 probably add 0x0800 and 0x1000 to RAM base address.
-
-
-Setting the Interrupt Line
-^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Switches 1-5 of the switch block SW3 control the IRQ level::
-
- Jumper | IRQ
- 1 2 3 4 5 |
- ----------------------------
- ON OFF OFF OFF OFF | 3
- OFF ON OFF OFF OFF | 4
- OFF OFF ON OFF OFF | 5
- OFF OFF OFF ON OFF | 7
- OFF OFF OFF OFF ON | 2
-
-
-Setting the Timeout Parameters
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The switches 6-7 of the switch block SW3 are used to determine the timeout
-parameters. These two switches are normally left in the OFF position.
-
-
-Topware
-=======
-
-8-bit card, TA-ARC/10
----------------------
-
- - from Vojtech Pavlik <vojtech@suse.cz>
-
-This is another very similar 90C65 card. Most of the switches and jumpers
-are the same as on other clones.
-
-::
-
- _____________________________________________________________________
- | ___________ | | ______ |
- | |SW2 NODE ID| | | | XTAL | |
- | |___________| | Hybrid IC | |______| |
- | ___________ | | __|
- | |SW1 MEM+I/O| |_________________________| LED1|__|)
- | |___________| 1 2 |
- | J3 |o|o| TIMEOUT ______|
- | ______________ |o|o| | |
- | | | ___________________ | RJ |
- | > EPROM SOCKET | | \ |------|
- |J2 |______________| | | | |
- ||o| | | |______|
- ||o| ROM ENABLE | SMC | _________ |
- | _____________ | 90C65 | |_________| _____|
- | | | | | | |___
- | > RAM (2k) | | | | BNC |___|
- | |_____________| | | |_____|
- | |____________________| |
- | ________ IRQ 2 3 4 5 7 ___________ |
- ||________| |o|o|o|o|o| |___________| |
- |________ J1|o|o|o|o|o| ______________|
- | |
- |_____________________________________________|
-
-Legend::
-
- 90C65 ARCNET Chip
- XTAL 20 MHz Crystal
- SW1 1-5 Base Memory Address Select
- 6-8 Base I/O Address Select
- SW2 1-8 Node ID Select (ID0-ID7)
- J1 IRQ Select
- J2 ROM Enable
- J3 Extra Timeout
- LED1 Activity LED
- BNC Coax connector (BUS ARCnet)
- RJ Twisted Pair Connector (daisy chain)
-
-
-Setting the Node ID
-^^^^^^^^^^^^^^^^^^^
-
-The eight switches in SW2 are used to set the node ID. Each node attached to
-the network must have an unique node ID which must not be 0. Switch 1 (ID0)
-serves as the least significant bit (LSB).
-
-Setting one of the switches to Off means "1", On means "0".
-
-The node ID is the sum of the values of all switches set to "1"
-These values are::
-
- Switch | Label | Value
- -------|-------|-------
- 1 | ID0 | 1
- 2 | ID1 | 2
- 3 | ID2 | 4
- 4 | ID3 | 8
- 5 | ID4 | 16
- 6 | ID5 | 32
- 7 | ID6 | 64
- 8 | ID7 | 128
-
-Setting the I/O Base Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The last three switches in switch block SW1 are used to select one
-of eight possible I/O Base addresses using the following table::
-
-
- Switch | Hex I/O
- 6 7 8 | Address
- ------------|--------
- ON ON ON | 260 (Manufacturer's default)
- OFF ON ON | 290
- ON OFF ON | 2E0
- OFF OFF ON | 2F0
- ON ON OFF | 300
- OFF ON OFF | 350
- ON OFF OFF | 380
- OFF OFF OFF | 3E0
-
-
-Setting the Base Memory (RAM) buffer Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The memory buffer (RAM) requires 2K. The base of this buffer can be
-located in any of eight positions. The address of the Boot Prom is
-memory base + 0x2000.
-
-Jumpers 3-5 of switch block SW1 select the Memory Base address.
-
-::
-
- Switch | Hex RAM | Hex ROM
- 1 2 3 4 5 | Address | Address *)
- --------------------|---------|-----------
- ON ON ON ON ON | C0000 | C2000
- ON ON OFF ON ON | C4000 | C6000 (Manufacturer's default)
- ON ON ON OFF ON | CC000 | CE000
- ON ON OFF OFF ON | D0000 | D2000
- ON ON ON ON OFF | D4000 | D6000
- ON ON OFF ON OFF | D8000 | DA000
- ON ON ON OFF OFF | DC000 | DE000
- ON ON OFF OFF OFF | E0000 | E2000
-
- *) To enable the Boot ROM short the jumper J2.
-
-The jumpers 1 and 2 probably add 0x0800 and 0x1000 to RAM address.
-
-
-Setting the Interrupt Line
-^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Jumpers 1-5 of the jumper block J1 control the IRQ level. ON means
-shorted, OFF means open::
-
- Jumper | IRQ
- 1 2 3 4 5 |
- ----------------------------
- ON OFF OFF OFF OFF | 2
- OFF ON OFF OFF OFF | 3
- OFF OFF ON OFF OFF | 4
- OFF OFF OFF ON OFF | 5
- OFF OFF OFF OFF ON | 7
-
-
-Setting the Timeout Parameters
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The jumpers J3 are used to set the timeout parameters. These two
-jumpers are normally left open.
-
-Thomas-Conrad
-=============
-
-Model #500-6242-0097 REV A (8-bit card)
----------------------------------------
-
- - from Lars Karlsson <100617.3473@compuserve.com>
-
-::
-
- ________________________________________________________
- | ________ ________ |_____
- | |........| |........| |
- | |________| |________| ___|
- | SW 3 SW 1 | |
- | Base I/O Base Addr. Station | |
- | address | |
- | ______ switch | |
- | | | | |
- | | | |___|
- | | | ______ |___._
- | |______| |______| ____| BNC
- | Jumper- _____| Connector
- | Main chip block _ __| '
- | | | | RJ Connector
- | |_| | with 110 Ohm
- | |__ Terminator
- | ___________ __|
- | |...........| | RJ-jack
- | |...........| _____ | (unused)
- | |___________| |_____| |__
- | Boot PROM socket IRQ-jumpers |_ Diagnostic
- |________ __ _| LED (red)
- | | | | | | | | | | | | | | | | | | | | | |
- | | | | | | | | | | | | | | | | | | | | |________|
- |
- |
-
-And here are the settings for some of the switches and jumpers on the cards.
-
-::
-
- I/O
-
- 1 2 3 4 5 6 7 8
-
- 2E0----- 0 0 0 1 0 0 0 1
- 2F0----- 0 0 0 1 0 0 0 0
- 300----- 0 0 0 0 1 1 1 1
- 350----- 0 0 0 0 1 1 1 0
-
-"0" in the above example means switch is off "1" means that it is on.
-
-::
-
- ShMem address.
-
- 1 2 3 4 5 6 7 8
-
- CX00--0 0 1 1 | | |
- DX00--0 0 1 0 |
- X000--------- 1 1 |
- X400--------- 1 0 |
- X800--------- 0 1 |
- XC00--------- 0 0
- ENHANCED----------- 1
- COMPATIBLE--------- 0
-
-::
-
- IRQ
-
-
- 3 4 5 7 2
- . . . . .
- . . . . .
-
-
-There is a DIP-switch with 8 switches, used to set the shared memory address
-to be used. The first 6 switches set the address, the 7th doesn't have any
-function, and the 8th switch is used to select "compatible" or "enhanced".
-When I got my two cards, one of them had this switch set to "enhanced". That
-card didn't work at all, it wasn't even recognized by the driver. The other
-card had this switch set to "compatible" and it behaved absolutely normally. I
-guess that the switch on one of the cards, must have been changed accidentally
-when the card was taken out of its former host. The question remains
-unanswered, what is the purpose of the "enhanced" position?
-
-[Avery's note: "enhanced" probably either disables shared memory (use IO
-ports instead) or disables IO ports (use memory addresses instead). This
-varies by the type of card involved. I fail to see how either of these
-enhance anything. Send me more detailed information about this mode, or
-just use "compatible" mode instead.]
-
-Waterloo Microsystems Inc. ??
-=============================
-
-8-bit card (C) 1985
--------------------
- - from Robert Michael Best <rmb117@cs.usask.ca>
-
-[Avery's note: these don't work with my driver for some reason. These cards
-SEEM to have settings similar to the PDI508Plus, which is
-software-configured and doesn't work with my driver either. The "Waterloo
-chip" is a boot PROM, probably designed specifically for the University of
-Waterloo. If you have any further information about this card, please
-e-mail me.]
-
-The probe has not been able to detect the card on any of the J2 settings,
-and I tried them again with the "Waterloo" chip removed.
-
-::
-
- _____________________________________________________________________
- | \/ \/ ___ __ __ |
- | C4 C4 |^| | M || ^ ||^| |
- | -- -- |_| | 5 || || | C3 |
- | \/ \/ C10 |___|| ||_| |
- | C4 C4 _ _ | | ?? |
- | -- -- | \/ || | |
- | | || | |
- | | || C1 | |
- | | || | \/ _____|
- | | C6 || | C9 | |___
- | | || | -- | BNC |___|
- | | || | >C7| |_____|
- | | || | |
- | __ __ |____||_____| 1 2 3 6 |
- || ^ | >C4| |o|o|o|o|o|o| J2 >C4| |
- || | |o|o|o|o|o|o| |
- || C2 | >C4| >C4| |
- || | >C8| |
- || | 2 3 4 5 6 7 IRQ >C4| |
- ||_____| |o|o|o|o|o|o| J3 |
- |_______ |o|o|o|o|o|o| _______________|
- | |
- |_____________________________________________|
-
- C1 -- "COM9026
- SMC 8638"
- In a chip socket.
-
- C2 -- "@Copyright
- Waterloo Microsystems Inc.
- 1985"
- In a chip Socket with info printed on a label covering a round window
- showing the circuit inside. (The window indicates it is an EPROM chip.)
-
- C3 -- "COM9032
- SMC 8643"
- In a chip socket.
-
- C4 -- "74LS"
- 9 total no sockets.
-
- M5 -- "50006-136
- 20.000000 MHZ
- MTQ-T1-S3
- 0 M-TRON 86-40"
- Metallic case with 4 pins, no socket.
-
- C6 -- "MOSTEK@TC8643
- MK6116N-20
- MALAYSIA"
- No socket.
-
- C7 -- No stamp or label but in a 20 pin chip socket.
-
- C8 -- "PAL10L8CN
- 8623"
- In a 20 pin socket.
-
- C9 -- "PAl16R4A-2CN
- 8641"
- In a 20 pin socket.
-
- C10 -- "M8640
- NMC
- 9306N"
- In an 8 pin socket.
-
- ?? -- Some components on a smaller board and attached with 20 pins all
- along the side closest to the BNC connector. The are coated in a dark
- resin.
-
-On the board there are two jumper banks labeled J2 and J3. The
-manufacturer didn't put a J1 on the board. The two boards I have both
-came with a jumper box for each bank.
-
-::
-
- J2 -- Numbered 1 2 3 4 5 6.
- 4 and 5 are not stamped due to solder points.
-
- J3 -- IRQ 2 3 4 5 6 7
-
-The board itself has a maple leaf stamped just above the irq jumpers
-and "-2 46-86" beside C2. Between C1 and C6 "ASS 'Y 300163" and "@1986
-CORMAN CUSTOM ELECTRONICS CORP." stamped just below the BNC connector.
-Below that "MADE IN CANADA"
-
-No Name
-=======
-
-8-bit cards, 16-bit cards
--------------------------
-
- - from Juergen Seifert <seifert@htwm.de>
-
-I have named this ARCnet card "NONAME", since there is no name of any
-manufacturer on the Installation manual nor on the shipping box. The only
-hint to the existence of a manufacturer at all is written in copper,
-it is "Made in Taiwan"
-
-This description has been written by Juergen Seifert <seifert@htwm.de>
-using information from the Original
-
- "ARCnet Installation Manual"
-
-::
-
- ________________________________________________________________
- | |STAR| BUS| T/P| |
- | |____|____|____| |
- | _____________________ |
- | | | |
- | | | |
- | | | |
- | | SMC | |
- | | | |
- | | COM90C65 | |
- | | | |
- | | | |
- | |__________-__________| |
- | _____|
- | _______________ | CN |
- | | PROM | |_____|
- | > SOCKET | |
- | |_______________| 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 |
- | _______________ _______________ |
- | |o|o|o|o|o|o|o|o| | SW1 || SW2 ||
- | |o|o|o|o|o|o|o|o| |_______________||_______________||
- |___ 2 3 4 5 7 E E R Node ID IOB__|__MEM____|
- | \ IRQ / T T O |
- |__________________1_2_M______________________|
-
-Legend::
-
- COM90C65: ARCnet Probe
- S1 1-8: Node ID Select
- S2 1-3: I/O Base Address Select
- 4-6: Memory Base Address Select
- 7-8: RAM Offset Select
- ET1, ET2 Extended Timeout Select
- ROM ROM Enable Select
- CN RG62 Coax Connector
- STAR| BUS | T/P Three fields for placing a sign (colored circle)
- indicating the topology of the card
-
-Setting one of the switches to Off means "1", On means "0".
-
-
-Setting the Node ID
-^^^^^^^^^^^^^^^^^^^
-
-The eight switches in group SW1 are used to set the node ID.
-Each node attached to the network must have an unique node ID which
-must be different from 0.
-Switch 8 serves as the least significant bit (LSB).
-
-The node ID is the sum of the values of all switches set to "1"
-These values are::
-
- Switch | Value
- -------|-------
- 8 | 1
- 7 | 2
- 6 | 4
- 5 | 8
- 4 | 16
- 3 | 32
- 2 | 64
- 1 | 128
-
-Some Examples::
-
- Switch | Hex | Decimal
- 1 2 3 4 5 6 7 8 | Node ID | Node ID
- ----------------|---------|---------
- 0 0 0 0 0 0 0 0 | not allowed
- 0 0 0 0 0 0 0 1 | 1 | 1
- 0 0 0 0 0 0 1 0 | 2 | 2
- 0 0 0 0 0 0 1 1 | 3 | 3
- . . . | |
- 0 1 0 1 0 1 0 1 | 55 | 85
- . . . | |
- 1 0 1 0 1 0 1 0 | AA | 170
- . . . | |
- 1 1 1 1 1 1 0 1 | FD | 253
- 1 1 1 1 1 1 1 0 | FE | 254
- 1 1 1 1 1 1 1 1 | FF | 255
-
-
-Setting the I/O Base Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The first three switches in switch group SW2 are used to select one
-of eight possible I/O Base addresses using the following table::
-
- Switch | Hex I/O
- 1 2 3 | Address
- ------------|--------
- ON ON ON | 260
- ON ON OFF | 290
- ON OFF ON | 2E0 (Manufacturer's default)
- ON OFF OFF | 2F0
- OFF ON ON | 300
- OFF ON OFF | 350
- OFF OFF ON | 380
- OFF OFF OFF | 3E0
-
-
-Setting the Base Memory (RAM) buffer Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The memory buffer requires 2K of a 16K block of RAM. The base of this
-16K block can be located in any of eight positions.
-Switches 4-6 of switch group SW2 select the Base of the 16K block.
-Within that 16K address space, the buffer may be assigned any one of four
-positions, determined by the offset, switches 7 and 8 of group SW2.
-
-::
-
- Switch | Hex RAM | Hex ROM
- 4 5 6 7 8 | Address | Address *)
- -----------|---------|-----------
- 0 0 0 0 0 | C0000 | C2000
- 0 0 0 0 1 | C0800 | C2000
- 0 0 0 1 0 | C1000 | C2000
- 0 0 0 1 1 | C1800 | C2000
- | |
- 0 0 1 0 0 | C4000 | C6000
- 0 0 1 0 1 | C4800 | C6000
- 0 0 1 1 0 | C5000 | C6000
- 0 0 1 1 1 | C5800 | C6000
- | |
- 0 1 0 0 0 | CC000 | CE000
- 0 1 0 0 1 | CC800 | CE000
- 0 1 0 1 0 | CD000 | CE000
- 0 1 0 1 1 | CD800 | CE000
- | |
- 0 1 1 0 0 | D0000 | D2000 (Manufacturer's default)
- 0 1 1 0 1 | D0800 | D2000
- 0 1 1 1 0 | D1000 | D2000
- 0 1 1 1 1 | D1800 | D2000
- | |
- 1 0 0 0 0 | D4000 | D6000
- 1 0 0 0 1 | D4800 | D6000
- 1 0 0 1 0 | D5000 | D6000
- 1 0 0 1 1 | D5800 | D6000
- | |
- 1 0 1 0 0 | D8000 | DA000
- 1 0 1 0 1 | D8800 | DA000
- 1 0 1 1 0 | D9000 | DA000
- 1 0 1 1 1 | D9800 | DA000
- | |
- 1 1 0 0 0 | DC000 | DE000
- 1 1 0 0 1 | DC800 | DE000
- 1 1 0 1 0 | DD000 | DE000
- 1 1 0 1 1 | DD800 | DE000
- | |
- 1 1 1 0 0 | E0000 | E2000
- 1 1 1 0 1 | E0800 | E2000
- 1 1 1 1 0 | E1000 | E2000
- 1 1 1 1 1 | E1800 | E2000
-
- *) To enable the 8K Boot PROM install the jumper ROM.
- The default is jumper ROM not installed.
-
-
-Setting Interrupt Request Lines (IRQ)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-To select a hardware interrupt level set one (only one!) of the jumpers
-IRQ2, IRQ3, IRQ4, IRQ5 or IRQ7. The manufacturer's default is IRQ2.
-
-
-Setting the Timeouts
-^^^^^^^^^^^^^^^^^^^^
-
-The two jumpers labeled ET1 and ET2 are used to determine the timeout
-parameters (response and reconfiguration time). Every node in a network
-must be set to the same timeout values.
-
-::
-
- ET1 ET2 | Response Time (us) | Reconfiguration Time (ms)
- --------|--------------------|--------------------------
- Off Off | 78 | 840 (Default)
- Off On | 285 | 1680
- On Off | 563 | 1680
- On On | 1130 | 1680
-
-On means jumper installed, Off means jumper not installed
-
-
-16-BIT ARCNET
--------------
-
-The manual of my 8-Bit NONAME ARCnet Card contains another description
-of a 16-Bit Coax / Twisted Pair Card. This description is incomplete,
-because there are missing two pages in the manual booklet. (The table
-of contents reports pages ... 2-9, 2-11, 2-12, 3-1, ... but inside
-the booklet there is a different way of counting ... 2-9, 2-10, A-1,
-(empty page), 3-1, ..., 3-18, A-1 (again), A-2)
-Also the picture of the board layout is not as good as the picture of
-8-Bit card, because there isn't any letter like "SW1" written to the
-picture.
-
-Should somebody have such a board, please feel free to complete this
-description or to send a mail to me!
-
-This description has been written by Juergen Seifert <seifert@htwm.de>
-using information from the Original
-
- "ARCnet Installation Manual"
-
-::
-
- ___________________________________________________________________
- < _________________ _________________ |
- > | SW? || SW? | |
- < |_________________||_________________| |
- > ____________________ |
- < | | |
- > | | |
- < | | |
- > | | |
- < | | |
- > | | |
- < | | |
- > |____________________| |
- < ____|
- > ____________________ | |
- < | | | J1 |
- > | < | |
- < |____________________| ? ? ? ? ? ? |____|
- > |o|o|o|o|o|o| |
- < |o|o|o|o|o|o| |
- > |
- < __ ___________|
- > | | |
- <____________| |_______________________________________|
-
-
-Setting one of the switches to Off means "1", On means "0".
-
-
-Setting the Node ID
-^^^^^^^^^^^^^^^^^^^
-
-The eight switches in group SW2 are used to set the node ID.
-Each node attached to the network must have an unique node ID which
-must be different from 0.
-Switch 8 serves as the least significant bit (LSB).
-
-The node ID is the sum of the values of all switches set to "1"
-These values are::
-
- Switch | Value
- -------|-------
- 8 | 1
- 7 | 2
- 6 | 4
- 5 | 8
- 4 | 16
- 3 | 32
- 2 | 64
- 1 | 128
-
-Some Examples::
-
- Switch | Hex | Decimal
- 1 2 3 4 5 6 7 8 | Node ID | Node ID
- ----------------|---------|---------
- 0 0 0 0 0 0 0 0 | not allowed
- 0 0 0 0 0 0 0 1 | 1 | 1
- 0 0 0 0 0 0 1 0 | 2 | 2
- 0 0 0 0 0 0 1 1 | 3 | 3
- . . . | |
- 0 1 0 1 0 1 0 1 | 55 | 85
- . . . | |
- 1 0 1 0 1 0 1 0 | AA | 170
- . . . | |
- 1 1 1 1 1 1 0 1 | FD | 253
- 1 1 1 1 1 1 1 0 | FE | 254
- 1 1 1 1 1 1 1 1 | FF | 255
-
-
-Setting the I/O Base Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The first three switches in switch group SW1 are used to select one
-of eight possible I/O Base addresses using the following table::
-
- Switch | Hex I/O
- 3 2 1 | Address
- ------------|--------
- ON ON ON | 260
- ON ON OFF | 290
- ON OFF ON | 2E0 (Manufacturer's default)
- ON OFF OFF | 2F0
- OFF ON ON | 300
- OFF ON OFF | 350
- OFF OFF ON | 380
- OFF OFF OFF | 3E0
-
-
-Setting the Base Memory (RAM) buffer Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The memory buffer requires 2K of a 16K block of RAM. The base of this
-16K block can be located in any of eight positions.
-Switches 6-8 of switch group SW1 select the Base of the 16K block.
-Within that 16K address space, the buffer may be assigned any one of four
-positions, determined by the offset, switches 4 and 5 of group SW1::
-
- Switch | Hex RAM | Hex ROM
- 8 7 6 5 4 | Address | Address
- -----------|---------|-----------
- 0 0 0 0 0 | C0000 | C2000
- 0 0 0 0 1 | C0800 | C2000
- 0 0 0 1 0 | C1000 | C2000
- 0 0 0 1 1 | C1800 | C2000
- | |
- 0 0 1 0 0 | C4000 | C6000
- 0 0 1 0 1 | C4800 | C6000
- 0 0 1 1 0 | C5000 | C6000
- 0 0 1 1 1 | C5800 | C6000
- | |
- 0 1 0 0 0 | CC000 | CE000
- 0 1 0 0 1 | CC800 | CE000
- 0 1 0 1 0 | CD000 | CE000
- 0 1 0 1 1 | CD800 | CE000
- | |
- 0 1 1 0 0 | D0000 | D2000 (Manufacturer's default)
- 0 1 1 0 1 | D0800 | D2000
- 0 1 1 1 0 | D1000 | D2000
- 0 1 1 1 1 | D1800 | D2000
- | |
- 1 0 0 0 0 | D4000 | D6000
- 1 0 0 0 1 | D4800 | D6000
- 1 0 0 1 0 | D5000 | D6000
- 1 0 0 1 1 | D5800 | D6000
- | |
- 1 0 1 0 0 | D8000 | DA000
- 1 0 1 0 1 | D8800 | DA000
- 1 0 1 1 0 | D9000 | DA000
- 1 0 1 1 1 | D9800 | DA000
- | |
- 1 1 0 0 0 | DC000 | DE000
- 1 1 0 0 1 | DC800 | DE000
- 1 1 0 1 0 | DD000 | DE000
- 1 1 0 1 1 | DD800 | DE000
- | |
- 1 1 1 0 0 | E0000 | E2000
- 1 1 1 0 1 | E0800 | E2000
- 1 1 1 1 0 | E1000 | E2000
- 1 1 1 1 1 | E1800 | E2000
-
-
-Setting Interrupt Request Lines (IRQ)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-??????????????????????????????????????
-
-
-Setting the Timeouts
-^^^^^^^^^^^^^^^^^^^^
-
-??????????????????????????????????????
-
-
-8-bit cards ("Made in Taiwan R.O.C.")
--------------------------------------
-
- - from Vojtech Pavlik <vojtech@suse.cz>
-
-I have named this ARCnet card "NONAME", since I got only the card with
-no manual at all and the only text identifying the manufacturer is
-"MADE IN TAIWAN R.O.C" printed on the card.
-
-::
-
- ____________________________________________________________
- | 1 2 3 4 5 6 7 8 |
- | |o|o| JP1 o|o|o|o|o|o|o|o| ON |
- | + o|o|o|o|o|o|o|o| ___|
- | _____________ o|o|o|o|o|o|o|o| OFF _____ | | ID7
- | | | SW1 | | | | ID6
- | > RAM (2k) | ____________________ | H | | S | ID5
- | |_____________| | || y | | W | ID4
- | | || b | | 2 | ID3
- | | || r | | | ID2
- | | || i | | | ID1
- | | 90C65 || d | |___| ID0
- | SW3 | || | |
- | |o|o|o|o|o|o|o|o| ON | || I | |
- | |o|o|o|o|o|o|o|o| | || C | |
- | |o|o|o|o|o|o|o|o| OFF |____________________|| | _____|
- | 1 2 3 4 5 6 7 8 | | | |___
- | ______________ | | | BNC |___|
- | | | |_____| |_____|
- | > EPROM SOCKET | |
- | |______________| |
- | ______________|
- | |
- |_____________________________________________|
-
-Legend::
-
- 90C65 ARCNET Chip
- SW1 1-5: Base Memory Address Select
- 6-8: Base I/O Address Select
- SW2 1-8: Node ID Select (ID0-ID7)
- SW3 1-5: IRQ Select
- 6-7: Extra Timeout
- 8 : ROM Enable
- JP1 Led connector
- BNC Coax connector
-
-Although the jumpers SW1 and SW3 are marked SW, not JP, they are jumpers, not
-switches.
-
-Setting the jumpers to ON means connecting the upper two pins, off the bottom
-two - or - in case of IRQ setting, connecting none of them at all.
-
-Setting the Node ID
-^^^^^^^^^^^^^^^^^^^
-
-The eight switches in SW2 are used to set the node ID. Each node attached
-to the network must have an unique node ID which must not be 0.
-Switch 1 (ID0) serves as the least significant bit (LSB).
-
-Setting one of the switches to Off means "1", On means "0".
-
-The node ID is the sum of the values of all switches set to "1"
-These values are::
-
- Switch | Label | Value
- -------|-------|-------
- 1 | ID0 | 1
- 2 | ID1 | 2
- 3 | ID2 | 4
- 4 | ID3 | 8
- 5 | ID4 | 16
- 6 | ID5 | 32
- 7 | ID6 | 64
- 8 | ID7 | 128
-
-Some Examples::
-
- Switch | Hex | Decimal
- 8 7 6 5 4 3 2 1 | Node ID | Node ID
- ----------------|---------|---------
- 0 0 0 0 0 0 0 0 | not allowed
- 0 0 0 0 0 0 0 1 | 1 | 1
- 0 0 0 0 0 0 1 0 | 2 | 2
- 0 0 0 0 0 0 1 1 | 3 | 3
- . . . | |
- 0 1 0 1 0 1 0 1 | 55 | 85
- . . . | |
- 1 0 1 0 1 0 1 0 | AA | 170
- . . . | |
- 1 1 1 1 1 1 0 1 | FD | 253
- 1 1 1 1 1 1 1 0 | FE | 254
- 1 1 1 1 1 1 1 1 | FF | 255
-
-
-Setting the I/O Base Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The last three switches in switch block SW1 are used to select one
-of eight possible I/O Base addresses using the following table::
-
-
- Switch | Hex I/O
- 6 7 8 | Address
- ------------|--------
- ON ON ON | 260
- OFF ON ON | 290
- ON OFF ON | 2E0 (Manufacturer's default)
- OFF OFF ON | 2F0
- ON ON OFF | 300
- OFF ON OFF | 350
- ON OFF OFF | 380
- OFF OFF OFF | 3E0
-
-
-Setting the Base Memory (RAM) buffer Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The memory buffer (RAM) requires 2K. The base of this buffer can be
-located in any of eight positions. The address of the Boot Prom is
-memory base + 0x2000.
-
-Jumpers 3-5 of jumper block SW1 select the Memory Base address.
-
-::
-
- Switch | Hex RAM | Hex ROM
- 1 2 3 4 5 | Address | Address *)
- --------------------|---------|-----------
- ON ON ON ON ON | C0000 | C2000
- ON ON OFF ON ON | C4000 | C6000
- ON ON ON OFF ON | CC000 | CE000
- ON ON OFF OFF ON | D0000 | D2000 (Manufacturer's default)
- ON ON ON ON OFF | D4000 | D6000
- ON ON OFF ON OFF | D8000 | DA000
- ON ON ON OFF OFF | DC000 | DE000
- ON ON OFF OFF OFF | E0000 | E2000
-
- *) To enable the Boot ROM set the jumper 8 of jumper block SW3 to position ON.
-
-The jumpers 1 and 2 probably add 0x0800, 0x1000 and 0x1800 to RAM adders.
-
-Setting the Interrupt Line
-^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Jumpers 1-5 of the jumper block SW3 control the IRQ level::
-
- Jumper | IRQ
- 1 2 3 4 5 |
- ----------------------------
- ON OFF OFF OFF OFF | 2
- OFF ON OFF OFF OFF | 3
- OFF OFF ON OFF OFF | 4
- OFF OFF OFF ON OFF | 5
- OFF OFF OFF OFF ON | 7
-
-
-Setting the Timeout Parameters
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The jumpers 6-7 of the jumper block SW3 are used to determine the timeout
-parameters. These two jumpers are normally left in the OFF position.
-
-
-
-(Generic Model 9058)
---------------------
- - from Andrew J. Kroll <ag784@freenet.buffalo.edu>
- - Sorry this sat in my to-do box for so long, Andrew! (yikes - over a
- year!)
-
-::
-
- _____
- | <
- | .---'
- ________________________________________________________________ | |
- | | SW2 | | |
- | ___________ |_____________| | |
- | | | 1 2 3 4 5 6 ___| |
- | > 6116 RAM | _________ 8 | | |
- | |___________| |20MHzXtal| 7 | | |
- | |_________| __________ 6 | S | |
- | 74LS373 | |- 5 | W | |
- | _________ | E |- 4 | | |
- | >_______| ______________|..... P |- 3 | 3 | |
- | | | : O |- 2 | | |
- | | | : X |- 1 |___| |
- | ________________ | | : Y |- | |
- | | SW1 | | SL90C65 | : |- | |
- | |________________| | | : B |- | |
- | 1 2 3 4 5 6 7 8 | | : O |- | |
- | |_________o____|..../ A |- _______| |
- | ____________________ | R |- | |------,
- | | | | D |- | BNC | # |
- | > 2764 PROM SOCKET | |__________|- |_______|------'
- | |____________________| _________ | |
- | >________| <- 74LS245 | |
- | | |
- |___ ______________| |
- |H H H H H H H H H H H H H H H H H H H H H H H| | |
- |U_U_U_U_U_U_U_U_U_U_U_U_U_U_U_U_U_U_U_U_U_U_U| | |
- \|
-
-Legend::
-
- SL90C65 ARCNET Controller / Transceiver /Logic
- SW1 1-5: IRQ Select
- 6: ET1
- 7: ET2
- 8: ROM ENABLE
- SW2 1-3: Memory Buffer/PROM Address
- 3-6: I/O Address Map
- SW3 1-8: Node ID Select
- BNC BNC RG62/U Connection
- *I* have had success using RG59B/U with *NO* terminators!
- What gives?!
-
-SW1: Timeouts, Interrupt and ROM
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-To select a hardware interrupt level set one (only one!) of the dip switches
-up (on) SW1...(switches 1-5)
-IRQ3, IRQ4, IRQ5, IRQ7, IRQ2. The Manufacturer's default is IRQ2.
-
-The switches on SW1 labeled EXT1 (switch 6) and EXT2 (switch 7)
-are used to determine the timeout parameters. These two dip switches
-are normally left off (down).
-
- To enable the 8K Boot PROM position SW1 switch 8 on (UP) labeled ROM.
- The default is jumper ROM not installed.
-
-
-Setting the I/O Base Address
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The last three switches in switch group SW2 are used to select one
-of eight possible I/O Base addresses using the following table::
-
-
- Switch | Hex I/O
- 4 5 6 | Address
- -------|--------
- 0 0 0 | 260
- 0 0 1 | 290
- 0 1 0 | 2E0 (Manufacturer's default)
- 0 1 1 | 2F0
- 1 0 0 | 300
- 1 0 1 | 350
- 1 1 0 | 380
- 1 1 1 | 3E0
-
-
-Setting the Base Memory Address (RAM & ROM)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The memory buffer requires 2K of a 16K block of RAM. The base of this
-16K block can be located in any of eight positions.
-Switches 1-3 of switch group SW2 select the Base of the 16K block.
-(0 = DOWN, 1 = UP)
-I could, however, only verify two settings...
-
-
-::
-
- Switch| Hex RAM | Hex ROM
- 1 2 3 | Address | Address
- ------|---------|-----------
- 0 0 0 | E0000 | E2000
- 0 0 1 | D0000 | D2000 (Manufacturer's default)
- 0 1 0 | ????? | ?????
- 0 1 1 | ????? | ?????
- 1 0 0 | ????? | ?????
- 1 0 1 | ????? | ?????
- 1 1 0 | ????? | ?????
- 1 1 1 | ????? | ?????
-
-
-Setting the Node ID
-^^^^^^^^^^^^^^^^^^^
-
-The eight switches in group SW3 are used to set the node ID.
-Each node attached to the network must have an unique node ID which
-must be different from 0.
-Switch 1 serves as the least significant bit (LSB).
-switches in the DOWN position are OFF (0) and in the UP position are ON (1)
-
-The node ID is the sum of the values of all switches set to "1"
-These values are::
-
- Switch | Value
- -------|-------
- 1 | 1
- 2 | 2
- 3 | 4
- 4 | 8
- 5 | 16
- 6 | 32
- 7 | 64
- 8 | 128
-
-Some Examples::
-
- Switch# | Hex | Decimal
- 8 7 6 5 4 3 2 1 | Node ID | Node ID
- ----------------|---------|---------
- 0 0 0 0 0 0 0 0 | not allowed <-.
- 0 0 0 0 0 0 0 1 | 1 | 1 |
- 0 0 0 0 0 0 1 0 | 2 | 2 |
- 0 0 0 0 0 0 1 1 | 3 | 3 |
- . . . | | |
- 0 1 0 1 0 1 0 1 | 55 | 85 |
- . . . | | + Don't use 0 or 255!
- 1 0 1 0 1 0 1 0 | AA | 170 |
- . . . | | |
- 1 1 1 1 1 1 0 1 | FD | 253 |
- 1 1 1 1 1 1 1 0 | FE | 254 |
- 1 1 1 1 1 1 1 1 | FF | 255 <-'
-
-
-Tiara
-=====
-
-(model unknown)
----------------
-
- - from Christoph Lameter <cl@gentwo.org>
-
-
-Here is information about my card as far as I could figure it out::
-
-
- ----------------------------------------------- tiara
- Tiara LanCard of Tiara Computer Systems.
-
- +----------------------------------------------+
- ! ! Transmitter Unit ! !
- ! +------------------+ -------
- ! MEM Coax Connector
- ! ROM 7654321 <- I/O -------
- ! : : +--------+ !
- ! : : ! 90C66LJ! +++
- ! : : ! ! !D Switch to set
- ! : : ! ! !I the Nodenumber
- ! : : +--------+ !P
- ! !++
- ! 234567 <- IRQ !
- +------------!!!!!!!!!!!!!!!!!!!!!!!!--------+
- !!!!!!!!!!!!!!!!!!!!!!!!
-
-- 0 = Jumper Installed
-- 1 = Open
-
-Top Jumper line Bit 7 = ROM Enable 654=Memory location 321=I/O
-
-Settings for Memory Location (Top Jumper Line)
-
-=== ================
-456 Address selected
-=== ================
-000 C0000
-001 C4000
-010 CC000
-011 D0000
-100 D4000
-101 D8000
-110 DC000
-111 E0000
-=== ================
-
-Settings for I/O Address (Top Jumper Line)
-
-=== ====
-123 Port
-=== ====
-000 260
-001 290
-010 2E0
-011 2F0
-100 300
-101 350
-110 380
-111 3E0
-=== ====
-
-Settings for IRQ Selection (Lower Jumper Line)
-
-====== =====
-234567
-====== =====
-011111 IRQ 2
-101111 IRQ 3
-110111 IRQ 4
-111011 IRQ 5
-111110 IRQ 7
-====== =====
-
-Other Cards
-===========
-
-I have no information on other models of ARCnet cards at the moment.
-
-Thanks.
diff --git a/Documentation/networking/arcnet.rst b/Documentation/networking/arcnet.rst
index cd43a18ad149..ce1b009bef96 100644
--- a/Documentation/networking/arcnet.rst
+++ b/Documentation/networking/arcnet.rst
@@ -8,7 +8,7 @@ ARCnet
.. note::
- See also arcnet-hardware.txt in this directory for jumper-setting
+ See also arcnet-hardware.rst in this directory for jumper-setting
and cabling information if you're like many of us and didn't happen to get a
manual with your ARCnet card.
@@ -88,157 +88,43 @@ versions are available on my WWW page, or via e-mail if you don't have WWW
access.
-Installing the Driver
----------------------
-All you will need to do in order to install the driver is::
+Supported Hardware
+------------------
- make config
- (be sure to choose ARCnet in the network devices
- and at least one chipset driver.)
- make clean
- make zImage
+Only PCI and PCI Express devices based on the COM20020 chipset are supported.
+This is the newest chipset from SMC with support for promiscuous mode (packet
+sniffing), extra diagnostic information, etc. These devices use the com20020_pci
+driver.
-If you obtained this ARCnet package as an upgrade to the ARCnet driver in
-your current kernel, you will need to first copy arcnet.c over the one in
-the linux/drivers/net directory.
+Support for older chipsets and ISA and PCMCIA devices was previously available
+but has been removed.
-You will know the driver is installed properly if you get some ARCnet
-messages when you reboot into the new Linux kernel.
-There are four chipset options:
-
- 1. Standard ARCnet COM90xx chipset.
-
-This is the normal ARCnet card, which you've probably got. This is the only
-chipset driver which will autoprobe if not told where the card is.
-It following options on the command line::
-
- com90xx=[<io>[,<irq>[,<shmem>]]][,<name>] | <name>
-
-If you load the chipset support as a module, the options are::
-
- io=<io> irq=<irq> shmem=<shmem> device=<name>
-
-To disable the autoprobe, just specify "com90xx=" on the kernel command line.
-To specify the name alone, but allow autoprobe, just put "com90xx=<name>"
-
- 2. ARCnet COM20020 chipset.
+Configuring the Driver
+----------------------
-This is the new chipset from SMC with support for promiscuous mode (packet
-sniffing), extra diagnostic information, etc. Unfortunately, there is no
-sensible method of autoprobing for these cards. You must specify the I/O
-address on the kernel command line.
+The COM20020 driver will be loaded automatically at boot if a supported card is
+detected.
-The command line options are::
+If the com20020_pci driver was compiled as a loadable module, the options are::
- com20020=<io>[,<irq>[,<node_ID>[,backplane[,CKP[,timeout]]]]][,name]
+ node=<node_ID> backplane=<backplane> clockp=<CKP> clockm=<CKM>
+ timeout=<timeout> device=<interface_name>
-If you load the chipset support as a module, the options are::
+If the driver was compiled into the kernel, the same options can be specified on
+the kernel command line by prefixing them with `com20020_pci.`, as in the
+following example::
- io=<io> irq=<irq> node=<node_ID> backplane=<backplane> clock=<CKP>
- timeout=<timeout> device=<name>
+ com20020_pci.device=eth1
The COM20020 chipset allows you to set the node ID in software, overriding the
default which is still set in DIP switches on the card. If you don't have the
-COM20020 data sheets, and you don't know what the other three options refer
+COM20020 data sheets, and you don't know what the other options refer
to, then they won't interest you - forget them.
- 3. ARCnet COM90xx chipset in IO-mapped mode.
-
-This will also work with the normal ARCnet cards, but doesn't use the shared
-memory. It performs less well than the above driver, but is provided in case
-you have a card which doesn't support shared memory, or (strangely) in case
-you have so many ARCnet cards in your machine that you run out of shmem slots.
-If you don't give the IO address on the kernel command line, then the driver
-will not find the card.
-
-The command line options are::
-
- com90io=<io>[,<irq>][,<name>]
-
-If you load the chipset support as a module, the options are:
- io=<io> irq=<irq> device=<name>
-
- 4. ARCnet RIM I cards.
-
-These are COM90xx chips which are _completely_ memory mapped. The support for
-these is not tested. If you have one, please mail the author with a success
-report. All options must be specified, except the device name.
-Command line options::
-
- arcrimi=<shmem>,<irq>,<node_ID>[,<name>]
-
-If you load the chipset support as a module, the options are::
-
- shmem=<shmem> irq=<irq> node=<node_ID> device=<name>
-
-
-Loadable Module Support
------------------------
-
-Configure and rebuild Linux. When asked, answer 'm' to "Generic ARCnet
-support" and to support for your ARCnet chipset if you want to use the
-loadable module. You can also say 'y' to "Generic ARCnet support" and 'm'
-to the chipset support if you wish.
-
-::
-
- make config
- make clean
- make zImage
- make modules
-
-If you're using a loadable module, you need to use insmod to load it, and
-you can specify various characteristics of your card on the command
-line. (In recent versions of the driver, autoprobing is much more reliable
-and works as a module, so most of this is now unnecessary.)
-
-For example::
-
- cd /usr/src/linux/modules
- insmod arcnet.o
- insmod com90xx.o
- insmod com20020.o io=0x2e0 device=eth1
-
-
-Using the Driver
-----------------
-
-If you build your kernel with ARCnet COM90xx support included, it should
-probe for your card automatically when you boot. If you use a different
-chipset driver complied into the kernel, you must give the necessary options
-on the kernel command line, as detailed above.
-
-Go read the NET-2-HOWTO and ETHERNET-HOWTO for Linux; they should be
-available where you picked up this driver. Think of your ARCnet as a
-souped-up (or down, as the case may be) Ethernet card.
-
-By the way, be sure to change all references from "eth0" to "arc0" in the
-HOWTOs. Remember that ARCnet isn't a "true" Ethernet, and the device name
-is DIFFERENT.
-
-
-Multiple Cards in One Computer
-------------------------------
-
-Linux has pretty good support for this now, but since I've been busy, the
-ARCnet driver has somewhat suffered in this respect. COM90xx support, if
-compiled into the kernel, will (try to) autodetect all the installed cards.
-
-If you have other cards, with support compiled into the kernel, then you can
-just repeat the options on the kernel command line, e.g.::
-
- LILO: linux com20020=0x2e0 com20020=0x380 com90io=0x260
-
-If you have the chipset support built as a loadable module, then you need to
-do something like this::
-
- insmod -o arc0 com90xx
- insmod -o arc1 com20020 io=0x2e0
- insmod -o arc2 com90xx
-
-The ARCnet drivers will now sort out their names automatically.
+Otherwise, ARCnet can be configured in a similar way to Ethernet, with the
+exception that ARCnet interface names begin with `arc`.
How do I get it to work with...?
@@ -524,10 +410,6 @@ first! D_DURING displays 4-5 lines for each packet sent or received. D_TX,
D_RX, and D_SKB actually DISPLAY each packet as it is sent or received,
which is obviously quite big.
-Starting with v2.40 ALPHA, the autoprobe routines have changed
-significantly. In particular, they won't tell you why the card was not
-found unless you turn on the D_INIT_REASONS debugging flag.
-
Once the driver is running, you can run the arcdump shell script (available
from me or in the full ARCnet package, if you have it) as root to list the
contents of the arcnet buffers at any time. To make any sense at all out of
@@ -548,7 +430,7 @@ out which bytes are being used by a packet.
You can change the debug level without recompiling the kernel by typing::
ifconfig arc0 down metric 1xxx
- /etc/rc.d/rc.inet1
+ ifconfig arc0 up
where "xxx" is the debug level you want. For example, "metric 1015" would put
you at debug level 15. Debug level 7 is currently the default.
diff --git a/arch/mips/configs/mtx1_defconfig b/arch/mips/configs/mtx1_defconfig
index 3629afbe5d75..1d223be90993 100644
--- a/arch/mips/configs/mtx1_defconfig
+++ b/arch/mips/configs/mtx1_defconfig
@@ -221,12 +221,8 @@ CONFIG_ARCNET_1201=m
CONFIG_ARCNET_1051=m
CONFIG_ARCNET_RAW=m
CONFIG_ARCNET_CAP=m
-CONFIG_ARCNET_COM90xx=m
-CONFIG_ARCNET_COM90xxIO=m
-CONFIG_ARCNET_RIM_I=m
CONFIG_ARCNET_COM20020=m
CONFIG_ARCNET_COM20020_PCI=m
-CONFIG_ARCNET_COM20020_CS=m
CONFIG_VORTEX=m
CONFIG_TYPHOON=m
CONFIG_ADAPTEC_STARFIRE=m
diff --git a/drivers/net/arcnet/Kconfig b/drivers/net/arcnet/Kconfig
index d1d07a1d4fbc..4611a37168c4 100644
--- a/drivers/net/arcnet/Kconfig
+++ b/drivers/net/arcnet/Kconfig
@@ -4,7 +4,7 @@
#
menuconfig ARCNET
- depends on NETDEVICES && (ISA || PCI || PCMCIA) && HAS_IOPORT
+ depends on NETDEVICES && PCI && HAS_IOPORT
tristate "ARCnet support"
help
If you have a network card of this type, say Y and check out the
@@ -12,9 +12,7 @@ menuconfig ARCNET
<file:Documentation/networking/arcnet.rst>.
You need both this driver, and the driver for the particular ARCnet
- chipset of your card. If you don't know, then it's probably a
- COM90xx type card, so say Y (or M) to "ARCnet COM90xx chipset
- support" below.
+ chipset of your card.
To compile this driver as a module, choose M here. The module will
be called arcnet.
@@ -70,38 +68,6 @@ config ARCNET_CAP
Cap only listens to protocol 1-8.
-config ARCNET_COM90xx
- tristate "ARCnet COM90xx (normal) chipset driver"
- help
- This is the chipset driver for the standard COM90xx cards. If you
- have always used the old ARCnet driver without knowing what type of
- card you had, this is probably the one for you.
-
- To compile this driver as a module, choose M here. The module will
- be called com90xx.
-
-config ARCNET_COM90xxIO
- tristate "ARCnet COM90xx (IO mapped) chipset driver"
- help
- This is the chipset driver for the COM90xx cards, using them in
- IO-mapped mode instead of memory-mapped mode. This is slower than
- the normal driver. Only use it if your card doesn't support shared
- memory.
-
- To compile this driver as a module, choose M here. The module will
- be called com90io.
-
-config ARCNET_RIM_I
- tristate "ARCnet COM90xx (RIM I) chipset driver"
- help
- This is yet another chipset driver for the COM90xx cards, but this
- time only using memory-mapped mode, and no IO ports at all. This
- driver is completely untested, so if you have one of these cards,
- please mail <dwmw2@infradead.org>, especially if it works!
-
- To compile this driver as a module, choose M here. The module will
- be called arc-rimi.
-
config ARCNET_COM20020
tristate "ARCnet COM20020 chipset driver"
depends on LEDS_CLASS
@@ -113,22 +79,8 @@ config ARCNET_COM20020
To compile this driver as a module, choose M here. The module will
be called com20020.
-config ARCNET_COM20020_ISA
- tristate "Support for COM20020 on ISA"
- depends on ARCNET_COM20020 && ISA
-
config ARCNET_COM20020_PCI
tristate "Support for COM20020 on PCI"
depends on ARCNET_COM20020 && PCI
-config ARCNET_COM20020_CS
- tristate "COM20020 ARCnet PCMCIA support"
- depends on ARCNET_COM20020 && PCMCIA
- help
- Say Y here if you intend to attach this type of ARCnet PCMCIA card
- to your computer.
-
- To compile this driver as a module, choose M here: the module will be
- called com20020_cs. If unsure, say N.
-
endif # ARCNET
diff --git a/drivers/net/arcnet/Makefile b/drivers/net/arcnet/Makefile
index 53525e8ea130..e5df03a08b0e 100644
--- a/drivers/net/arcnet/Makefile
+++ b/drivers/net/arcnet/Makefile
@@ -7,10 +7,5 @@ obj-$(CONFIG_ARCNET_1201) += rfc1201.o
obj-$(CONFIG_ARCNET_1051) += rfc1051.o
obj-$(CONFIG_ARCNET_RAW) += arc-rawmode.o
obj-$(CONFIG_ARCNET_CAP) += capmode.o
-obj-$(CONFIG_ARCNET_COM90xx) += com90xx.o
-obj-$(CONFIG_ARCNET_COM90xxIO) += com90io.o
-obj-$(CONFIG_ARCNET_RIM_I) += arc-rimi.o
obj-$(CONFIG_ARCNET_COM20020) += com20020.o
-obj-$(CONFIG_ARCNET_COM20020_ISA) += com20020-isa.o
obj-$(CONFIG_ARCNET_COM20020_PCI) += com20020-pci.o
-obj-$(CONFIG_ARCNET_COM20020_CS) += com20020_cs.o
diff --git a/drivers/net/arcnet/arc-rimi.c b/drivers/net/arcnet/arc-rimi.c
deleted file mode 100644
index fb3d3565aa9a..000000000000
--- a/drivers/net/arcnet/arc-rimi.c
+++ /dev/null
@@ -1,386 +0,0 @@
-/*
- * Linux ARCnet driver - "RIM I" (entirely mem-mapped) cards
- *
- * Written 1994-1999 by Avery Pennarun.
- * Written 1999-2000 by Martin Mares <mj@ucw.cz>.
- * Derived from skeleton.c by Donald Becker.
- *
- * Special thanks to Contemporary Controls, Inc. (www.ccontrols.com)
- * for sponsoring the further development of this driver.
- *
- * **********************
- *
- * The original copyright of skeleton.c was as follows:
- *
- * skeleton.c Written 1993 by Donald Becker.
- * Copyright 1993 United States Government as represented by the
- * Director, National Security Agency. This software may only be used
- * and distributed according to the terms of the GNU General Public License as
- * modified by SRC, incorporated herein by reference.
- *
- * **********************
- *
- * For more details, see drivers/net/arcnet.c
- *
- * **********************
- */
-
-#define pr_fmt(fmt) "arcnet:" KBUILD_MODNAME ": " fmt
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/ioport.h>
-#include <linux/delay.h>
-#include <linux/netdevice.h>
-#include <linux/memblock.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/io.h>
-
-#include "arcdevice.h"
-#include "com9026.h"
-
-/* Internal function declarations */
-
-static int arcrimi_probe(struct net_device *dev);
-static int arcrimi_found(struct net_device *dev);
-static void arcrimi_command(struct net_device *dev, int command);
-static int arcrimi_status(struct net_device *dev);
-static void arcrimi_setmask(struct net_device *dev, int mask);
-static int arcrimi_reset(struct net_device *dev, int really_reset);
-static void arcrimi_copy_to_card(struct net_device *dev, int bufnum, int offset,
- void *buf, int count);
-static void arcrimi_copy_from_card(struct net_device *dev, int bufnum,
- int offset, void *buf, int count);
-
-/* Handy defines for ARCnet specific stuff */
-
-/* Amount of I/O memory used by the card */
-#define BUFFER_SIZE (512)
-#define MIRROR_SIZE (BUFFER_SIZE * 4)
-
-/* We cannot probe for a RIM I card; one reason is I don't know how to reset
- * them. In fact, we can't even get their node ID automatically. So, we
- * need to be passed a specific shmem address, IRQ, and node ID.
- */
-static int __init arcrimi_probe(struct net_device *dev)
-{
- if (BUGLVL(D_NORMAL)) {
- pr_info("%s\n", "RIM I (entirely mem-mapped) support");
- pr_info("E-mail me if you actually test the RIM I driver, please!\n");
- pr_info("Given: node %02Xh, shmem %lXh, irq %d\n",
- dev->dev_addr[0], dev->mem_start, dev->irq);
- }
-
- if (dev->mem_start <= 0 || dev->irq <= 0) {
- if (BUGLVL(D_NORMAL))
- pr_err("No autoprobe for RIM I; you must specify the shmem and irq!\n");
- return -ENODEV;
- }
- if (dev->dev_addr[0] == 0) {
- if (BUGLVL(D_NORMAL))
- pr_err("You need to specify your card's station ID!\n");
- return -ENODEV;
- }
- /* Grab the memory region at mem_start for MIRROR_SIZE bytes.
- * Later in arcrimi_found() the real size will be determined
- * and this reserve will be released and the correct size
- * will be taken.
- */
- if (!request_mem_region(dev->mem_start, MIRROR_SIZE, "arcnet (90xx)")) {
- if (BUGLVL(D_NORMAL))
- pr_notice("Card memory already allocated\n");
- return -ENODEV;
- }
- return arcrimi_found(dev);
-}
-
-static int check_mirror(unsigned long addr, size_t size)
-{
- void __iomem *p;
- int res = -1;
-
- if (!request_mem_region(addr, size, "arcnet (90xx)"))
- return -1;
-
- p = ioremap(addr, size);
- if (p) {
- if (arcnet_readb(p, COM9026_REG_R_STATUS) == TESTvalue)
- res = 1;
- else
- res = 0;
- iounmap(p);
- }
-
- release_mem_region(addr, size);
- return res;
-}
-
-/* Set up the struct net_device associated with this card.
- * Called after probing succeeds.
- */
-static int __init arcrimi_found(struct net_device *dev)
-{
- struct arcnet_local *lp;
- unsigned long first_mirror, last_mirror, shmem;
- void __iomem *p;
- int mirror_size;
- int err;
-
- p = ioremap(dev->mem_start, MIRROR_SIZE);
- if (!p) {
- release_mem_region(dev->mem_start, MIRROR_SIZE);
- arc_printk(D_NORMAL, dev, "Can't ioremap\n");
- return -ENODEV;
- }
-
- /* reserve the irq */
- if (request_irq(dev->irq, arcnet_interrupt, 0, "arcnet (RIM I)", dev)) {
- iounmap(p);
- release_mem_region(dev->mem_start, MIRROR_SIZE);
- arc_printk(D_NORMAL, dev, "Can't get IRQ %d!\n", dev->irq);
- return -ENODEV;
- }
-
- shmem = dev->mem_start;
- arcnet_writeb(TESTvalue, p, COM9026_REG_W_INTMASK);
- arcnet_writeb(TESTvalue, p, COM9026_REG_W_COMMAND);
- /* actually the station/node ID */
-
- /* find the real shared memory start/end points, including mirrors */
-
- /* guess the actual size of one "memory mirror" - the number of
- * bytes between copies of the shared memory. On most cards, it's
- * 2k (or there are no mirrors at all) but on some, it's 4k.
- */
- mirror_size = MIRROR_SIZE;
- if (arcnet_readb(p, COM9026_REG_R_STATUS) == TESTvalue &&
- check_mirror(shmem - MIRROR_SIZE, MIRROR_SIZE) == 0 &&
- check_mirror(shmem - 2 * MIRROR_SIZE, MIRROR_SIZE) == 1)
- mirror_size = 2 * MIRROR_SIZE;
-
- first_mirror = shmem - mirror_size;
- while (check_mirror(first_mirror, mirror_size) == 1)
- first_mirror -= mirror_size;
- first_mirror += mirror_size;
-
- last_mirror = shmem + mirror_size;
- while (check_mirror(last_mirror, mirror_size) == 1)
- last_mirror += mirror_size;
- last_mirror -= mirror_size;
-
- dev->mem_start = first_mirror;
- dev->mem_end = last_mirror + MIRROR_SIZE - 1;
-
- /* initialize the rest of the device structure. */
-
- lp = netdev_priv(dev);
- lp->card_name = "RIM I";
- lp->hw.command = arcrimi_command;
- lp->hw.status = arcrimi_status;
- lp->hw.intmask = arcrimi_setmask;
- lp->hw.reset = arcrimi_reset;
- lp->hw.owner = THIS_MODULE;
- lp->hw.copy_to_card = arcrimi_copy_to_card;
- lp->hw.copy_from_card = arcrimi_copy_from_card;
-
- /* re-reserve the memory region - arcrimi_probe() allocated this reqion
- * but didn't know the real size. Free that region and then re-get
- * with the correct size. There is a VERY slim chance this could
- * fail.
- */
- iounmap(p);
- release_mem_region(shmem, MIRROR_SIZE);
- if (!request_mem_region(dev->mem_start,
- dev->mem_end - dev->mem_start + 1,
- "arcnet (90xx)")) {
- arc_printk(D_NORMAL, dev, "Card memory already allocated\n");
- goto err_free_irq;
- }
-
- lp->mem_start = ioremap(dev->mem_start,
- dev->mem_end - dev->mem_start + 1);
- if (!lp->mem_start) {
- arc_printk(D_NORMAL, dev, "Can't remap device memory!\n");
- goto err_release_mem;
- }
-
- /* get and check the station ID from offset 1 in shmem */
- arcnet_set_addr(dev, arcnet_readb(lp->mem_start,
- COM9026_REG_R_STATION));
-
- arc_printk(D_NORMAL, dev, "ARCnet RIM I: station %02Xh found at IRQ %d, ShMem %lXh (%ld*%d bytes)\n",
- dev->dev_addr[0],
- dev->irq, dev->mem_start,
- (dev->mem_end - dev->mem_start + 1) / mirror_size,
- mirror_size);
-
- err = register_netdev(dev);
- if (err)
- goto err_unmap;
-
- return 0;
-
-err_unmap:
- iounmap(lp->mem_start);
-err_release_mem:
- release_mem_region(dev->mem_start, dev->mem_end - dev->mem_start + 1);
-err_free_irq:
- free_irq(dev->irq, dev);
- return -EIO;
-}
-
-/* Do a hardware reset on the card, and set up necessary registers.
- *
- * This should be called as little as possible, because it disrupts the
- * token on the network (causes a RECON) and requires a significant delay.
- *
- * However, it does make sure the card is in a defined state.
- */
-static int arcrimi_reset(struct net_device *dev, int really_reset)
-{
- struct arcnet_local *lp = netdev_priv(dev);
- void __iomem *ioaddr = lp->mem_start + 0x800;
-
- arc_printk(D_INIT, dev, "Resetting %s (status=%02Xh)\n",
- dev->name, arcnet_readb(ioaddr, COM9026_REG_R_STATUS));
-
- if (really_reset) {
- arcnet_writeb(TESTvalue, ioaddr, -0x800); /* fake reset */
- return 0;
- }
- /* clear flags & end reset */
- arcnet_writeb(CFLAGScmd | RESETclear, ioaddr, COM9026_REG_W_COMMAND);
- arcnet_writeb(CFLAGScmd | CONFIGclear, ioaddr, COM9026_REG_W_COMMAND);
-
- /* enable extended (512-byte) packets */
- arcnet_writeb(CONFIGcmd | EXTconf, ioaddr, COM9026_REG_W_COMMAND);
-
- /* done! return success. */
- return 0;
-}
-
-static void arcrimi_setmask(struct net_device *dev, int mask)
-{
- struct arcnet_local *lp = netdev_priv(dev);
- void __iomem *ioaddr = lp->mem_start + 0x800;
-
- arcnet_writeb(mask, ioaddr, COM9026_REG_W_INTMASK);
-}
-
-static int arcrimi_status(struct net_device *dev)
-{
- struct arcnet_local *lp = netdev_priv(dev);
- void __iomem *ioaddr = lp->mem_start + 0x800;
-
- return arcnet_readb(ioaddr, COM9026_REG_R_STATUS);
-}
-
-static void arcrimi_command(struct net_device *dev, int cmd)
-{
- struct arcnet_local *lp = netdev_priv(dev);
- void __iomem *ioaddr = lp->mem_start + 0x800;
-
- arcnet_writeb(cmd, ioaddr, COM9026_REG_W_COMMAND);
-}
-
-static void arcrimi_copy_to_card(struct net_device *dev, int bufnum, int offset,
- void *buf, int count)
-{
- struct arcnet_local *lp = netdev_priv(dev);
- void __iomem *memaddr = lp->mem_start + 0x800 + bufnum * 512 + offset;
-
- TIME(dev, "memcpy_toio", count, memcpy_toio(memaddr, buf, count));
-}
-
-static void arcrimi_copy_from_card(struct net_device *dev, int bufnum,
- int offset, void *buf, int count)
-{
- struct arcnet_local *lp = netdev_priv(dev);
- void __iomem *memaddr = lp->mem_start + 0x800 + bufnum * 512 + offset;
-
- TIME(dev, "memcpy_fromio", count, memcpy_fromio(buf, memaddr, count));
-}
-
-static int node;
-static int io; /* use the insmod io= irq= node= options */
-static int irq;
-static char device[9]; /* use eg. device=arc1 to change name */
-
-module_param(node, int, 0);
-module_param(io, int, 0);
-module_param(irq, int, 0);
-module_param_string(device, device, sizeof(device), 0);
-MODULE_DESCRIPTION("ARCnet COM90xx RIM I chipset driver");
-MODULE_LICENSE("GPL");
-
-static struct net_device *my_dev;
-
-static int __init arc_rimi_init(void)
-{
- struct net_device *dev;
-
- dev = alloc_arcdev(device);
- if (!dev)
- return -ENOMEM;
-
- if (node && node != 0xff)
- arcnet_set_addr(dev, node);
-
- dev->mem_start = io;
- dev->irq = irq;
- if (dev->irq == 2)
- dev->irq = 9;
-
- if (arcrimi_probe(dev)) {
- free_arcdev(dev);
- return -EIO;
- }
-
- my_dev = dev;
- return 0;
-}
-
-static void __exit arc_rimi_exit(void)
-{
- struct net_device *dev = my_dev;
- struct arcnet_local *lp = netdev_priv(dev);
-
- unregister_netdev(dev);
- iounmap(lp->mem_start);
- release_mem_region(dev->mem_start, dev->mem_end - dev->mem_start + 1);
- free_irq(dev->irq, dev);
- free_arcdev(dev);
-}
-
-#ifndef MODULE
-static int __init arcrimi_setup(char *s)
-{
- int ints[8];
-
- s = get_options(s, 8, ints);
- if (!ints[0])
- return 1;
- switch (ints[0]) {
- default: /* ERROR */
- pr_err("Too many arguments\n");
- fallthrough;
- case 3: /* Node ID */
- node = ints[3];
- fallthrough;
- case 2: /* IRQ */
- irq = ints[2];
- fallthrough;
- case 1: /* IO address */
- io = ints[1];
- }
- if (*s)
- snprintf(device, sizeof(device), "%s", s);
- return 1;
-}
-__setup("arcrimi=", arcrimi_setup);
-#endif /* MODULE */
-
-module_init(arc_rimi_init)
-module_exit(arc_rimi_exit)
diff --git a/drivers/net/arcnet/com20020-isa.c b/drivers/net/arcnet/com20020-isa.c
deleted file mode 100644
index fef2ac2852a8..000000000000
--- a/drivers/net/arcnet/com20020-isa.c
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Linux ARCnet driver - COM20020 chipset support
- *
- * Written 1997 by David Woodhouse.
- * Written 1994-1999 by Avery Pennarun.
- * Written 1999-2000 by Martin Mares <mj@ucw.cz>.
- * Derived from skeleton.c by Donald Becker.
- *
- * Special thanks to Contemporary Controls, Inc. (www.ccontrols.com)
- * for sponsoring the further development of this driver.
- *
- * **********************
- *
- * The original copyright of skeleton.c was as follows:
- *
- * skeleton.c Written 1993 by Donald Becker.
- * Copyright 1993 United States Government as represented by the
- * Director, National Security Agency. This software may only be used
- * and distributed according to the terms of the GNU General Public License as
- * modified by SRC, incorporated herein by reference.
- *
- * **********************
- *
- * For more details, see drivers/net/arcnet.c
- *
- * **********************
- */
-
-#define pr_fmt(fmt) "arcnet:" KBUILD_MODNAME ": " fmt
-
-#include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/ioport.h>
-#include <linux/errno.h>
-#include <linux/delay.h>
-#include <linux/netdevice.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/memblock.h>
-#include <linux/io.h>
-
-#include "arcdevice.h"
-#include "com20020.h"
-
-/* We cannot (yet) probe for an IO mapped card, although we can check that
- * it's where we were told it was, and even do autoirq.
- */
-static int __init com20020isa_probe(struct net_device *dev)
-{
- int ioaddr;
- unsigned long airqmask;
- struct arcnet_local *lp = netdev_priv(dev);
- int err;
-
- if (BUGLVL(D_NORMAL))
- pr_info("%s\n", "COM20020 ISA support (by David Woodhouse et al.)");
-
- ioaddr = dev->base_addr;
- if (!ioaddr) {
- arc_printk(D_NORMAL, dev, "No autoprobe (yet) for IO mapped cards; you must specify the base address!\n");
- return -ENODEV;
- }
- if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "arcnet (COM20020)")) {
- arc_printk(D_NORMAL, dev, "IO region %xh-%xh already allocated.\n",
- ioaddr, ioaddr + ARCNET_TOTAL_SIZE - 1);
- return -ENXIO;
- }
- if (arcnet_inb(ioaddr, COM20020_REG_R_STATUS) == 0xFF) {
- arc_printk(D_NORMAL, dev, "IO address %x empty\n", ioaddr);
- err = -ENODEV;
- goto out;
- }
- if (com20020_check(dev)) {
- err = -ENODEV;
- goto out;
- }
-
- if (!dev->irq) {
- /* if we do this, we're sure to get an IRQ since the
- * card has just reset and the NORXflag is on until
- * we tell it to start receiving.
- */
- arc_printk(D_INIT_REASONS, dev, "intmask was %02Xh\n",
- arcnet_inb(ioaddr, COM20020_REG_R_STATUS));
- arcnet_outb(0, ioaddr, COM20020_REG_W_INTMASK);
- airqmask = probe_irq_on();
- arcnet_outb(NORXflag, ioaddr, COM20020_REG_W_INTMASK);
- udelay(1);
- arcnet_outb(0, ioaddr, COM20020_REG_W_INTMASK);
- dev->irq = probe_irq_off(airqmask);
-
- if ((int)dev->irq <= 0) {
- arc_printk(D_INIT_REASONS, dev, "Autoprobe IRQ failed first time\n");
- airqmask = probe_irq_on();
- arcnet_outb(NORXflag, ioaddr, COM20020_REG_W_INTMASK);
- udelay(5);
- arcnet_outb(0, ioaddr, COM20020_REG_W_INTMASK);
- dev->irq = probe_irq_off(airqmask);
- if ((int)dev->irq <= 0) {
- arc_printk(D_NORMAL, dev, "Autoprobe IRQ failed.\n");
- err = -ENODEV;
- goto out;
- }
- }
- }
-
- lp->card_name = "ISA COM20020";
-
- err = com20020_found(dev, 0);
- if (err != 0)
- goto out;
-
- return 0;
-
-out:
- release_region(ioaddr, ARCNET_TOTAL_SIZE);
- return err;
-}
-
-static int node = 0;
-static int io = 0x0; /* <--- EDIT THESE LINES FOR YOUR CONFIGURATION */
-static int irq = 0; /* or use the insmod io= irq= shmem= options */
-static char device[9]; /* use eg. device="arc1" to change name */
-static int timeout = 3;
-static int backplane = 0;
-static int clockp = 0;
-static int clockm = 0;
-
-module_param(node, int, 0);
-module_param_hw(io, int, ioport, 0);
-module_param_hw(irq, int, irq, 0);
-module_param_string(device, device, sizeof(device), 0);
-module_param(timeout, int, 0);
-module_param(backplane, int, 0);
-module_param(clockp, int, 0);
-module_param(clockm, int, 0);
-
-MODULE_DESCRIPTION("ARCnet COM20020 chipset ISA driver");
-MODULE_LICENSE("GPL");
-
-static struct net_device *my_dev;
-
-static int __init com20020_init(void)
-{
- struct net_device *dev;
- struct arcnet_local *lp;
-
- dev = alloc_arcdev(device);
- if (!dev)
- return -ENOMEM;
-
- if (node && node != 0xff)
- arcnet_set_addr(dev, node);
-
- dev->netdev_ops = &com20020_netdev_ops;
-
- lp = netdev_priv(dev);
- lp->backplane = backplane;
- lp->clockp = clockp & 7;
- lp->clockm = clockm & 3;
- lp->timeout = timeout & 3;
- lp->hw.owner = THIS_MODULE;
-
- dev->base_addr = io;
- dev->irq = irq;
-
- if (dev->irq == 2)
- dev->irq = 9;
-
- if (com20020isa_probe(dev)) {
- free_arcdev(dev);
- return -EIO;
- }
-
- my_dev = dev;
- return 0;
-}
-
-static void __exit com20020_exit(void)
-{
- unregister_netdev(my_dev);
- free_irq(my_dev->irq, my_dev);
- release_region(my_dev->base_addr, ARCNET_TOTAL_SIZE);
- free_arcdev(my_dev);
-}
-
-#ifndef MODULE
-static int __init com20020isa_setup(char *s)
-{
- int ints[8];
-
- s = get_options(s, 8, ints);
- if (!ints[0])
- return 1;
-
- switch (ints[0]) {
- default: /* ERROR */
- pr_info("Too many arguments\n");
- fallthrough;
- case 6: /* Timeout */
- timeout = ints[6];
- fallthrough;
- case 5: /* CKP value */
- clockp = ints[5];
- fallthrough;
- case 4: /* Backplane flag */
- backplane = ints[4];
- fallthrough;
- case 3: /* Node ID */
- node = ints[3];
- fallthrough;
- case 2: /* IRQ */
- irq = ints[2];
- fallthrough;
- case 1: /* IO address */
- io = ints[1];
- }
- if (*s)
- snprintf(device, sizeof(device), "%s", s);
- return 1;
-}
-
-__setup("com20020=", com20020isa_setup);
-
-#endif /* MODULE */
-
-module_init(com20020_init)
-module_exit(com20020_exit)
diff --git a/drivers/net/arcnet/com20020.c b/drivers/net/arcnet/com20020.c
index f2fa26626a06..adcf69cb9d50 100644
--- a/drivers/net/arcnet/com20020.c
+++ b/drivers/net/arcnet/com20020.c
@@ -385,9 +385,7 @@ static void com20020_set_rx_mode(struct net_device *dev)
}
}
-#if defined(CONFIG_ARCNET_COM20020_PCI_MODULE) || \
- defined(CONFIG_ARCNET_COM20020_ISA_MODULE) || \
- defined(CONFIG_ARCNET_COM20020_CS_MODULE)
+#ifdef CONFIG_ARCNET_COM20020_PCI_MODULE
EXPORT_SYMBOL(com20020_check);
EXPORT_SYMBOL(com20020_found);
EXPORT_SYMBOL(com20020_netdev_ops);
diff --git a/drivers/net/arcnet/com20020_cs.c b/drivers/net/arcnet/com20020_cs.c
deleted file mode 100644
index 5c3c91677b62..000000000000
--- a/drivers/net/arcnet/com20020_cs.c
+++ /dev/null
@@ -1,330 +0,0 @@
-/*
- * Linux ARCnet driver - COM20020 PCMCIA support
- *
- * Written 1994-1999 by Avery Pennarun,
- * based on an ISA version by David Woodhouse.
- * Derived from ibmtr_cs.c by Steve Kipisz (pcmcia-cs 3.1.4)
- * which was derived from pcnet_cs.c by David Hinds.
- * Some additional portions derived from skeleton.c by Donald Becker.
- *
- * Special thanks to Contemporary Controls, Inc. (www.ccontrols.com)
- * for sponsoring the further development of this driver.
- *
- * **********************
- *
- * The original copyright of skeleton.c was as follows:
- *
- * skeleton.c Written 1993 by Donald Becker.
- * Copyright 1993 United States Government as represented by the
- * Director, National Security Agency. This software may only be used
- * and distributed according to the terms of the GNU General Public License as
- * modified by SRC, incorporated herein by reference.
- *
- * **********************
- * Changes:
- * Arnaldo Carvalho de Melo <acme@conectiva.com.br> - 08/08/2000
- * - reorganize kmallocs in com20020_attach, checking all for failure
- * and releasing the previous allocations if one fails
- * **********************
- *
- * For more details, see drivers/net/arcnet.c
- *
- * **********************
- */
-
-#define pr_fmt(fmt) "arcnet:" KBUILD_MODNAME ": " fmt
-
-#include <linux/kernel.h>
-#include <linux/ptrace.h>
-#include <linux/slab.h>
-#include <linux/string.h>
-#include <linux/timer.h>
-#include <linux/delay.h>
-#include <linux/module.h>
-#include <linux/netdevice.h>
-#include <linux/io.h>
-#include <pcmcia/cistpl.h>
-#include <pcmcia/ds.h>
-
-#include "arcdevice.h"
-#include "com20020.h"
-
-static void regdump(struct net_device *dev)
-{
-#ifdef DEBUG
- int ioaddr = dev->base_addr;
- int count;
-
- netdev_dbg(dev, "register dump:\n");
- for (count = 0; count < 16; count++) {
- if (!(count % 16))
- pr_cont("%04X:", ioaddr + count);
- pr_cont(" %02X", arcnet_inb(ioaddr, count));
- }
- pr_cont("\n");
-
- netdev_dbg(dev, "buffer0 dump:\n");
- /* set up the address register */
- count = 0;
- arcnet_outb((count >> 8) | RDDATAflag | AUTOINCflag,
- ioaddr, COM20020_REG_W_ADDR_HI);
- arcnet_outb(count & 0xff, ioaddr, COM20020_REG_W_ADDR_LO);
-
- for (count = 0; count < 256 + 32; count++) {
- if (!(count % 16))
- pr_cont("%04X:", count);
-
- /* copy the data */
- pr_cont(" %02X", arcnet_inb(ioaddr, COM20020_REG_RW_MEMDATA));
- }
- pr_cont("\n");
-#endif
-}
-
-/*====================================================================*/
-
-/* Parameters that can be set with 'insmod' */
-
-static int node;
-static int timeout = 3;
-static int backplane;
-static int clockp;
-static int clockm;
-
-module_param(node, int, 0);
-module_param(timeout, int, 0);
-module_param(backplane, int, 0);
-module_param(clockp, int, 0);
-module_param(clockm, int, 0);
-
-MODULE_DESCRIPTION("ARCnet COM20020 chipset PCMCIA driver");
-MODULE_LICENSE("GPL");
-
-/*====================================================================*/
-
-static int com20020_config(struct pcmcia_device *link);
-static void com20020_release(struct pcmcia_device *link);
-
-static void com20020_detach(struct pcmcia_device *p_dev);
-
-/*====================================================================*/
-
-static int com20020_probe(struct pcmcia_device *p_dev)
-{
- struct com20020_dev *info;
- struct net_device *dev;
- struct arcnet_local *lp;
- int ret = -ENOMEM;
-
- dev_dbg(&p_dev->dev, "com20020_attach()\n");
-
- /* Create new network device */
- info = kzalloc_obj(*info);
- if (!info)
- goto fail_alloc_info;
-
- dev = alloc_arcdev("");
- if (!dev)
- goto fail_alloc_dev;
-
- lp = netdev_priv(dev);
- lp->timeout = timeout;
- lp->backplane = backplane;
- lp->clockp = clockp;
- lp->clockm = clockm & 3;
- lp->hw.owner = THIS_MODULE;
-
- /* fill in our module parameters as defaults */
- arcnet_set_addr(dev, node);
-
- p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
- p_dev->resource[0]->end = 16;
- p_dev->config_flags |= CONF_ENABLE_IRQ;
-
- info->dev = dev;
- p_dev->priv = info;
-
- ret = com20020_config(p_dev);
- if (ret)
- goto fail_config;
-
- return 0;
-
-fail_config:
- free_arcdev(dev);
-fail_alloc_dev:
- kfree(info);
-fail_alloc_info:
- return ret;
-} /* com20020_attach */
-
-static void com20020_detach(struct pcmcia_device *link)
-{
- struct com20020_dev *info = link->priv;
- struct net_device *dev = info->dev;
-
- dev_dbg(&link->dev, "detach...\n");
-
- dev_dbg(&link->dev, "com20020_detach\n");
-
- dev_dbg(&link->dev, "unregister...\n");
-
- unregister_netdev(dev);
-
- /* this is necessary because we register our IRQ separately
- * from card services.
- */
- if (dev->irq)
- free_irq(dev->irq, dev);
-
- com20020_release(link);
-
- /* Unlink device structure, free bits */
- dev_dbg(&link->dev, "unlinking...\n");
- if (link->priv) {
- dev = info->dev;
- if (dev) {
- dev_dbg(&link->dev, "kfree...\n");
- free_arcdev(dev);
- }
- dev_dbg(&link->dev, "kfree2...\n");
- kfree(info);
- }
-
-} /* com20020_detach */
-
-static int com20020_config(struct pcmcia_device *link)
-{
- struct arcnet_local *lp;
- struct com20020_dev *info;
- struct net_device *dev;
- int i, ret;
- int ioaddr;
-
- info = link->priv;
- dev = info->dev;
-
- dev_dbg(&link->dev, "config...\n");
-
- dev_dbg(&link->dev, "com20020_config\n");
-
- dev_dbg(&link->dev, "baseport1 is %Xh\n",
- (unsigned int)link->resource[0]->start);
-
- i = -ENODEV;
- link->io_lines = 16;
-
- if (!link->resource[0]->start) {
- for (ioaddr = 0x100; ioaddr < 0x400; ioaddr += 0x10) {
- link->resource[0]->start = ioaddr;
- i = pcmcia_request_io(link);
- if (i == 0)
- break;
- }
- } else {
- i = pcmcia_request_io(link);
- }
-
- if (i != 0) {
- dev_dbg(&link->dev, "requestIO failed totally!\n");
- goto failed;
- }
-
- ioaddr = dev->base_addr = link->resource[0]->start;
- dev_dbg(&link->dev, "got ioaddr %Xh\n", ioaddr);
-
- dev_dbg(&link->dev, "request IRQ %d\n",
- link->irq);
- if (!link->irq) {
- dev_dbg(&link->dev, "requestIRQ failed totally!\n");
- goto failed;
- }
-
- dev->irq = link->irq;
-
- ret = pcmcia_enable_device(link);
- if (ret)
- goto failed;
-
- if (com20020_check(dev)) {
- regdump(dev);
- goto failed;
- }
-
- lp = netdev_priv(dev);
- lp->card_name = "PCMCIA COM20020";
- lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */
-
- SET_NETDEV_DEV(dev, &link->dev);
-
- i = com20020_found(dev, 0); /* calls register_netdev */
-
- if (i != 0) {
- dev_notice(&link->dev,
- "com20020_found() failed\n");
- goto failed;
- }
-
- netdev_dbg(dev, "port %#3lx, irq %d\n",
- dev->base_addr, dev->irq);
- return 0;
-
-failed:
- dev_dbg(&link->dev, "com20020_config failed...\n");
- com20020_release(link);
- return -ENODEV;
-} /* com20020_config */
-
-static void com20020_release(struct pcmcia_device *link)
-{
- dev_dbg(&link->dev, "com20020_release\n");
- pcmcia_disable_device(link);
-}
-
-static int com20020_suspend(struct pcmcia_device *link)
-{
- struct com20020_dev *info = link->priv;
- struct net_device *dev = info->dev;
-
- if (link->open)
- netif_device_detach(dev);
-
- return 0;
-}
-
-static int com20020_resume(struct pcmcia_device *link)
-{
- struct com20020_dev *info = link->priv;
- struct net_device *dev = info->dev;
-
- if (link->open) {
- int ioaddr = dev->base_addr;
- struct arcnet_local *lp = netdev_priv(dev);
-
- arcnet_outb(lp->config | 0x80, ioaddr, COM20020_REG_W_CONFIG);
- udelay(5);
- arcnet_outb(lp->config, ioaddr, COM20020_REG_W_CONFIG);
- }
-
- return 0;
-}
-
-static const struct pcmcia_device_id com20020_ids[] = {
- PCMCIA_DEVICE_PROD_ID12("Contemporary Control Systems, Inc.",
- "PCM20 Arcnet Adapter", 0x59991666, 0x95dfffaf),
- PCMCIA_DEVICE_PROD_ID12("SoHard AG",
- "SH ARC PCMCIA", 0xf8991729, 0x69dff0c7),
- PCMCIA_DEVICE_NULL
-};
-MODULE_DEVICE_TABLE(pcmcia, com20020_ids);
-
-static struct pcmcia_driver com20020_cs_driver = {
- .owner = THIS_MODULE,
- .name = "com20020_cs",
- .probe = com20020_probe,
- .remove = com20020_detach,
- .id_table = com20020_ids,
- .suspend = com20020_suspend,
- .resume = com20020_resume,
-};
-module_pcmcia_driver(com20020_cs_driver);
diff --git a/drivers/net/arcnet/com90io.c b/drivers/net/arcnet/com90io.c
deleted file mode 100644
index 3b463fbc6402..000000000000
--- a/drivers/net/arcnet/com90io.c
+++ /dev/null
@@ -1,427 +0,0 @@
-/*
- * Linux ARCnet driver - COM90xx chipset (IO-mapped buffers)
- *
- * Written 1997 by David Woodhouse.
- * Written 1994-1999 by Avery Pennarun.
- * Written 1999-2000 by Martin Mares <mj@ucw.cz>.
- * Derived from skeleton.c by Donald Becker.
- *
- * Special thanks to Contemporary Controls, Inc. (www.ccontrols.com)
- * for sponsoring the further development of this driver.
- *
- * **********************
- *
- * The original copyright of skeleton.c was as follows:
- *
- * skeleton.c Written 1993 by Donald Becker.
- * Copyright 1993 United States Government as represented by the
- * Director, National Security Agency. This software may only be used
- * and distributed according to the terms of the GNU General Public License as
- * modified by SRC, incorporated herein by reference.
- *
- * **********************
- *
- * For more details, see drivers/net/arcnet.c
- *
- * **********************
- */
-
-#define pr_fmt(fmt) "arcnet:" KBUILD_MODNAME ": " fmt
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/ioport.h>
-#include <linux/delay.h>
-#include <linux/netdevice.h>
-#include <linux/memblock.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/io.h>
-
-#include "arcdevice.h"
-#include "com9026.h"
-
-/* Internal function declarations */
-
-static int com90io_found(struct net_device *dev);
-static void com90io_command(struct net_device *dev, int command);
-static int com90io_status(struct net_device *dev);
-static void com90io_setmask(struct net_device *dev, int mask);
-static int com90io_reset(struct net_device *dev, int really_reset);
-static void com90io_copy_to_card(struct net_device *dev, int bufnum, int offset,
- void *buf, int count);
-static void com90io_copy_from_card(struct net_device *dev, int bufnum,
- int offset, void *buf, int count);
-
-/* Handy defines for ARCnet specific stuff */
-
-/* The number of low I/O ports used by the card. */
-#define ARCNET_TOTAL_SIZE 16
-
-/****************************************************************************
- * *
- * IO-mapped operation routines *
- * *
- ****************************************************************************/
-
-#undef ONE_AT_A_TIME_TX
-#undef ONE_AT_A_TIME_RX
-
-static u_char get_buffer_byte(struct net_device *dev, unsigned offset)
-{
- int ioaddr = dev->base_addr;
-
- arcnet_outb(offset >> 8, ioaddr, COM9026_REG_W_ADDR_HI);
- arcnet_outb(offset & 0xff, ioaddr, COM9026_REG_W_ADDR_LO);
-
- return arcnet_inb(ioaddr, COM9026_REG_RW_MEMDATA);
-}
-
-#ifdef ONE_AT_A_TIME_TX
-static void put_buffer_byte(struct net_device *dev, unsigned offset,
- u_char datum)
-{
- int ioaddr = dev->base_addr;
-
- arcnet_outb(offset >> 8, ioaddr, COM9026_REG_W_ADDR_HI);
- arcnet_outb(offset & 0xff, ioaddr, COM9026_REG_W_ADDR_LO);
-
- arcnet_outb(datum, ioaddr, COM9026_REG_RW_MEMDATA);
-}
-
-#endif
-
-static void get_whole_buffer(struct net_device *dev, unsigned offset,
- unsigned length, char *dest)
-{
- int ioaddr = dev->base_addr;
-
- arcnet_outb((offset >> 8) | AUTOINCflag, ioaddr, COM9026_REG_W_ADDR_HI);
- arcnet_outb(offset & 0xff, ioaddr, COM9026_REG_W_ADDR_LO);
-
- while (length--)
-#ifdef ONE_AT_A_TIME_RX
- *(dest++) = get_buffer_byte(dev, offset++);
-#else
- *(dest++) = arcnet_inb(ioaddr, COM9026_REG_RW_MEMDATA);
-#endif
-}
-
-static void put_whole_buffer(struct net_device *dev, unsigned offset,
- unsigned length, char *dest)
-{
- int ioaddr = dev->base_addr;
-
- arcnet_outb((offset >> 8) | AUTOINCflag, ioaddr, COM9026_REG_W_ADDR_HI);
- arcnet_outb(offset & 0xff, ioaddr,COM9026_REG_W_ADDR_LO);
-
- while (length--)
-#ifdef ONE_AT_A_TIME_TX
- put_buffer_byte(dev, offset++, *(dest++));
-#else
- arcnet_outb(*(dest++), ioaddr, COM9026_REG_RW_MEMDATA);
-#endif
-}
-
-/* We cannot probe for an IO mapped card either, although we can check that
- * it's where we were told it was, and even autoirq
- */
-static int __init com90io_probe(struct net_device *dev)
-{
- int ioaddr = dev->base_addr, status;
- unsigned long airqmask;
-
- if (BUGLVL(D_NORMAL)) {
- pr_info("%s\n", "COM90xx IO-mapped mode support (by David Woodhouse et el.)");
- pr_info("E-mail me if you actually test this driver, please!\n");
- }
-
- if (!ioaddr) {
- arc_printk(D_NORMAL, dev, "No autoprobe for IO mapped cards; you must specify the base address!\n");
- return -ENODEV;
- }
- if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "com90io probe")) {
- arc_printk(D_INIT_REASONS, dev, "IO request_region %x-%x failed\n",
- ioaddr, ioaddr + ARCNET_TOTAL_SIZE - 1);
- return -ENXIO;
- }
- if (arcnet_inb(ioaddr, COM9026_REG_R_STATUS) == 0xFF) {
- arc_printk(D_INIT_REASONS, dev, "IO address %x empty\n",
- ioaddr);
- goto err_out;
- }
- arcnet_inb(ioaddr, COM9026_REG_R_RESET);
- mdelay(RESETtime);
-
- status = arcnet_inb(ioaddr, COM9026_REG_R_STATUS);
-
- if ((status & 0x9D) != (NORXflag | RECONflag | TXFREEflag | RESETflag)) {
- arc_printk(D_INIT_REASONS, dev, "Status invalid (%Xh)\n",
- status);
- goto err_out;
- }
- arc_printk(D_INIT_REASONS, dev, "Status after reset: %X\n", status);
-
- arcnet_outb(CFLAGScmd | RESETclear | CONFIGclear,
- ioaddr, COM9026_REG_W_COMMAND);
-
- arc_printk(D_INIT_REASONS, dev, "Status after reset acknowledged: %X\n",
- status);
-
- status = arcnet_inb(ioaddr, COM9026_REG_R_STATUS);
-
- if (status & RESETflag) {
- arc_printk(D_INIT_REASONS, dev, "Eternal reset (status=%Xh)\n",
- status);
- goto err_out;
- }
- arcnet_outb((0x16 | IOMAPflag) & ~ENABLE16flag,
- ioaddr, COM9026_REG_RW_CONFIG);
-
- /* Read first loc'n of memory */
-
- arcnet_outb(AUTOINCflag, ioaddr, COM9026_REG_W_ADDR_HI);
- arcnet_outb(0, ioaddr, COM9026_REG_W_ADDR_LO);
-
- status = arcnet_inb(ioaddr, COM9026_REG_RW_MEMDATA);
- if (status != 0xd1) {
- arc_printk(D_INIT_REASONS, dev, "Signature byte not found (%Xh instead).\n",
- status);
- goto err_out;
- }
- if (!dev->irq) {
- /* if we do this, we're sure to get an IRQ since the
- * card has just reset and the NORXflag is on until
- * we tell it to start receiving.
- */
-
- airqmask = probe_irq_on();
- arcnet_outb(NORXflag, ioaddr, COM9026_REG_W_INTMASK);
- udelay(1);
- arcnet_outb(0, ioaddr, COM9026_REG_W_INTMASK);
- dev->irq = probe_irq_off(airqmask);
-
- if ((int)dev->irq <= 0) {
- arc_printk(D_INIT_REASONS, dev, "Autoprobe IRQ failed\n");
- goto err_out;
- }
- }
- release_region(ioaddr, ARCNET_TOTAL_SIZE); /* end of probing */
- return com90io_found(dev);
-
-err_out:
- release_region(ioaddr, ARCNET_TOTAL_SIZE);
- return -ENODEV;
-}
-
-/* Set up the struct net_device associated with this card. Called after
- * probing succeeds.
- */
-static int __init com90io_found(struct net_device *dev)
-{
- struct arcnet_local *lp;
- int ioaddr = dev->base_addr;
- int err;
-
- /* Reserve the irq */
- if (request_irq(dev->irq, arcnet_interrupt, 0,
- "arcnet (COM90xx-IO)", dev)) {
- arc_printk(D_NORMAL, dev, "Can't get IRQ %d!\n", dev->irq);
- return -ENODEV;
- }
- /* Reserve the I/O region */
- if (!request_region(dev->base_addr, ARCNET_TOTAL_SIZE,
- "arcnet (COM90xx-IO)")) {
- free_irq(dev->irq, dev);
- return -EBUSY;
- }
-
- lp = netdev_priv(dev);
- lp->card_name = "COM90xx I/O";
- lp->hw.command = com90io_command;
- lp->hw.status = com90io_status;
- lp->hw.intmask = com90io_setmask;
- lp->hw.reset = com90io_reset;
- lp->hw.owner = THIS_MODULE;
- lp->hw.copy_to_card = com90io_copy_to_card;
- lp->hw.copy_from_card = com90io_copy_from_card;
-
- lp->config = (0x16 | IOMAPflag) & ~ENABLE16flag;
- arcnet_outb(lp->config, ioaddr, COM9026_REG_RW_CONFIG);
-
- /* get and check the station ID from offset 1 in shmem */
-
- arcnet_set_addr(dev, get_buffer_byte(dev, 1));
-
- err = register_netdev(dev);
- if (err) {
- arcnet_outb(arcnet_inb(ioaddr, COM9026_REG_RW_CONFIG) & ~IOMAPflag,
- ioaddr, COM9026_REG_RW_CONFIG);
- free_irq(dev->irq, dev);
- release_region(dev->base_addr, ARCNET_TOTAL_SIZE);
- return err;
- }
-
- arc_printk(D_NORMAL, dev, "COM90IO: station %02Xh found at %03lXh, IRQ %d.\n",
- dev->dev_addr[0], dev->base_addr, dev->irq);
-
- return 0;
-}
-
-/* Do a hardware reset on the card, and set up necessary registers.
- *
- * This should be called as little as possible, because it disrupts the
- * token on the network (causes a RECON) and requires a significant delay.
- *
- * However, it does make sure the card is in a defined state.
- */
-static int com90io_reset(struct net_device *dev, int really_reset)
-{
- struct arcnet_local *lp = netdev_priv(dev);
- short ioaddr = dev->base_addr;
-
- arc_printk(D_INIT, dev, "Resetting %s (status=%02Xh)\n",
- dev->name, arcnet_inb(ioaddr, COM9026_REG_R_STATUS));
-
- if (really_reset) {
- /* reset the card */
- arcnet_inb(ioaddr, COM9026_REG_R_RESET);
- mdelay(RESETtime);
- }
- /* Set the thing to IO-mapped, 8-bit mode */
- lp->config = (0x1C | IOMAPflag) & ~ENABLE16flag;
- arcnet_outb(lp->config, ioaddr, COM9026_REG_RW_CONFIG);
-
- arcnet_outb(CFLAGScmd | RESETclear, ioaddr, COM9026_REG_W_COMMAND);
- /* clear flags & end reset */
- arcnet_outb(CFLAGScmd | CONFIGclear, ioaddr, COM9026_REG_W_COMMAND);
-
- /* verify that the ARCnet signature byte is present */
- if (get_buffer_byte(dev, 0) != TESTvalue) {
- arc_printk(D_NORMAL, dev, "reset failed: TESTvalue not present.\n");
- return 1;
- }
- /* enable extended (512-byte) packets */
- arcnet_outb(CONFIGcmd | EXTconf, ioaddr, COM9026_REG_W_COMMAND);
- /* done! return success. */
- return 0;
-}
-
-static void com90io_command(struct net_device *dev, int cmd)
-{
- short ioaddr = dev->base_addr;
-
- arcnet_outb(cmd, ioaddr, COM9026_REG_W_COMMAND);
-}
-
-static int com90io_status(struct net_device *dev)
-{
- short ioaddr = dev->base_addr;
-
- return arcnet_inb(ioaddr, COM9026_REG_R_STATUS);
-}
-
-static void com90io_setmask(struct net_device *dev, int mask)
-{
- short ioaddr = dev->base_addr;
-
- arcnet_outb(mask, ioaddr, COM9026_REG_W_INTMASK);
-}
-
-static void com90io_copy_to_card(struct net_device *dev, int bufnum,
- int offset, void *buf, int count)
-{
- TIME(dev, "put_whole_buffer", count,
- put_whole_buffer(dev, bufnum * 512 + offset, count, buf));
-}
-
-static void com90io_copy_from_card(struct net_device *dev, int bufnum,
- int offset, void *buf, int count)
-{
- TIME(dev, "get_whole_buffer", count,
- get_whole_buffer(dev, bufnum * 512 + offset, count, buf));
-}
-
-static int io; /* use the insmod io= irq= shmem= options */
-static int irq;
-static char device[9]; /* use eg. device=arc1 to change name */
-
-module_param_hw(io, int, ioport, 0);
-module_param_hw(irq, int, irq, 0);
-module_param_string(device, device, sizeof(device), 0);
-MODULE_DESCRIPTION("ARCnet COM90xx IO mapped chipset driver");
-MODULE_LICENSE("GPL");
-
-#ifndef MODULE
-static int __init com90io_setup(char *s)
-{
- int ints[4];
-
- s = get_options(s, 4, ints);
- if (!ints[0])
- return 0;
- switch (ints[0]) {
- default: /* ERROR */
- pr_err("Too many arguments\n");
- fallthrough;
- case 2: /* IRQ */
- irq = ints[2];
- fallthrough;
- case 1: /* IO address */
- io = ints[1];
- }
- if (*s)
- snprintf(device, sizeof(device), "%s", s);
- return 1;
-}
-__setup("com90io=", com90io_setup);
-#endif
-
-static struct net_device *my_dev;
-
-static int __init com90io_init(void)
-{
- struct net_device *dev;
- int err;
-
- dev = alloc_arcdev(device);
- if (!dev)
- return -ENOMEM;
-
- dev->base_addr = io;
- dev->irq = irq;
- if (dev->irq == 2)
- dev->irq = 9;
-
- err = com90io_probe(dev);
-
- if (err) {
- free_arcdev(dev);
- return err;
- }
-
- my_dev = dev;
- return 0;
-}
-
-static void __exit com90io_exit(void)
-{
- struct net_device *dev = my_dev;
- int ioaddr = dev->base_addr;
-
- unregister_netdev(dev);
-
- /* In case the old driver is loaded later,
- * set the thing back to MMAP mode
- */
- arcnet_outb(arcnet_inb(ioaddr, COM9026_REG_RW_CONFIG) & ~IOMAPflag,
- ioaddr, COM9026_REG_RW_CONFIG);
-
- free_irq(dev->irq, dev);
- release_region(dev->base_addr, ARCNET_TOTAL_SIZE);
- free_arcdev(dev);
-}
-
-module_init(com90io_init)
-module_exit(com90io_exit)
diff --git a/drivers/net/arcnet/com90xx.c b/drivers/net/arcnet/com90xx.c
deleted file mode 100644
index b3b287c16561..000000000000
--- a/drivers/net/arcnet/com90xx.c
+++ /dev/null
@@ -1,716 +0,0 @@
-/*
- * Linux ARCnet driver - COM90xx chipset (memory-mapped buffers)
- *
- * Written 1994-1999 by Avery Pennarun.
- * Written 1999 by Martin Mares <mj@ucw.cz>.
- * Derived from skeleton.c by Donald Becker.
- *
- * Special thanks to Contemporary Controls, Inc. (www.ccontrols.com)
- * for sponsoring the further development of this driver.
- *
- * **********************
- *
- * The original copyright of skeleton.c was as follows:
- *
- * skeleton.c Written 1993 by Donald Becker.
- * Copyright 1993 United States Government as represented by the
- * Director, National Security Agency. This software may only be used
- * and distributed according to the terms of the GNU General Public License as
- * modified by SRC, incorporated herein by reference.
- *
- * **********************
- *
- * For more details, see drivers/net/arcnet.c
- *
- * **********************
- */
-
-#define pr_fmt(fmt) "arcnet:" KBUILD_MODNAME ": " fmt
-
-#include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/ioport.h>
-#include <linux/delay.h>
-#include <linux/netdevice.h>
-#include <linux/slab.h>
-#include <linux/io.h>
-
-#include "arcdevice.h"
-#include "com9026.h"
-
-/* Define this to speed up the autoprobe by assuming if only one io port and
- * shmem are left in the list at Stage 5, they must correspond to each
- * other.
- *
- * This is undefined by default because it might not always be true, and the
- * extra check makes the autoprobe even more careful. Speed demons can turn
- * it on - I think it should be fine if you only have one ARCnet card
- * installed.
- *
- * If no ARCnet cards are installed, this delay never happens anyway and thus
- * the option has no effect.
- */
-#undef FAST_PROBE
-
-/* Internal function declarations */
-static int com90xx_found(int ioaddr, int airq, u_long shmem, void __iomem *);
-static void com90xx_command(struct net_device *dev, int command);
-static int com90xx_status(struct net_device *dev);
-static void com90xx_setmask(struct net_device *dev, int mask);
-static int com90xx_reset(struct net_device *dev, int really_reset);
-static void com90xx_copy_to_card(struct net_device *dev, int bufnum, int offset,
- void *buf, int count);
-static void com90xx_copy_from_card(struct net_device *dev, int bufnum,
- int offset, void *buf, int count);
-
-/* Known ARCnet cards */
-
-static struct net_device *cards[16];
-static int numcards;
-
-/* Handy defines for ARCnet specific stuff */
-
-/* The number of low I/O ports used by the card */
-#define ARCNET_TOTAL_SIZE 16
-
-/* Amount of I/O memory used by the card */
-#define BUFFER_SIZE (512)
-#define MIRROR_SIZE (BUFFER_SIZE * 4)
-
-static int com90xx_skip_probe __initdata = 0;
-
-/* Module parameters */
-
-static int io; /* use the insmod io= irq= shmem= options */
-static int irq;
-static int shmem;
-static char device[9]; /* use eg. device=arc1 to change name */
-
-module_param_hw(io, int, ioport, 0);
-module_param_hw(irq, int, irq, 0);
-module_param(shmem, int, 0);
-module_param_string(device, device, sizeof(device), 0);
-
-static void __init com90xx_probe(void)
-{
- int count, status, ioaddr, numprint, airq, openparen = 0;
- unsigned long airqmask;
- int ports[(0x3f0 - 0x200) / 16 + 1] = { 0 };
- unsigned long *shmems;
- void __iomem **iomem;
- int numports, numshmems, *port;
- u_long *p;
- int index;
-
- if (!io && !irq && !shmem && !*device && com90xx_skip_probe)
- return;
-
- shmems = kzalloc(((0x100000 - 0xa0000) / 0x800) * sizeof(unsigned long),
- GFP_KERNEL);
- if (!shmems)
- return;
- iomem = kzalloc(((0x100000 - 0xa0000) / 0x800) * sizeof(void __iomem *),
- GFP_KERNEL);
- if (!iomem) {
- kfree(shmems);
- return;
- }
-
- if (BUGLVL(D_NORMAL))
- pr_info("%s\n", "COM90xx chipset support");
-
- /* set up the arrays where we'll store the possible probe addresses */
- numports = numshmems = 0;
- if (io)
- ports[numports++] = io;
- else
- for (count = 0x200; count <= 0x3f0; count += 16)
- ports[numports++] = count;
- if (shmem)
- shmems[numshmems++] = shmem;
- else
- for (count = 0xA0000; count <= 0xFF800; count += 2048)
- shmems[numshmems++] = count;
-
- /* Stage 1: abandon any reserved ports, or ones with status==0xFF
- * (empty), and reset any others by reading the reset port.
- */
- numprint = -1;
- for (port = &ports[0]; port - ports < numports; port++) {
- numprint++;
- numprint %= 8;
- if (!numprint) {
- arc_cont(D_INIT, "\n");
- arc_cont(D_INIT, "S1: ");
- }
- arc_cont(D_INIT, "%Xh ", *port);
-
- ioaddr = *port;
-
- if (!request_region(*port, ARCNET_TOTAL_SIZE,
- "arcnet (90xx)")) {
- arc_cont(D_INIT_REASONS, "(request_region)\n");
- arc_cont(D_INIT_REASONS, "S1: ");
- if (BUGLVL(D_INIT_REASONS))
- numprint = 0;
- *port-- = ports[--numports];
- continue;
- }
- if (arcnet_inb(ioaddr, COM9026_REG_R_STATUS) == 0xFF) {
- arc_cont(D_INIT_REASONS, "(empty)\n");
- arc_cont(D_INIT_REASONS, "S1: ");
- if (BUGLVL(D_INIT_REASONS))
- numprint = 0;
- release_region(*port, ARCNET_TOTAL_SIZE);
- *port-- = ports[--numports];
- continue;
- }
- /* begin resetting card */
- arcnet_inb(ioaddr, COM9026_REG_R_RESET);
-
- arc_cont(D_INIT_REASONS, "\n");
- arc_cont(D_INIT_REASONS, "S1: ");
- if (BUGLVL(D_INIT_REASONS))
- numprint = 0;
- }
- arc_cont(D_INIT, "\n");
-
- if (!numports) {
- arc_cont(D_NORMAL, "S1: No ARCnet cards found.\n");
- kfree(shmems);
- kfree(iomem);
- return;
- }
- /* Stage 2: we have now reset any possible ARCnet cards, so we can't
- * do anything until they finish. If D_INIT, print the list of
- * cards that are left.
- */
- numprint = -1;
- for (port = &ports[0]; port < ports + numports; port++) {
- numprint++;
- numprint %= 8;
- if (!numprint) {
- arc_cont(D_INIT, "\n");
- arc_cont(D_INIT, "S2: ");
- }
- arc_cont(D_INIT, "%Xh ", *port);
- }
- arc_cont(D_INIT, "\n");
- mdelay(RESETtime);
-
- /* Stage 3: abandon any shmem addresses that don't have the signature
- * 0xD1 byte in the right place, or are read-only.
- */
- numprint = -1;
- for (index = 0, p = &shmems[0]; index < numshmems; p++, index++) {
- void __iomem *base;
-
- numprint++;
- numprint %= 8;
- if (!numprint) {
- arc_cont(D_INIT, "\n");
- arc_cont(D_INIT, "S3: ");
- }
- arc_cont(D_INIT, "%lXh ", *p);
-
- if (!request_mem_region(*p, MIRROR_SIZE, "arcnet (90xx)")) {
- arc_cont(D_INIT_REASONS, "(request_mem_region)\n");
- arc_cont(D_INIT_REASONS, "Stage 3: ");
- if (BUGLVL(D_INIT_REASONS))
- numprint = 0;
- goto out;
- }
- base = ioremap(*p, MIRROR_SIZE);
- if (!base) {
- arc_cont(D_INIT_REASONS, "(ioremap)\n");
- arc_cont(D_INIT_REASONS, "Stage 3: ");
- if (BUGLVL(D_INIT_REASONS))
- numprint = 0;
- goto out1;
- }
- if (arcnet_readb(base, COM9026_REG_R_STATUS) != TESTvalue) {
- arc_cont(D_INIT_REASONS, "(%02Xh != %02Xh)\n",
- arcnet_readb(base, COM9026_REG_R_STATUS),
- TESTvalue);
- arc_cont(D_INIT_REASONS, "S3: ");
- if (BUGLVL(D_INIT_REASONS))
- numprint = 0;
- goto out2;
- }
- /* By writing 0x42 to the TESTvalue location, we also make
- * sure no "mirror" shmem areas show up - if they occur
- * in another pass through this loop, they will be discarded
- * because *cptr != TESTvalue.
- */
- arcnet_writeb(0x42, base, COM9026_REG_W_INTMASK);
- if (arcnet_readb(base, COM9026_REG_R_STATUS) != 0x42) {
- arc_cont(D_INIT_REASONS, "(read only)\n");
- arc_cont(D_INIT_REASONS, "S3: ");
- goto out2;
- }
- arc_cont(D_INIT_REASONS, "\n");
- arc_cont(D_INIT_REASONS, "S3: ");
- if (BUGLVL(D_INIT_REASONS))
- numprint = 0;
- iomem[index] = base;
- continue;
- out2:
- iounmap(base);
- out1:
- release_mem_region(*p, MIRROR_SIZE);
- out:
- *p-- = shmems[--numshmems];
- index--;
- }
- arc_cont(D_INIT, "\n");
-
- if (!numshmems) {
- arc_cont(D_NORMAL, "S3: No ARCnet cards found.\n");
- for (port = &ports[0]; port < ports + numports; port++)
- release_region(*port, ARCNET_TOTAL_SIZE);
- kfree(shmems);
- kfree(iomem);
- return;
- }
- /* Stage 4: something of a dummy, to report the shmems that are
- * still possible after stage 3.
- */
- numprint = -1;
- for (p = &shmems[0]; p < shmems + numshmems; p++) {
- numprint++;
- numprint %= 8;
- if (!numprint) {
- arc_cont(D_INIT, "\n");
- arc_cont(D_INIT, "S4: ");
- }
- arc_cont(D_INIT, "%lXh ", *p);
- }
- arc_cont(D_INIT, "\n");
-
- /* Stage 5: for any ports that have the correct status, can disable
- * the RESET flag, and (if no irq is given) generate an autoirq,
- * register an ARCnet device.
- *
- * Currently, we can only register one device per probe, so quit
- * after the first one is found.
- */
- numprint = -1;
- for (port = &ports[0]; port < ports + numports; port++) {
- int found = 0;
-
- numprint++;
- numprint %= 8;
- if (!numprint) {
- arc_cont(D_INIT, "\n");
- arc_cont(D_INIT, "S5: ");
- }
- arc_cont(D_INIT, "%Xh ", *port);
-
- ioaddr = *port;
- status = arcnet_inb(ioaddr, COM9026_REG_R_STATUS);
-
- if ((status & 0x9D)
- != (NORXflag | RECONflag | TXFREEflag | RESETflag)) {
- arc_cont(D_INIT_REASONS, "(status=%Xh)\n", status);
- arc_cont(D_INIT_REASONS, "S5: ");
- if (BUGLVL(D_INIT_REASONS))
- numprint = 0;
- release_region(*port, ARCNET_TOTAL_SIZE);
- *port-- = ports[--numports];
- continue;
- }
- arcnet_outb(CFLAGScmd | RESETclear | CONFIGclear,
- ioaddr, COM9026_REG_W_COMMAND);
- status = arcnet_inb(ioaddr, COM9026_REG_R_STATUS);
- if (status & RESETflag) {
- arc_cont(D_INIT_REASONS, " (eternal reset, status=%Xh)\n",
- status);
- arc_cont(D_INIT_REASONS, "S5: ");
- if (BUGLVL(D_INIT_REASONS))
- numprint = 0;
- release_region(*port, ARCNET_TOTAL_SIZE);
- *port-- = ports[--numports];
- continue;
- }
- /* skip this completely if an IRQ was given, because maybe
- * we're on a machine that locks during autoirq!
- */
- if (!irq) {
- /* if we do this, we're sure to get an IRQ since the
- * card has just reset and the NORXflag is on until
- * we tell it to start receiving.
- */
- airqmask = probe_irq_on();
- arcnet_outb(NORXflag, ioaddr, COM9026_REG_W_INTMASK);
- udelay(1);
- arcnet_outb(0, ioaddr, COM9026_REG_W_INTMASK);
- airq = probe_irq_off(airqmask);
-
- if (airq <= 0) {
- arc_cont(D_INIT_REASONS, "(airq=%d)\n", airq);
- arc_cont(D_INIT_REASONS, "S5: ");
- if (BUGLVL(D_INIT_REASONS))
- numprint = 0;
- release_region(*port, ARCNET_TOTAL_SIZE);
- *port-- = ports[--numports];
- continue;
- }
- } else {
- airq = irq;
- }
-
- arc_cont(D_INIT, "(%d,", airq);
- openparen = 1;
-
- /* Everything seems okay. But which shmem, if any, puts
- * back its signature byte when the card is reset?
- *
- * If there are multiple cards installed, there might be
- * multiple shmems still in the list.
- */
-#ifdef FAST_PROBE
- if (numports > 1 || numshmems > 1) {
- arcnet_inb(ioaddr, COM9026_REG_R_RESET);
- mdelay(RESETtime);
- } else {
- /* just one shmem and port, assume they match */
- arcnet_writeb(TESTvalue, iomem[0],
- COM9026_REG_W_INTMASK);
- }
-#else
- arcnet_inb(ioaddr, COM9026_REG_R_RESET);
- mdelay(RESETtime);
-#endif
-
- for (index = 0; index < numshmems; index++) {
- u_long ptr = shmems[index];
- void __iomem *base = iomem[index];
-
- if (arcnet_readb(base, COM9026_REG_R_STATUS) == TESTvalue) { /* found one */
- arc_cont(D_INIT, "%lXh)\n", *p);
- openparen = 0;
-
- /* register the card */
- if (com90xx_found(*port, airq, ptr, base) == 0)
- found = 1;
- numprint = -1;
-
- /* remove shmem from the list */
- shmems[index] = shmems[--numshmems];
- iomem[index] = iomem[numshmems];
- break; /* go to the next I/O port */
- } else {
- arc_cont(D_INIT_REASONS, "%Xh-",
- arcnet_readb(base, COM9026_REG_R_STATUS));
- }
- }
-
- if (openparen) {
- if (BUGLVL(D_INIT))
- pr_cont("no matching shmem)\n");
- if (BUGLVL(D_INIT_REASONS)) {
- pr_cont("S5: ");
- numprint = 0;
- }
- }
- if (!found)
- release_region(*port, ARCNET_TOTAL_SIZE);
- *port-- = ports[--numports];
- }
-
- if (BUGLVL(D_INIT_REASONS))
- pr_cont("\n");
-
- /* Now put back TESTvalue on all leftover shmems. */
- for (index = 0; index < numshmems; index++) {
- arcnet_writeb(TESTvalue, iomem[index], COM9026_REG_W_INTMASK);
- iounmap(iomem[index]);
- release_mem_region(shmems[index], MIRROR_SIZE);
- }
- kfree(shmems);
- kfree(iomem);
-}
-
-static int __init check_mirror(unsigned long addr, size_t size)
-{
- void __iomem *p;
- int res = -1;
-
- if (!request_mem_region(addr, size, "arcnet (90xx)"))
- return -1;
-
- p = ioremap(addr, size);
- if (p) {
- if (arcnet_readb(p, COM9026_REG_R_STATUS) == TESTvalue)
- res = 1;
- else
- res = 0;
- iounmap(p);
- }
-
- release_mem_region(addr, size);
- return res;
-}
-
-/* Set up the struct net_device associated with this card. Called after
- * probing succeeds.
- */
-static int __init com90xx_found(int ioaddr, int airq, u_long shmem,
- void __iomem *p)
-{
- struct net_device *dev = NULL;
- struct arcnet_local *lp;
- u_long first_mirror, last_mirror;
- int mirror_size;
-
- /* allocate struct net_device */
- dev = alloc_arcdev(device);
- if (!dev) {
- arc_cont(D_NORMAL, "com90xx: Can't allocate device!\n");
- iounmap(p);
- release_mem_region(shmem, MIRROR_SIZE);
- return -ENOMEM;
- }
- lp = netdev_priv(dev);
- /* find the real shared memory start/end points, including mirrors */
-
- /* guess the actual size of one "memory mirror" - the number of
- * bytes between copies of the shared memory. On most cards, it's
- * 2k (or there are no mirrors at all) but on some, it's 4k.
- */
- mirror_size = MIRROR_SIZE;
- if (arcnet_readb(p, COM9026_REG_R_STATUS) == TESTvalue &&
- check_mirror(shmem - MIRROR_SIZE, MIRROR_SIZE) == 0 &&
- check_mirror(shmem - 2 * MIRROR_SIZE, MIRROR_SIZE) == 1)
- mirror_size = 2 * MIRROR_SIZE;
-
- first_mirror = shmem - mirror_size;
- while (check_mirror(first_mirror, mirror_size) == 1)
- first_mirror -= mirror_size;
- first_mirror += mirror_size;
-
- last_mirror = shmem + mirror_size;
- while (check_mirror(last_mirror, mirror_size) == 1)
- last_mirror += mirror_size;
- last_mirror -= mirror_size;
-
- dev->mem_start = first_mirror;
- dev->mem_end = last_mirror + MIRROR_SIZE - 1;
-
- iounmap(p);
- release_mem_region(shmem, MIRROR_SIZE);
-
- if (!request_mem_region(dev->mem_start,
- dev->mem_end - dev->mem_start + 1,
- "arcnet (90xx)"))
- goto err_free_dev;
-
- /* reserve the irq */
- if (request_irq(airq, arcnet_interrupt, 0, "arcnet (90xx)", dev)) {
- arc_printk(D_NORMAL, dev, "Can't get IRQ %d!\n", airq);
- goto err_release_mem;
- }
- dev->irq = airq;
-
- /* Initialize the rest of the device structure. */
- lp->card_name = "COM90xx";
- lp->hw.command = com90xx_command;
- lp->hw.status = com90xx_status;
- lp->hw.intmask = com90xx_setmask;
- lp->hw.reset = com90xx_reset;
- lp->hw.owner = THIS_MODULE;
- lp->hw.copy_to_card = com90xx_copy_to_card;
- lp->hw.copy_from_card = com90xx_copy_from_card;
- lp->mem_start = ioremap(dev->mem_start,
- dev->mem_end - dev->mem_start + 1);
- if (!lp->mem_start) {
- arc_printk(D_NORMAL, dev, "Can't remap device memory!\n");
- goto err_free_irq;
- }
-
- /* get and check the station ID from offset 1 in shmem */
- arcnet_set_addr(dev, arcnet_readb(lp->mem_start,
- COM9026_REG_R_STATION));
-
- dev->base_addr = ioaddr;
-
- arc_printk(D_NORMAL, dev, "COM90xx station %02Xh found at %03lXh, IRQ %d, ShMem %lXh (%ld*%xh).\n",
- dev->dev_addr[0],
- dev->base_addr, dev->irq, dev->mem_start,
- (dev->mem_end - dev->mem_start + 1) / mirror_size,
- mirror_size);
-
- if (register_netdev(dev))
- goto err_unmap;
-
- cards[numcards++] = dev;
- return 0;
-
-err_unmap:
- iounmap(lp->mem_start);
-err_free_irq:
- free_irq(dev->irq, dev);
-err_release_mem:
- release_mem_region(dev->mem_start, dev->mem_end - dev->mem_start + 1);
-err_free_dev:
- free_arcdev(dev);
- return -EIO;
-}
-
-static void com90xx_command(struct net_device *dev, int cmd)
-{
- short ioaddr = dev->base_addr;
-
- arcnet_outb(cmd, ioaddr, COM9026_REG_W_COMMAND);
-}
-
-static int com90xx_status(struct net_device *dev)
-{
- short ioaddr = dev->base_addr;
-
- return arcnet_inb(ioaddr, COM9026_REG_R_STATUS);
-}
-
-static void com90xx_setmask(struct net_device *dev, int mask)
-{
- short ioaddr = dev->base_addr;
-
- arcnet_outb(mask, ioaddr, COM9026_REG_W_INTMASK);
-}
-
-/* Do a hardware reset on the card, and set up necessary registers.
- *
- * This should be called as little as possible, because it disrupts the
- * token on the network (causes a RECON) and requires a significant delay.
- *
- * However, it does make sure the card is in a defined state.
- */
-static int com90xx_reset(struct net_device *dev, int really_reset)
-{
- struct arcnet_local *lp = netdev_priv(dev);
- short ioaddr = dev->base_addr;
-
- arc_printk(D_INIT, dev, "Resetting (status=%02Xh)\n",
- arcnet_inb(ioaddr, COM9026_REG_R_STATUS));
-
- if (really_reset) {
- /* reset the card */
- arcnet_inb(ioaddr, COM9026_REG_R_RESET);
- mdelay(RESETtime);
- }
- /* clear flags & end reset */
- arcnet_outb(CFLAGScmd | RESETclear, ioaddr, COM9026_REG_W_COMMAND);
- arcnet_outb(CFLAGScmd | CONFIGclear, ioaddr, COM9026_REG_W_COMMAND);
-
-#if 0
- /* don't do this until we verify that it doesn't hurt older cards! */
- arcnet_outb(arcnet_inb(ioaddr, COM9026_REG_RW_CONFIG) | ENABLE16flag,
- ioaddr, COM9026_REG_RW_CONFIG);
-#endif
-
- /* verify that the ARCnet signature byte is present */
- if (arcnet_readb(lp->mem_start, COM9026_REG_R_STATUS) != TESTvalue) {
- if (really_reset)
- arc_printk(D_NORMAL, dev, "reset failed: TESTvalue not present.\n");
- return 1;
- }
- /* enable extended (512-byte) packets */
- arcnet_outb(CONFIGcmd | EXTconf, ioaddr, COM9026_REG_W_COMMAND);
-
- /* clean out all the memory to make debugging make more sense :) */
- if (BUGLVL(D_DURING))
- memset_io(lp->mem_start, 0x42, 2048);
-
- /* done! return success. */
- return 0;
-}
-
-static void com90xx_copy_to_card(struct net_device *dev, int bufnum,
- int offset, void *buf, int count)
-{
- struct arcnet_local *lp = netdev_priv(dev);
- void __iomem *memaddr = lp->mem_start + bufnum * 512 + offset;
-
- TIME(dev, "memcpy_toio", count, memcpy_toio(memaddr, buf, count));
-}
-
-static void com90xx_copy_from_card(struct net_device *dev, int bufnum,
- int offset, void *buf, int count)
-{
- struct arcnet_local *lp = netdev_priv(dev);
- void __iomem *memaddr = lp->mem_start + bufnum * 512 + offset;
-
- TIME(dev, "memcpy_fromio", count, memcpy_fromio(buf, memaddr, count));
-}
-
-MODULE_DESCRIPTION("ARCnet COM90xx normal chipset driver");
-MODULE_LICENSE("GPL");
-
-static int __init com90xx_init(void)
-{
- if (irq == 2)
- irq = 9;
- com90xx_probe();
- if (!numcards)
- return -EIO;
- return 0;
-}
-
-static void __exit com90xx_exit(void)
-{
- struct net_device *dev;
- struct arcnet_local *lp;
- int count;
-
- for (count = 0; count < numcards; count++) {
- dev = cards[count];
- lp = netdev_priv(dev);
-
- unregister_netdev(dev);
- free_irq(dev->irq, dev);
- iounmap(lp->mem_start);
- release_region(dev->base_addr, ARCNET_TOTAL_SIZE);
- release_mem_region(dev->mem_start,
- dev->mem_end - dev->mem_start + 1);
- free_arcdev(dev);
- }
-}
-
-module_init(com90xx_init);
-module_exit(com90xx_exit);
-
-#ifndef MODULE
-static int __init com90xx_setup(char *s)
-{
- int ints[8];
-
- s = get_options(s, 8, ints);
- if (!ints[0] && !*s) {
- pr_notice("Disabled\n");
- return 1;
- }
-
- switch (ints[0]) {
- default: /* ERROR */
- pr_err("Too many arguments\n");
- fallthrough;
- case 3: /* Mem address */
- shmem = ints[3];
- fallthrough;
- case 2: /* IRQ */
- irq = ints[2];
- fallthrough;
- case 1: /* IO address */
- io = ints[1];
- }
-
- if (*s)
- snprintf(device, sizeof(device), "%s", s);
-
- return 1;
-}
-
-__setup("com90xx=", com90xx_setup);
-#endif
--
2.43.0
^ permalink raw reply related
* Re: [PATCH v3 04/12] x86,fs/resctrl: Program PLZA through kmode arch hooks
From: Moger, Babu @ 2026-05-20 23:09 UTC (permalink / raw)
To: Luck, Tony, Babu Moger
Cc: corbet, reinette.chatre, Dave.Martin, james.morse, tglx, bp,
dave.hansen, skhan, x86, mingo, hpa, akpm, rdunlap,
pawan.kumar.gupta, feng.tang, dapeng1.mi, kees, elver, lirongqing,
paulmck, bhelgaas, seanjc, alexandre.chartre, yazen.ghannam,
peterz, chang.seok.bae, kim.phillips, xin, naveen,
thomas.lendacky, linux-doc, linux-kernel, eranian, peternewman,
sos-linux-ext-patches
In-Reply-To: <ag4ywKHsH1Fc15wH@agluck-desk3>
Hi Tony,
On 5/20/2026 5:16 PM, Luck, Tony wrote:
> On Wed, May 20, 2026 at 12:49:25PM -0500, Babu Moger wrote:
>> Hi Tony,
>>
>>
>> On 5/19/26 15:59, Luck, Tony wrote:
>>> On Thu, Apr 30, 2026 at 06:24:49PM -0500, Babu Moger wrote:
>>>> +void resctrl_arch_configure_kmode(cpumask_var_t cpu_mask, u32 closid, u32 rmid, bool enable)
>>>> +{
>>>> + union msr_pqr_plza_assoc plza = { 0 };
>>>> +
>>>> + plza.split.rmid = rmid;
>>>> + plza.split.rmid_en = 1;
>>>
>>> Shouldn't there be a parameter for the value of rmid_en?
>>
>>
>> I realized that behavior is not required—it was actually due to a mistake in
>> my v2 series implementation.
>>
>> Below are the relevant definitions:
>>
>>
>> GLOBAL_ASSIGN_CTRL_INHERIT_MON_PER_CPU:
>> The CLOSID is applied to kernel work, while the RMID used for monitoring is
>> inherited from the currently running user task.
>> No separate monitoring group is assigned for kernel work, so kernel
>> execution naturally inherits the user-space RMID.
>>
>>
>> GLOBAL_ASSIGN_CTRL_ASSIGN_MON_PER_CPU:
>> Both CLOSID and RMID are explicitly assigned to kernel work.
>> This allows assigning a dedicated monitoring group for kernel execution and
>> therefore requires a separate RMID.
>>
>> Example: For GLOBAL_ASSIGN_CTRL_INHERIT_MON_PER_CPU:
>>
>> # mount -t resctrl resctrl /sys/fs/resctrl
>>
>> # cat /sys/fs/resctrl/info/kernel_mode
>> [inherit_ctrl_and_mon:group=//]
>> global_assign_ctrl_inherit_mon_per_cpu:group=none
>> global_assign_ctrl_assign_mon_per_cpu:group=none
>>
>> # mkdir /sys/fs/resctrl/ctrl1 (PQR_ASSOC closid=1 rmid=1)
>>
>> This configures all the CPU threads to use closid=1 and rmid=1 for both
>> allocation and monitoring across user and kernel modes.
>>
>>
>> # echo "global_assign_ctrl_inherit_mon_per_cpu:group=ctrl1//" \
>> > /sys/fs/resctrl/info/kernel_mode
>>
>> # cat /sys/fs/resctrl/info/kernel_mode
>> inherit_ctrl_and_mon:group=none
>> [global_assign_ctrl_inherit_mon_per_cpu:group=ctrl1//]
>> global_assign_ctrl_assign_mon_per_cpu:group=none
>>
>> This overrides the previous configuration, and PQR_PLZA_ASSOC is written.
>>
>> Possible options:
>>
>> 1. (closid=1, rmid_en=0, rmid=1)
>> Here, hardware uses closid=1 for kernel work, but RMID tracking is disabled
>> for kernel mode.
>>
>> As a result, reading RMID 1 reports only user-mode activity
>> This contradicts the definition of this mode, since kernel work is expected
>> to inherit the user RMID for monitoring.
>>
>> 2. (closid=1, rmid_en=1, rmid=1)
>> In this case, RMID tracking is enabled for both user and kernel modes.
>>
>> Reading RMID 1 reports combined user + kernel activity
>> This aligns with the expected inherit_monitoring behavior
>>
>>
>> The preferred approach is to separate kernel monitoring by assigning it a
>> dedicated monitoring group and updating PQR_PLZA_ASSOC to use a different
>> RMID (e.g., closid=1, rmid_en=1, rmid=2). This is exactly the behavior
>> implemented by GLOBAL_ASSIGN_CTRL_ASSIGN_MON_PER_CPU.
>
> So maybe I'm just confused by the name "global_assign_ctrl_inherit_mon_per_cpu"
>
> That sounds like "Use the CLOSID from PLZA, but keep the RMID from
> legacy PQR_ASSOC.
Yes. That is correct. We need to work on naming this correctly.
>
> So:
>
> # mkdir ctrl1 # maybe gets CLOSID=1, RMID=1
> # echo global_assign_ctrl_inherit_mon_per_cpu:group=ctrl1//" > info/kernel_mode
This makes kernel mode run with CLOSID 1 and RMID 1(Use the same RMID as
the user mode). [1]
> # mkdir ctrl2 # maybe gets CLOSID=2, RMID=2
> # echo $$ > ctrl2/tasks
>
> My shell, and all children run with CLOSID=2 and RMID=2 from ctrl2. But
> when they do system calls, take page faults or there is an interrupt I'd
> expect the code in the kernel to run with the CLOSID=1, while inheriting
> RMID=2.
ctrl2 is not a PLZA group. So, RMID 2 is not connected to PLZA.
>
> To make that happen, I thing the PLZA MSR should have rmid_en = 0. But
> the only code I see that sets this always sets rmid_en=1.
Setting rmid_en = 0 in [1] disables counting of kernel usage for RMID 1
(from ctrl1).
The key difference between the two modes is:
In one mode, user and kernel usage are counted together.
In the other mode, kernel usage is counted separately from user usage.
Please feel free to continue the discussion if anything is still unclear.
Thanks,
Babu
^ permalink raw reply
* Re: [PATCH net-next v2 2/2] net: ti: icssg: Add HSR and LRE PA statistics
From: Jakub Kicinski @ 2026-05-20 22:33 UTC (permalink / raw)
To: MD Danish Anwar
Cc: Luka Gejak, Felix Maurer, David S. Miller, Eric Dumazet,
Paolo Abeni, Simon Horman, Jonathan Corbet, Shuah Khan,
Roger Quadros, Andrew Lunn, Meghana Malladi, Jacob Keller,
David Carlier, Vadim Fedorenko, Kevin Hao, netdev, linux-doc,
linux-kernel, linux-arm-kernel, Vladimir Oltean
In-Reply-To: <1d8ab51a-6943-4978-88cf-adda8cc57f7e@ti.com>
On Wed, 20 May 2026 15:30:24 +0530 MD Danish Anwar wrote:
> What should be the next steps here? Is there any existing defined set of
> stats where I could populate stats from ICSSG firmware for HSR (similar
> to ndo_get_stats64 callback). Or de we need to implement a new callback
> that will do this for HSR.
I'd try to plumb this thru ndo_get_offload_stats
Close enough for my taste, let's see if anyone objects.
> I agree with Luka on the categorization,
Felix responded with the MIB counters which are even better.
We should probably define a struct with all of those and then
just fill in the ones you have.
Please do the same thing ethtool Netlink does, break the counters up,
each member to its own Netlink attr, in the kernel init them to ~0
and only report values the driver actually set to something.
We don't want to print 0 for stats driver doesn't support.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox